Title: [138695] trunk/Source/WebCore
Revision
138695
Author
commit-qu...@webkit.org
Date
2013-01-02 20:39:01 -0800 (Wed, 02 Jan 2013)

Log Message

[TexMap] Remove m_size in TextureMapperLayer.
https://bugs.webkit.org/show_bug.cgi?id=105781

Patch by Huang Dongsung <luxte...@company100.net> on 2013-01-02
Reviewed by Noam Rosenthal.

m_size is duplicated by State::size, so this patch removes it.

No new tests. Refactoring only.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computeTransformsRecursive):
(WebCore::TextureMapperLayer::paintSelf):
(WebCore::TextureMapperLayer::isVisible):
(WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/texmap/TextureMapperLayer.h:
(WebCore::TextureMapperLayer::layerRect):
(TextureMapperLayer):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (138694 => 138695)


--- trunk/Source/WebCore/ChangeLog	2013-01-03 03:24:20 UTC (rev 138694)
+++ trunk/Source/WebCore/ChangeLog	2013-01-03 04:39:01 UTC (rev 138695)
@@ -1,3 +1,23 @@
+2013-01-02  Huang Dongsung  <luxte...@company100.net>
+
+        [TexMap] Remove m_size in TextureMapperLayer.
+        https://bugs.webkit.org/show_bug.cgi?id=105781
+
+        Reviewed by Noam Rosenthal.
+
+        m_size is duplicated by State::size, so this patch removes it.
+
+        No new tests. Refactoring only.
+
+        * platform/graphics/texmap/TextureMapperLayer.cpp:
+        (WebCore::TextureMapperLayer::computeTransformsRecursive):
+        (WebCore::TextureMapperLayer::paintSelf):
+        (WebCore::TextureMapperLayer::isVisible):
+        (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
+        * platform/graphics/texmap/TextureMapperLayer.h:
+        (WebCore::TextureMapperLayer::layerRect):
+        (TextureMapperLayer):
+
 2013-01-02  Kenneth Russell  <k...@google.com>
 
         [chromium] Creation of dedicated workers (isolates) leaks reference to HTMLDocument

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


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2013-01-03 03:24:20 UTC (rev 138694)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp	2013-01-03 04:39:01 UTC (rev 138695)
@@ -71,7 +71,7 @@
 
 void TextureMapperLayer::computeTransformsRecursive()
 {
-    if (m_size.isEmpty() && m_state.masksToBounds)
+    if (m_state.size.isEmpty() && m_state.masksToBounds)
         return;
 
     // Compute transforms recursively on the way down to leafs.
@@ -85,7 +85,7 @@
     m_state.visible = m_state.backfaceVisibility || !m_transform.combined().isBackFaceVisible();
 
     if (m_parent && m_parent->m_state.preserves3D)
-        m_centerZ = m_transform.combined().mapPoint(FloatPoint3D(m_size.width() / 2, m_size.height() / 2, 0)).z();
+        m_centerZ = m_transform.combined().mapPoint(FloatPoint3D(m_state.size.width() / 2, m_state.size.height() / 2, 0)).z();
 
     if (m_state.maskLayer)
         m_state.maskLayer->computeTransformsRecursive();
@@ -136,7 +136,7 @@
     }
 
     if (m_backingStore) {
-        ASSERT(m_state.drawsContent && m_state.contentsVisible && !m_size.isEmpty());
+        ASSERT(m_state.drawsContent && m_state.contentsVisible && !m_state.size.isEmpty());
         ASSERT(!layerRect().isEmpty());
         m_backingStore->paintToTextureMapper(options.textureMapper, layerRect(), transform, opacity, mask.get());
     }
@@ -261,7 +261,7 @@
 
 bool TextureMapperLayer::isVisible() const
 {
-    if (m_size.isEmpty() && (m_state.masksToBounds || m_state.maskLayer || m_children.isEmpty()))
+    if (m_state.size.isEmpty() && (m_state.masksToBounds || m_state.maskLayer || m_children.isEmpty()))
         return false;
     if (!m_state.visible && m_children.isEmpty())
         return false;
@@ -391,8 +391,6 @@
     if (changeMask & ChildrenChange)
         setChildren(graphicsLayer->children());
 
-    m_size = graphicsLayer->size();
-
     if (changeMask & MaskLayerChange) {
        if (TextureMapperLayer* layer = toTextureMapperLayer(graphicsLayer->maskLayer()))
            layer->m_effectTarget = this;

Modified: trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h (138694 => 138695)


--- trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h	2013-01-03 03:24:20 UTC (rev 138694)
+++ trunk/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.h	2013-01-03 04:39:01 UTC (rev 138695)
@@ -148,7 +148,7 @@
 
     inline FloatRect layerRect() const
     {
-        return FloatRect(FloatPoint::zero(), m_size);
+        return FloatRect(FloatPoint::zero(), m_state.size);
     }
 
     GraphicsLayerTransform m_transform;
@@ -158,7 +158,6 @@
     TextureMapperLayer* m_effectTarget;
     RefPtr<TextureMapperBackingStore> m_backingStore;
     TextureMapperPlatformLayer* m_contentsLayer;
-    FloatSize m_size;
     float m_opacity;
 #if ENABLE(CSS_FILTERS)
     FilterOperations m_filters;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to