Title: [122511] trunk/Source
- Revision
- 122511
- Author
- [email protected]
- Date
- 2012-07-12 14:42:31 -0700 (Thu, 12 Jul 2012)
Log Message
[chromium] The root layer should not try create a second RenderSurface for itself
https://bugs.webkit.org/show_bug.cgi?id=91124
Reviewed by Adrienne Walker.
Source/WebCore:
Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
* platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
(WebCore::subtreeShouldRenderToSeparateSurface):
Source/WebKit/chromium:
* tests/CCLayerTreeHostImplTest.cpp:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (122510 => 122511)
--- trunk/Source/WebCore/ChangeLog 2012-07-12 21:42:27 UTC (rev 122510)
+++ trunk/Source/WebCore/ChangeLog 2012-07-12 21:42:31 UTC (rev 122511)
@@ -1,3 +1,15 @@
+2012-07-12 Dana Jansens <[email protected]>
+
+ [chromium] The root layer should not try create a second RenderSurface for itself
+ https://bugs.webkit.org/show_bug.cgi?id=91124
+
+ Reviewed by Adrienne Walker.
+
+ Tests: CCLayerTreeHostImplTest.rootLayerDoesntCreateExtraSurface
+
+ * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
+ (WebCore::subtreeShouldRenderToSeparateSurface):
+
2012-07-12 Adam Barth <[email protected]>
Regression (r122359) Layout Test html5lib/runner.html is failing
Modified: trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp (122510 => 122511)
--- trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-07-12 21:42:27 UTC (rev 122510)
+++ trunk/Source/WebCore/platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp 2012-07-12 21:42:31 UTC (rev 122511)
@@ -261,6 +261,11 @@
template<typename LayerType>
static bool subtreeShouldRenderToSeparateSurface(LayerType* layer, bool axisAlignedWithRespectToParent)
{
+ // The root layer has a special render surface that is set up externally, so
+ // it shouldn't be treated as a surface in this code.
+ if (!layer->parent())
+ return false;
+
// Cache this value, because otherwise it walks the entire subtree several times.
bool descendantDrawsContent = layer->descendantDrawsContent();
Modified: trunk/Source/WebKit/chromium/ChangeLog (122510 => 122511)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-07-12 21:42:27 UTC (rev 122510)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-07-12 21:42:31 UTC (rev 122511)
@@ -1,3 +1,12 @@
+2012-07-12 Dana Jansens <[email protected]>
+
+ [chromium] The root layer should not try create a second RenderSurface for itself
+ https://bugs.webkit.org/show_bug.cgi?id=91124
+
+ Reviewed by Adrienne Walker.
+
+ * tests/CCLayerTreeHostImplTest.cpp:
+
2012-07-12 Eric Penner <[email protected]>
[chromium] Use CCTexture/TextureAllocator and remove TextureManager
Modified: trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp (122510 => 122511)
--- trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-07-12 21:42:27 UTC (rev 122510)
+++ trunk/Source/WebKit/chromium/tests/CCLayerTreeHostImplTest.cpp 2012-07-12 21:42:31 UTC (rev 122511)
@@ -1628,6 +1628,28 @@
EXPECT_EQ(expectedSwapRect.height(), actualSwapRect.height());
}
+TEST_F(CCLayerTreeHostImplTest, rootLayerDoesntCreateExtraSurface)
+{
+ CCLayerImpl* root = new FakeDrawableCCLayerImpl(1);
+ CCLayerImpl* child = new FakeDrawableCCLayerImpl(2);
+ child->setAnchorPoint(FloatPoint(0, 0));
+ child->setBounds(IntSize(10, 10));
+ child->setDrawsContent(true);
+ root->setAnchorPoint(FloatPoint(0, 0));
+ root->setBounds(IntSize(10, 10));
+ root->setDrawsContent(true);
+ root->setOpacity(0.7f);
+ root->addChild(adoptPtr(child));
+
+ m_hostImpl->setRootLayer(adoptPtr(root));
+
+ CCLayerTreeHostImpl::FrameData frame;
+
+ EXPECT_TRUE(m_hostImpl->prepareToDraw(frame));
+ EXPECT_EQ(1u, frame.renderSurfaceLayerList->size());
+ EXPECT_EQ(1u, frame.renderPasses.size());
+}
+
} // namespace
class FakeLayerWithQuads : public CCLayerImpl {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes