Title: [87409] trunk/Source/WebCore
- Revision
- 87409
- Author
- [email protected]
- Date
- 2011-05-26 12:06:47 -0700 (Thu, 26 May 2011)
Log Message
2011-05-26 Adrienne Walker <[email protected]>
Reviewed by James Robinson.
[chromium] Be robust to empty viewports in the compositor
https://bugs.webkit.org/show_bug.cgi?id=61545
It's possible for a frame to be requested to be drawn before it is
non-empty. The compositor should be robust to that possibility. The
changes in LayerTilerChromium are the only required changes to handle
this, but having an early out in LayerRendererChromium seemed like a
good sanity check.
* platform/graphics/chromium/LayerRendererChromium.cpp:
(WebCore::LayerRendererChromium::updateAndDrawLayers):
(WebCore::LayerRendererChromium::drawLayers):
* platform/graphics/chromium/LayerTilerChromium.cpp:
(WebCore::LayerTilerChromium::prepareToUpdate):
(WebCore::LayerTilerChromium::updateRect):
(WebCore::LayerTilerChromium::draw):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (87408 => 87409)
--- trunk/Source/WebCore/ChangeLog 2011-05-26 18:54:25 UTC (rev 87408)
+++ trunk/Source/WebCore/ChangeLog 2011-05-26 19:06:47 UTC (rev 87409)
@@ -1,3 +1,24 @@
+2011-05-26 Adrienne Walker <[email protected]>
+
+ Reviewed by James Robinson.
+
+ [chromium] Be robust to empty viewports in the compositor
+ https://bugs.webkit.org/show_bug.cgi?id=61545
+
+ It's possible for a frame to be requested to be drawn before it is
+ non-empty. The compositor should be robust to that possibility. The
+ changes in LayerTilerChromium are the only required changes to handle
+ this, but having an early out in LayerRendererChromium seemed like a
+ good sanity check.
+
+ * platform/graphics/chromium/LayerRendererChromium.cpp:
+ (WebCore::LayerRendererChromium::updateAndDrawLayers):
+ (WebCore::LayerRendererChromium::drawLayers):
+ * platform/graphics/chromium/LayerTilerChromium.cpp:
+ (WebCore::LayerTilerChromium::prepareToUpdate):
+ (WebCore::LayerTilerChromium::updateRect):
+ (WebCore::LayerTilerChromium::draw):
+
2011-05-26 Emil A Eklund <[email protected]>
Reviewed by Eric Seidel.
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp (87408 => 87409)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2011-05-26 18:54:25 UTC (rev 87408)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerRendererChromium.cpp 2011-05-26 19:06:47 UTC (rev 87409)
@@ -211,6 +211,9 @@
void LayerRendererChromium::updateAndDrawLayers()
{
+ if (m_viewportVisibleRect.isEmpty())
+ return;
+
// FIXME: use the frame begin time from the overall compositor scheduler.
// This value is currently inaccessible because it is up in Chromium's
// RenderWidget.
@@ -434,6 +437,9 @@
void LayerRendererChromium::drawLayers(const LayerList& renderSurfaceLayerList)
{
+ if (m_viewportVisibleRect.isEmpty())
+ return;
+
TRACE_EVENT("LayerRendererChromium::drawLayers", this, 0);
CCLayerImpl* rootDrawLayer = m_rootLayer->ccLayerImpl();
makeContextCurrent();
Modified: trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp (87408 => 87409)
--- trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp 2011-05-26 18:54:25 UTC (rev 87408)
+++ trunk/Source/WebCore/platform/graphics/chromium/LayerTilerChromium.cpp 2011-05-26 19:06:47 UTC (rev 87409)
@@ -222,8 +222,10 @@
void LayerTilerChromium::prepareToUpdate(const IntRect& contentRect)
{
- if (m_skipsDraw)
+ if (m_skipsDraw || contentRect.isEmpty()) {
+ m_updateRect = IntRect();
return;
+ }
// Invalidate old tiles that were previously used but aren't in use this
// frame so that they can get reused for new tiles.
@@ -263,7 +265,7 @@
void LayerTilerChromium::updateRect()
{
// Painting could cause compositing to get turned off, which may cause the tiler to become invalidated mid-update.
- if (!m_tilingData.totalSizeX() || !m_tilingData.totalSizeY())
+ if (!m_tilingData.totalSizeX() || !m_tilingData.totalSizeY() || m_updateRect.isEmpty())
return;
GraphicsContext3D* context = layerRendererContext();
@@ -333,7 +335,7 @@
void LayerTilerChromium::draw(const IntRect& contentRect, const TransformationMatrix& globalTransform, float opacity)
{
- if (m_skipsDraw || !m_tiles.size())
+ if (m_skipsDraw || !m_tiles.size() || contentRect.isEmpty())
return;
GraphicsContext3D* context = layerRendererContext();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes