Title: [88822] trunk
- Revision
- 88822
- Author
- [email protected]
- Date
- 2011-06-14 10:44:45 -0700 (Tue, 14 Jun 2011)
Log Message
2011-06-13 Adrienne Walker <[email protected]>
Reviewed by James Robinson.
[chromium] Disable drawing for huge mask layers
https://bugs.webkit.org/show_bug.cgi?id=62607
* platform/chromium/compositing/huge-mask-layer-expected.txt: Added.
* platform/chromium/compositing/huge-mask-layer.html: Added.
2011-06-13 Adrienne Walker <[email protected]>
Reviewed by James Robinson.
[chromium] Disable drawing for huge mask layers
https://bugs.webkit.org/show_bug.cgi?id=62607
Because masks have a different layer size than the layer they are
masking, they are untiled. If they are too large to be contained
within a single texture, then they should just be disabled.
Test: platform/chromium/compositing/huge-mask-layer.html
* platform/graphics/chromium/ContentLayerChromium.cpp:
(WebCore::ContentLayerChromium::drawsContent):
(WebCore::ContentLayerChromium::paintContentsIfDirty):
* platform/graphics/chromium/LayerTilerChromium.h:
(WebCore::LayerTilerChromium::getSingleTexture):
(WebCore::LayerTilerChromium::numTiles):
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (88821 => 88822)
--- trunk/LayoutTests/ChangeLog 2011-06-14 17:41:02 UTC (rev 88821)
+++ trunk/LayoutTests/ChangeLog 2011-06-14 17:44:45 UTC (rev 88822)
@@ -1,3 +1,13 @@
+2011-06-13 Adrienne Walker <[email protected]>
+
+ Reviewed by James Robinson.
+
+ [chromium] Disable drawing for huge mask layers
+ https://bugs.webkit.org/show_bug.cgi?id=62607
+
+ * platform/chromium/compositing/huge-mask-layer-expected.txt: Added.
+ * platform/chromium/compositing/huge-mask-layer.html: Added.
+
2011-06-14 Dimitri Glazkov <[email protected]>
[Chromium] Add expectations for flaky tests.
Added: trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer-expected.txt (0 => 88822)
--- trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer-expected.txt (rev 0)
+++ trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer-expected.txt 2011-06-14 17:44:45 UTC (rev 88822)
@@ -0,0 +1 @@
+
Property changes on: trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer-expected.txt
___________________________________________________________________
Added: svn:eol-style
Added: trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer.html (0 => 88822)
--- trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer.html (rev 0)
+++ trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer.html 2011-06-14 17:44:45 UTC (rev 88822)
@@ -0,0 +1,20 @@
+<html>
+<head>
+ <style>
+ .box {
+ height: 10000000px;
+ width: 100px;
+ -webkit-perspective: 100;
+ -webkit-mask-box-image: url("bogus.png");
+ }
+ </style>
+ <script>
+ if (window.layoutTestController)
+ layoutTestController.dumpAsText();
+ </script>
+</head>
+<body>
+ <!-- This should not crash -->
+ <div class="box"></div>
+</body>
+</html>
Property changes on: trunk/LayoutTests/platform/chromium/compositing/huge-mask-layer.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (88821 => 88822)
--- trunk/Source/WebCore/ChangeLog 2011-06-14 17:41:02 UTC (rev 88821)
+++ trunk/Source/WebCore/ChangeLog 2011-06-14 17:44:45 UTC (rev 88822)
@@ -1,3 +1,23 @@
+2011-06-13 Adrienne Walker <[email protected]>
+
+ Reviewed by James Robinson.
+
+ [chromium] Disable drawing for huge mask layers
+ https://bugs.webkit.org/show_bug.cgi?id=62607
+
+ Because masks have a different layer size than the layer they are
+ masking, they are untiled. If they are too large to be contained
+ within a single texture, then they should just be disabled.
+
+ Test: platform/chromium/compositing/huge-mask-layer.html
+
+ * platform/graphics/chromium/ContentLayerChromium.cpp:
+ (WebCore::ContentLayerChromium::drawsContent):
+ (WebCore::ContentLayerChromium::paintContentsIfDirty):
+ * platform/graphics/chromium/LayerTilerChromium.h:
+ (WebCore::LayerTilerChromium::getSingleTexture):
+ (WebCore::LayerTilerChromium::numTiles):
+
2011-06-14 Viatcheslav Ostapenko <[email protected]>
Reviewed by Laszlo Gombos.
Modified: trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp (88821 => 88822)
--- trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp 2011-06-14 17:41:02 UTC (rev 88821)
+++ trunk/Source/WebCore/platform/graphics/chromium/ContentLayerChromium.cpp 2011-06-14 17:44:45 UTC (rev 88822)
@@ -109,6 +109,9 @@
dirty.intersect(layerBounds());
m_tiler->invalidateRect(dirty);
+ if (!drawsContent())
+ return;
+
m_tiler->prepareToUpdate(layerRect);
m_dirtyRect = FloatRect();
}
@@ -218,7 +221,16 @@
bool ContentLayerChromium::drawsContent() const
{
- return m_owner && m_owner->drawsContent() && (!m_tiler || !m_tiler->skipsDraw());
+ if (!m_owner || !m_owner->drawsContent())
+ return false;
+
+ if (!m_tiler)
+ return true;
+
+ if (m_tilingOption == NeverTile && m_tiler->numTiles() > 1)
+ return false;
+
+ return !m_tiler->skipsDraw();
}
void ContentLayerChromium::createTilerIfNeeded()
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp (88821 => 88822)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp 2011-06-14 17:41:02 UTC (rev 88821)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp 2011-06-14 17:44:45 UTC (rev 88822)
@@ -83,6 +83,9 @@
LayerTexture* LayerTilerChromium::getSingleTexture()
{
+ if (m_tilingData.numTiles() != 1)
+ return 0;
+
Tile* tile = tileAt(0, 0);
return tile ? tile->texture() : 0;
}
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h (88821 => 88822)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h 2011-06-14 17:41:02 UTC (rev 88821)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.h 2011-06-14 17:44:45 UTC (rev 88822)
@@ -61,6 +61,8 @@
// Draw all tiles that intersect with the content rect.
void draw(const IntRect& contentRect, const TransformationMatrix&, float opacity);
+ int numTiles() const { return m_tilingData.numTiles(); }
+
// Set position of this tiled layer in content space.
void setLayerPosition(const IntPoint& position);
// Change the tile size. This may invalidate all the existing tiles.
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes