Title: [99327] trunk/Source
Revision
99327
Author
[email protected]
Date
2011-11-04 15:16:25 -0700 (Fri, 04 Nov 2011)

Log Message

[chromium] Re-named the original scissorRect to clipRect
https://bugs.webkit.org/show_bug.cgi?id=71580

Patch by Shawn Singh <[email protected]> on 2011-11-04
Reviewed by James Robinson.

Source/WebCore:

Existing tests are updated appropriately; and no new behavior is
introduced by this patch.

* platform/graphics/chromium/LayerChromium.cpp:
(WebCore::LayerChromium::LayerChromium):
* platform/graphics/chromium/LayerChromium.h:
(WebCore::LayerChromium::setUsesLayerClipping):
(WebCore::LayerChromium::usesLayerClipping):
(WebCore::LayerChromium::clipRect):
(WebCore::LayerChromium::setClipRect):
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::drawLayersInternal):
(WebCore::LayerRendererChromium::drawLayer):
* platform/graphics/chromium/RenderSurfaceChromium.h:
(WebCore::RenderSurfaceChromium::clipRect):
(WebCore::RenderSurfaceChromium::setClipRect):
* platform/graphics/chromium/cc/CCLayerImpl.cpp:
(WebCore::CCLayerImpl::CCLayerImpl):
* platform/graphics/chromium/cc/CCLayerImpl.h:
(WebCore::CCLayerImpl::setUsesLayerClipping):
(WebCore::CCLayerImpl::usesLayerClipping):
(WebCore::CCLayerImpl::clipRect):
(WebCore::CCLayerImpl::setClipRect):
* platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
(WebCore::CCLayerTreeHost::updateLayers):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::layerShouldBeSkipped):
(WebCore::calculateDrawTransformsAndVisibilityInternal):
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
(WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect):
* platform/graphics/chromium/cc/CCRenderSurface.cpp:
(WebCore::CCRenderSurface::draw):
* platform/graphics/chromium/cc/CCRenderSurface.h:
(WebCore::CCRenderSurface::setClipRect):
(WebCore::CCRenderSurface::clipRect):

Source/WebKit/chromium:

* tests/CCLayerImplTest.cpp:
(WebCore::TEST):
* tests/CCLayerTreeHostCommonTest.cpp:
(WebCore::TEST):
* tests/LayerChromiumTest.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (99326 => 99327)


--- trunk/Source/WebCore/ChangeLog	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/ChangeLog	2011-11-04 22:16:25 UTC (rev 99327)
@@ -1,3 +1,46 @@
+2011-11-04  Shawn Singh  <[email protected]>
+
+        [chromium] Re-named the original scissorRect to clipRect
+        https://bugs.webkit.org/show_bug.cgi?id=71580
+
+        Reviewed by James Robinson.
+
+        Existing tests are updated appropriately; and no new behavior is
+        introduced by this patch.
+
+        * platform/graphics/chromium/LayerChromium.cpp:
+        (WebCore::LayerChromium::LayerChromium):
+        * platform/graphics/chromium/LayerChromium.h:
+        (WebCore::LayerChromium::setUsesLayerClipping):
+        (WebCore::LayerChromium::usesLayerClipping):
+        (WebCore::LayerChromium::clipRect):
+        (WebCore::LayerChromium::setClipRect):
+        * platform/graphics/chromium/LayerRendererChromium.cpp:
+        (WebCore::LayerRendererChromium::drawLayersInternal):
+        (WebCore::LayerRendererChromium::drawLayer):
+        * platform/graphics/chromium/RenderSurfaceChromium.h:
+        (WebCore::RenderSurfaceChromium::clipRect):
+        (WebCore::RenderSurfaceChromium::setClipRect):
+        * platform/graphics/chromium/cc/CCLayerImpl.cpp:
+        (WebCore::CCLayerImpl::CCLayerImpl):
+        * platform/graphics/chromium/cc/CCLayerImpl.h:
+        (WebCore::CCLayerImpl::setUsesLayerClipping):
+        (WebCore::CCLayerImpl::usesLayerClipping):
+        (WebCore::CCLayerImpl::clipRect):
+        (WebCore::CCLayerImpl::setClipRect):
+        * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
+        (WebCore::CCLayerTreeHost::updateLayers):
+        * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
+        (WebCore::layerShouldBeSkipped):
+        (WebCore::calculateDrawTransformsAndVisibilityInternal):
+        * platform/graphics/chromium/cc/CCLayerTreeHostCommon.h:
+        (WebCore::CCLayerTreeHostCommon::calculateVisibleLayerRect):
+        * platform/graphics/chromium/cc/CCRenderSurface.cpp:
+        (WebCore::CCRenderSurface::draw):
+        * platform/graphics/chromium/cc/CCRenderSurface.h:
+        (WebCore::CCRenderSurface::setClipRect):
+        (WebCore::CCRenderSurface::clipRect):
+
 2011-11-04  Dmitry Lomov  <[email protected]>
 
         Add the ability to transfer ArrayBuffer and "neuter" it.

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -66,7 +66,7 @@
     , m_masksToBounds(false)
     , m_opaque(false)
     , m_doubleSided(true)
-    , m_usesLayerScissor(false)
+    , m_usesLayerClipping(false)
     , m_isNonCompositedContent(false)
     , m_preserves3D(false)
     , m_replicaLayer(0)

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerChromium.h	2011-11-04 22:16:25 UTC (rev 99327)
@@ -144,8 +144,8 @@
     void setPreserves3D(bool preserve3D) { m_preserves3D = preserve3D; }
     bool preserves3D() const { return m_preserves3D; }
 
-    void setUsesLayerScissor(bool usesLayerScissor) { m_usesLayerScissor = usesLayerScissor; }
-    bool usesLayerScissor() const { return m_usesLayerScissor; }
+    void setUsesLayerClipping(bool usesLayerClipping) { m_usesLayerClipping = usesLayerClipping; }
+    bool usesLayerClipping() const { return m_usesLayerClipping; }
 
     void setIsNonCompositedContent(bool isNonCompositedContent) { m_isNonCompositedContent = isNonCompositedContent; }
     bool isNonCompositedContent() const { return m_isNonCompositedContent; }
@@ -183,8 +183,8 @@
 
     float drawOpacity() const { return m_drawOpacity; }
     void setDrawOpacity(float opacity) { m_drawOpacity = opacity; }
-    const IntRect& scissorRect() const { return m_scissorRect; }
-    void setScissorRect(const IntRect& rect) { m_scissorRect = rect; }
+    const IntRect& clipRect() const { return m_clipRect; }
+    void setClipRect(const IntRect& clipRect) { m_clipRect = clipRect; }
     RenderSurfaceChromium* targetRenderSurface() const { return m_targetRenderSurface; }
     void setTargetRenderSurface(RenderSurfaceChromium* surface) { m_targetRenderSurface = surface; }
     const TransformationMatrix& drawTransform() const { return m_drawTransform; }
@@ -263,7 +263,7 @@
     bool m_masksToBounds;
     bool m_opaque;
     bool m_doubleSided;
-    bool m_usesLayerScissor;
+    bool m_usesLayerClipping;
     bool m_isNonCompositedContent;
     bool m_preserves3D;
 
@@ -276,7 +276,7 @@
     // Transient properties.
     OwnPtr<RenderSurfaceChromium> m_renderSurface;
     float m_drawOpacity;
-    IntRect m_scissorRect;
+    IntRect m_clipRect;
     RenderSurfaceChromium* m_targetRenderSurface;
     TransformationMatrix m_drawTransform;
     TransformationMatrix m_screenSpaceTransform;

Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -353,7 +353,7 @@
         rootDrawLayer->createRenderSurface();
     rootDrawLayer->renderSurface()->setContentRect(IntRect(IntPoint(), viewportSize()));
 
-    rootDrawLayer->setScissorRect(IntRect(IntPoint(), viewportSize()));
+    rootDrawLayer->setClipRect(IntRect(IntPoint(), viewportSize()));
 
     CCLayerList renderSurfaceLayerList;
     renderSurfaceLayerList.append(rootDrawLayer);
@@ -582,8 +582,8 @@
     if (visibleLayerRect.isEmpty())
         return;
 
-    if (layer->usesLayerScissor())
-        setScissorToRect(layer->scissorRect());
+    if (layer->usesLayerClipping())
+        setScissorToRect(layer->clipRect());
     else
         GLC(m_context.get(), m_context->disable(GraphicsContext3D::SCISSOR_TEST));
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/RenderSurfaceChromium.h	2011-11-04 22:16:25 UTC (rev 99327)
@@ -72,8 +72,8 @@
     const TransformationMatrix& replicaDrawTransform() const { return m_replicaDrawTransform; }
     void setReplicaDrawTransform(const TransformationMatrix& replicaDrawTransform) { m_replicaDrawTransform = replicaDrawTransform; }
 
-    const IntRect& scissorRect() const { return m_scissorRect; }
-    void setScissorRect(const IntRect& scissorRect) { m_scissorRect = scissorRect; }
+    const IntRect& clipRect() const { return m_clipRect; }
+    void setClipRect(const IntRect& clipRect) { m_clipRect = clipRect; }
 
     bool skipsDraw() const { return m_skipsDraw; }
     void setSkipsDraw(bool skipsDraw) { m_skipsDraw = skipsDraw; }
@@ -94,7 +94,7 @@
     TransformationMatrix m_drawTransform;
     TransformationMatrix m_replicaDrawTransform;
     TransformationMatrix m_originTransform;
-    IntRect m_scissorRect;
+    IntRect m_clipRect;
     Vector<RefPtr<LayerChromium> > m_layerList;
 };
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -48,7 +48,7 @@
     , m_opaque(false)
     , m_opacity(1.0)
     , m_preserves3D(false)
-    , m_usesLayerScissor(false)
+    , m_usesLayerClipping(false)
     , m_isNonCompositedContent(false)
     , m_drawsContent(false)
     , m_targetRenderSurface(0)

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerImpl.h	2011-11-04 22:16:25 UTC (rev 99327)
@@ -107,8 +107,8 @@
     void setPreserves3D(bool);
     bool preserves3D() const { return m_preserves3D; }
 
-    void setUsesLayerScissor(bool usesLayerScissor) { m_usesLayerScissor = usesLayerScissor; }
-    bool usesLayerScissor() const { return m_usesLayerScissor; }
+    void setUsesLayerClipping(bool usesLayerClipping) { m_usesLayerClipping = usesLayerClipping; }
+    bool usesLayerClipping() const { return m_usesLayerClipping; }
 
     void setIsNonCompositedContent(bool isNonCompositedContent) { m_isNonCompositedContent = isNonCompositedContent; }
     bool isNonCompositedContent() const { return m_isNonCompositedContent; }
@@ -137,8 +137,8 @@
     float drawOpacity() const { return m_drawOpacity; }
     void setDrawOpacity(float opacity) { m_drawOpacity = opacity; }
 
-    const IntRect& scissorRect() const { return m_scissorRect; }
-    void setScissorRect(const IntRect& rect) { m_scissorRect = rect; }
+    const IntRect& clipRect() const { return m_clipRect; }
+    void setClipRect(const IntRect& rect) { m_clipRect = rect; }
     CCRenderSurface* targetRenderSurface() const { return m_targetRenderSurface; }
     void setTargetRenderSurface(CCRenderSurface* surface) { m_targetRenderSurface = surface; }
 
@@ -233,7 +233,7 @@
     bool m_preserves3D;
     TransformationMatrix m_sublayerTransform;
     TransformationMatrix m_transform;
-    bool m_usesLayerScissor;
+    bool m_usesLayerClipping;
     bool m_isNonCompositedContent;
 
     bool m_drawsContent;
@@ -266,10 +266,10 @@
     TransformationMatrix m_drawTransform;
     TransformationMatrix m_screenSpaceTransform;
 
-    // The scissor rectangle that should be used when this layer is drawn.
+    // The rect that contributes to the scissor when this layer is drawn.
     // Inherited by the parent layer and further restricted if this layer masks
     // to bounds.
-    IntRect m_scissorRect;
+    IntRect m_clipRect;
 
     // Render surface associated with this layer. The layer and its descendants
     // will render to this surface.

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHost.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -292,8 +292,8 @@
         rootLayer->createRenderSurface();
     rootLayer->renderSurface()->setContentRect(IntRect(IntPoint(0, 0), viewportSize()));
 
-    IntRect rootScissorRect(IntPoint(), viewportSize());
-    rootLayer->setScissorRect(rootScissorRect);
+    IntRect rootClipRect(IntPoint(), viewportSize());
+    rootLayer->setClipRect(rootClipRect);
 
     // This assert fires if updateCompositorResources wasn't called after
     // updateLayers. Only one update can be pending at any given time.

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -80,7 +80,7 @@
     //   - the layer is not double-sided, but its back face is visible.
     //
     // Some additional conditions need to be computed at a later point after the recursion is finished.
-    //   - the intersection of render surface content and layer scissor is empty
+    //   - the intersection of render surface content and layer clipRect is empty
     //   - the visibleLayerRect is empty
 
     if (!layer->drawsContent() || !layer->opacity() || layer->bounds().isEmpty())
@@ -104,7 +104,7 @@
 }
 
 // Recursively walks the layer tree starting at the given node and computes all the
-// necessary transformations, scissor rectangles, render surfaces, etc.
+// necessary transformations, clipRects, render surfaces, etc.
 template<typename LayerType, typename RenderSurfaceType, typename LayerSorter>
 static void calculateDrawTransformsAndVisibilityInternal(LayerType* layer, LayerType* rootLayer, const TransformationMatrix& parentMatrix, const TransformationMatrix& fullHierarchyMatrix, Vector<RefPtr<LayerType> >& renderSurfaceLayerList, Vector<RefPtr<LayerType> >& layerList, LayerSorter* layerSorter, int maxTextureSize)
 {
@@ -214,7 +214,7 @@
     TransformationMatrix nextHierarchyMatrix = fullHierarchyMatrix;
 
     // FIXME: This seems like the wrong place to set this
-    layer->setUsesLayerScissor(false);
+    layer->setUsesLayerClipping(false);
 
     // The layer and its descendants render on a new RenderSurface if any of
     // these conditions hold:
@@ -257,10 +257,10 @@
         // Update the aggregate hierarchy matrix to include the transform of the newly created RenderSurface.
         nextHierarchyMatrix.multiply(layerOriginTransform);
 
-        // The render surface scissor rect is the scissor rect that needs to
+        // The render surface clipRect contributes to the scissor rect that needs to
         // be applied before drawing the render surface onto its containing
         // surface and is therefore expressed in the parent's coordinate system.
-        renderSurface->setScissorRect(layer->parent() ? layer->parent()->scissorRect() : layer->scissorRect());
+        renderSurface->setClipRect(layer->parent() ? layer->parent()->clipRect() : layer->clipRect());
 
         renderSurface->clearLayerList();
 
@@ -284,10 +284,10 @@
             if (layer->parent()->preserves3D())
                layer->setDrawOpacity(layer->drawOpacity() * layer->parent()->drawOpacity());
 
-            // Layers inherit the scissor rect from their parent.
-            layer->setScissorRect(layer->parent()->scissorRect());
-            if (layer->parent()->usesLayerScissor())
-                layer->setUsesLayerScissor(true);
+            // Layers inherit the clip rect from their parent.
+            layer->setClipRect(layer->parent()->clipRect());
+            if (layer->parent()->usesLayerClipping())
+                layer->setUsesLayerClipping(true);
 
             layer->setTargetRenderSurface(layer->parent()->targetRenderSurface());
         }
@@ -296,10 +296,10 @@
             layer->clearRenderSurface();
 
         if (layer->masksToBounds()) {
-            IntRect scissor = transformedLayerRect;
-            scissor.intersect(layer->scissorRect());
-            layer->setScissorRect(scissor);
-            layer->setUsesLayerScissor(true);
+            IntRect clipRect = transformedLayerRect;
+            clipRect.intersect(layer->clipRect());
+            layer->setClipRect(clipRect);
+            layer->setUsesLayerClipping(true);
         }
     }
 
@@ -321,8 +321,8 @@
     // RenderSurface the layer draws into.
     if (layer->drawsContent()) {
         IntRect drawableContentRect = transformedLayerRect;
-        if (layer->usesLayerScissor())
-            drawableContentRect.intersect(layer->scissorRect());
+        if (layer->usesLayerClipping())
+            drawableContentRect.intersect(layer->clipRect());
         layer->setDrawableContentRect(drawableContentRect);
     } else
         layer->setDrawableContentRect(IntRect());
@@ -388,9 +388,9 @@
         // Don't clip if the layer is reflected as the reflection shouldn't be
         // clipped.
         if (!layer->replicaLayer()) {
-            if (!renderSurface->scissorRect().isEmpty() && !clippedContentRect.isEmpty()) {
-                IntRect surfaceScissorRect = CCLayerTreeHostCommon::calculateVisibleRect(renderSurface->scissorRect(), clippedContentRect, renderSurface->originTransform());
-                clippedContentRect.intersect(surfaceScissorRect);
+            if (!renderSurface->clipRect().isEmpty() && !clippedContentRect.isEmpty()) {
+                IntRect surfaceClipRect = CCLayerTreeHostCommon::calculateVisibleRect(renderSurface->clipRect(), clippedContentRect, renderSurface->originTransform());
+                clippedContentRect.intersect(surfaceClipRect);
             }
             FloatPoint clippedSurfaceCenter = FloatRect(clippedContentRect).center();
             centerOffsetDueToClipping = clippedSurfaceCenter - surfaceCenter;
@@ -407,8 +407,8 @@
         renderSurface->setContentRect(clippedContentRect);
 
         // Since the layer starts a new render surface we need to adjust its
-        // scissor rect to be expressed in the new surface's coordinate system.
-        layer->setScissorRect(layer->drawableContentRect());
+        // clipRect to be expressed in the new surface's coordinate system.
+        layer->setClipRect(layer->drawableContentRect());
 
         // Adjust the origin of the transform to be the center of the render surface.
         TransformationMatrix drawTransform = renderSurface->originTransform();

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.h (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.h	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.h	2011-11-04 22:16:25 UTC (rev 99327)
@@ -59,8 +59,8 @@
     ASSERT(layer->targetRenderSurface());
     IntRect targetSurfaceRect = layer->targetRenderSurface()->contentRect();
 
-    if (layer->usesLayerScissor())
-        targetSurfaceRect.intersect(layer->scissorRect());
+    if (layer->usesLayerClipping())
+        targetSurfaceRect.intersect(layer->clipRect());
 
     if (targetSurfaceRect.isEmpty() || layer->contentBounds().isEmpty())
         return targetSurfaceRect;

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -112,8 +112,8 @@
     if (!m_maskLayer && m_owningLayer->replicaLayer())
         replicaMaskLayer = m_owningLayer->replicaLayer()->maskLayer();
 
-    if (m_owningLayer->parent() && m_owningLayer->parent()->usesLayerScissor())
-        layerRenderer->setScissorToRect(m_scissorRect);
+    if (m_owningLayer->parent() && m_owningLayer->parent()->usesLayerClipping())
+        layerRenderer->setScissorToRect(m_clipRect);
     else
         GLC(layerRenderer->context(), layerRenderer->context()->disable(GraphicsContext3D::SCISSOR_TEST));
 

Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h (99326 => 99327)


--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCRenderSurface.h	2011-11-04 22:16:25 UTC (rev 99327)
@@ -75,8 +75,8 @@
     void setOriginTransform(const TransformationMatrix& originTransform) { m_originTransform = originTransform; }
     const TransformationMatrix& originTransform() const { return m_originTransform; }
 
-    void setScissorRect(const IntRect& scissorRect) { m_scissorRect = scissorRect; }
-    const IntRect& scissorRect() const { return m_scissorRect; }
+    void setClipRect(const IntRect& clipRect) { m_clipRect = clipRect; }
+    const IntRect& clipRect() const { return m_clipRect; }
 
     void setContentRect(const IntRect& contentRect) { m_contentRect = contentRect; }
     const IntRect& contentRect() const { return m_contentRect; }
@@ -113,7 +113,7 @@
     TransformationMatrix m_drawTransform;
     TransformationMatrix m_replicaDrawTransform;
     TransformationMatrix m_originTransform;
-    IntRect m_scissorRect;
+    IntRect m_clipRect;
     Vector<RefPtr<CCLayerImpl> > m_layerList;
 };
 

Modified: trunk/Source/WebKit/chromium/ChangeLog (99326 => 99327)


--- trunk/Source/WebKit/chromium/ChangeLog	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebKit/chromium/ChangeLog	2011-11-04 22:16:25 UTC (rev 99327)
@@ -1,3 +1,16 @@
+2011-11-04  Shawn Singh  <[email protected]>
+
+        [chromium] Re-named the original scissorRect to clipRect
+        https://bugs.webkit.org/show_bug.cgi?id=71580
+
+        Reviewed by James Robinson.
+
+        * tests/CCLayerImplTest.cpp:
+        (WebCore::TEST):
+        * tests/CCLayerTreeHostCommonTest.cpp:
+        (WebCore::TEST):
+        * tests/LayerChromiumTest.cpp:
+
 2011-11-04  Robert Sesek  <[email protected]>
 
         [chromium] Use Chromium's copy of libWebKitSystemInterfaceLeopard.a

Modified: trunk/Source/WebKit/chromium/tests/CCLayerImplTest.cpp (99326 => 99327)


--- trunk/Source/WebKit/chromium/tests/CCLayerImplTest.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebKit/chromium/tests/CCLayerImplTest.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -157,8 +157,8 @@
 
     // These properties are internal, and should not be considered "change" when they are used.
     EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setIsNonCompositedContent(true));
-    EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setScissorRect(arbitraryIntRect));
-    EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUsesLayerScissor(true));
+    EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setClipRect(arbitraryIntRect));
+    EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setUsesLayerClipping(true));
     EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawOpacity(arbitraryNumber));
     EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setTargetRenderSurface(0));
     EXECUTE_AND_VERIFY_SUBTREE_DID_NOT_CHANGE(root->setDrawTransform(arbitraryTransform));

Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp (99326 => 99327)


--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostCommonTest.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -323,7 +323,7 @@
     VERIFY_MATRIX_ALMOST_EQUAL(childTranslationToCenter, child->drawTransform());
     VERIFY_MATRIX_ALMOST_EQUAL(parentCompositeTransform, child->screenSpaceTransform());
 
-    // Without clipping and scissoring, the origin transform and draw transform (in this particular case) should be the same.
+    // Without clipping, the origin transform and draw transform (in this particular case) should be the same.
     VERIFY_MATRIX_ALMOST_EQUAL(parentCompositeTransform, child->targetRenderSurface()->originTransform());
     VERIFY_MATRIX_ALMOST_EQUAL(parentCompositeTransform, child->targetRenderSurface()->drawTransform());
 
@@ -474,12 +474,12 @@
 // FIXME:
 // continue working on https://bugs.webkit.org/show_bug.cgi?id=68942
 //  - add a test to verify clipping that changes the "center point"
-//  - add a case that checks if a render surface's drawTransform is computed correctly. For the general case, and for special cases when clipping/scissoring.
+//  - add a case that checks if a render surface's drawTransform is computed correctly. For the general case, and for special cases when clipping.
 //  - add a case that checks if a render surface's replicaTransform is computed correctly.
 //  - test all the conditions under which render surfaces are created
 //  - if possible, test all conditions under which render surfaces are not created
 //  - verify that the layer lists of render surfaces are correct, verify that "targetRenderSurface" values for each layer are correct.
-//  - test the computation of scissor rects and content rects
+//  - test the computation of clip rects and content rects
 //  - test the special cases for mask layers and replica layers
 //  - test the other functions in CCLayerTreeHostCommon
 //

Modified: trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp (99326 => 99327)


--- trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp	2011-11-04 22:09:06 UTC (rev 99326)
+++ trunk/Source/WebKit/chromium/tests/LayerChromiumTest.cpp	2011-11-04 22:16:25 UTC (rev 99327)
@@ -622,11 +622,11 @@
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setName("Test Layer"));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setVisibleLayerRect(IntRect(0, 0, 40, 50)));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setScrollPosition(IntPoint(10, 10)));
-    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setUsesLayerScissor(true));
+    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setUsesLayerClipping(true));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setIsNonCompositedContent(true));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setReplicaLayer(dummyLayer.get()));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setDrawOpacity(0.5f));
-    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setScissorRect(IntRect(3, 3, 8, 8)));
+    EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setClipRect(IntRect(3, 3, 8, 8)));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setTargetRenderSurface(0));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setDrawTransform(TransformationMatrix()));
     EXECUTE_AND_VERIFY_NOTIFY_SYNC_BEHAVIOR(mockDelegate, 0, testLayer->setScreenSpaceTransform(TransformationMatrix()));
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to