Shave off a TransformationMatrix copy if RenderLayer's transparencyClipBox()
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jan 2016 07:37:52 +0000 (07:37 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Jan 2016 07:37:52 +0000 (07:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152119

Reviewed by Simon Fraser.

* rendering/RenderLayer.cpp:
(WebCore::transparencyClipBox): Multiply the transformation matrix returned by
layer.transform() directly into the transform object, instead of first
multiplying them and then copying the result back into the transform object.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194576 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderLayer.cpp

index f7bfd14..75de791 100644 (file)
@@ -1,3 +1,15 @@
+2016-01-04  Zan Dobersek  <zdobersek@igalia.com>
+
+        Shave off a TransformationMatrix copy if RenderLayer's transparencyClipBox()
+        https://bugs.webkit.org/show_bug.cgi?id=152119
+
+        Reviewed by Simon Fraser.
+
+        * rendering/RenderLayer.cpp:
+        (WebCore::transparencyClipBox): Multiply the transformation matrix returned by
+        layer.transform() directly into the transform object, instead of first
+        multiplying them and then copying the result back into the transform object.
+
 2016-01-04  Myles C. Maxfield  <mmaxfield@apple.com>
 
         TextBreakIterator uses an internal implementation detail of NSLocale
index bdfed53..251b0ee 100644 (file)
@@ -1754,7 +1754,7 @@ static LayoutRect transparencyClipBox(const RenderLayer& layer, const RenderLaye
 
         TransformationMatrix transform;
         transform.translate(delta.width(), delta.height());
-        transform = transform * *layer.transform();
+        transform.multiply(*layer.transform());
 
         // We don't use fragment boxes when collecting a transformed layer's bounding box, since it always
         // paints unfragmented.