Title: [135814] trunk/Source/WebCore
Revision
135814
Author
[email protected]
Date
2012-11-26 20:41:06 -0800 (Mon, 26 Nov 2012)

Log Message

[TexMap] GraphicsLayerTextureMapper::setSize() sets the size of a mask layer.
https://bugs.webkit.org/show_bug.cgi?id=103297

Patch by Huang Dongsung <[email protected]> on 2012-11-26
Reviewed by Noam Rosenthal.

Currently, CoordinatedGraphicsLayer sets the size of a mask layer in setSize()
and setMaksLayer(). GraphicsLayerTextureMapper follows the behavior. If so we
don't have to check the size of the mask layer in TextureMapperLayer::flushCompositingState().

No new tests. Covered by existing tests.

* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setMaskLayer):
(WebCore::GraphicsLayerTextureMapper::setSize):
* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::flushCompositingState):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (135813 => 135814)


--- trunk/Source/WebCore/ChangeLog	2012-11-27 04:37:01 UTC (rev 135813)
+++ trunk/Source/WebCore/ChangeLog	2012-11-27 04:41:06 UTC (rev 135814)
@@ -1,3 +1,22 @@
+2012-11-26  Huang Dongsung  <[email protected]>
+
+        [TexMap] GraphicsLayerTextureMapper::setSize() sets the size of a mask layer.
+        https://bugs.webkit.org/show_bug.cgi?id=103297
+
+        Reviewed by Noam Rosenthal.
+
+        Currently, CoordinatedGraphicsLayer sets the size of a mask layer in setSize()
+        and setMaksLayer(). GraphicsLayerTextureMapper follows the behavior. If so we
+        don't have to check the size of the mask layer in TextureMapperLayer::flushCompositingState().
+
+        No new tests. Covered by existing tests.
+
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+        (WebCore::GraphicsLayerTextureMapper::setMaskLayer):
+        (WebCore::GraphicsLayerTextureMapper::setSize):
+        * platform/graphics/texmap/TextureMapperLayer.cpp:
+        (WebCore::TextureMapperLayer::flushCompositingState):
+
 2012-11-26  Kentaro Hara  <[email protected]>
 
         [V8] Remove V8Parameter::object()

Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (135813 => 135814)


--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp	2012-11-27 04:37:01 UTC (rev 135813)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp	2012-11-27 04:41:06 UTC (rev 135814)
@@ -191,6 +191,10 @@
         return;
     GraphicsLayer::setMaskLayer(value);
     notifyChange(TextureMapperLayer::MaskLayerChange);
+
+    if (!value)
+        return;
+    value->setSize(size());
 }
 
 
@@ -232,6 +236,8 @@
         return;
 
     GraphicsLayer::setSize(value);
+    if (maskLayer())
+        maskLayer()->setSize(value);
     notifyChange(TextureMapperLayer::SizeChange);
 }
 

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp (135813 => 135814)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-11-27 04:37:01 UTC (rev 135813)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2012-11-27 04:41:06 UTC (rev 135814)
@@ -484,14 +484,9 @@
     if (graphicsLayer && !(options & ComputationsOnly))
         flushCompositingStateSelf(graphicsLayer, textureMapper);
 
-    if (graphicsLayer && m_state.maskLayer) {
+    if (graphicsLayer && m_state.maskLayer)
         m_state.maskLayer->flushCompositingState(toGraphicsLayerTextureMapper(graphicsLayer->maskLayer()), textureMapper);
 
-        // A mask layer has its parent's size by default, in case it's not set specifically.
-        if (m_state.maskLayer->m_size.isEmpty())
-            m_state.maskLayer->m_size = m_size;
-    }
-
     if (m_state.replicaLayer)
         m_state.replicaLayer->flushCompositingState(toGraphicsLayerTextureMapper(graphicsLayer->replicaLayer()), textureMapper);
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to