Commit: 80484794165c8a0a62dcb6309c111dede6f0c9be
Author: Manuel Castilla
Date:   Fri Aug 6 21:24:11 2021 +0200
Branches: compositor-full-frame
https://developer.blender.org/rB80484794165c8a0a62dcb6309c111dede6f0c9be

Avoid using `floor` function

It has an impact in performance when used in deep loops.
If area have negative coordinates it will round
toward zero but buffers should be displaced later on to always
work with positive coordinates.

===================================================================

M       source/blender/compositor/intern/COM_MemoryBuffer.h

===================================================================

diff --git a/source/blender/compositor/intern/COM_MemoryBuffer.h 
b/source/blender/compositor/intern/COM_MemoryBuffer.h
index 4e27338eea1..de00ba4737b 100644
--- a/source/blender/compositor/intern/COM_MemoryBuffer.h
+++ b/source/blender/compositor/intern/COM_MemoryBuffer.h
@@ -210,7 +210,7 @@ class MemoryBuffer {
       clear_elem(out);
     }
     else {
-      read_elem(floor(x), floor(y), out);
+      read_elem(x, y, out);
     }
   }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
List details, subscription details or unsubscribe:
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to