Title: [135986] trunk/Source/WebCore
- Revision
- 135986
- Author
- [email protected]
- Date
- 2012-11-28 01:43:19 -0800 (Wed, 28 Nov 2012)
Log Message
[Texmap] REGRESSION(r135620) QtTestBrowser crashes on Google-gravity.
https://bugs.webkit.org/show_bug.cgi?id=103410
Patch by Huang Dongsung <[email protected]> on 2012-11-28
Reviewed by Noam Rosenthal.
GraphicsLayerTextureMapper::updateBackingStore() should return early
before TextureMapper is set.
GraphicsLayer::FlushCompositingState() can be called by RenderLayerBacking. It
means this method can be called before creating TextureMapper. So
TextureMapperLayer::flushCompositingState() checks and returns early if
TextureMapper was not created.
However, GraphicsLayerTextureMapper::updateBackingStore() expects that TextureMapper
always exists. updateBackingStore should also return early when TextureMapper
was not created.
No new tests. Covered by existing tests.
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
(WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
(WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
(WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (135985 => 135986)
--- trunk/Source/WebCore/ChangeLog 2012-11-28 09:04:25 UTC (rev 135985)
+++ trunk/Source/WebCore/ChangeLog 2012-11-28 09:43:19 UTC (rev 135986)
@@ -1,3 +1,30 @@
+2012-11-28 Huang Dongsung <[email protected]>
+
+ [Texmap] REGRESSION(r135620) QtTestBrowser crashes on Google-gravity.
+ https://bugs.webkit.org/show_bug.cgi?id=103410
+
+ Reviewed by Noam Rosenthal.
+
+ GraphicsLayerTextureMapper::updateBackingStore() should return early
+ before TextureMapper is set.
+
+ GraphicsLayer::FlushCompositingState() can be called by RenderLayerBacking. It
+ means this method can be called before creating TextureMapper. So
+ TextureMapperLayer::flushCompositingState() checks and returns early if
+ TextureMapper was not created.
+
+ However, GraphicsLayerTextureMapper::updateBackingStore() expects that TextureMapper
+ always exists. updateBackingStore should also return early when TextureMapper
+ was not created.
+
+ No new tests. Covered by existing tests.
+
+ * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
+ (WebCore::GraphicsLayerTextureMapper::setNeedsDisplay):
+ (WebCore::GraphicsLayerTextureMapper::setNeedsDisplayInRect):
+ (WebCore::GraphicsLayerTextureMapper::didFlushCompositingState):
+ (WebCore::GraphicsLayerTextureMapper::prepareBackingStore):
+
2012-11-28 Tommy Widenflycht <[email protected]>
Add basic implementation for MediaStreamAudioDestinationNode
Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp (135985 => 135986)
--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2012-11-28 09:04:25 UTC (rev 135985)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.cpp 2012-11-28 09:43:19 UTC (rev 135986)
@@ -90,6 +90,9 @@
*/
void GraphicsLayerTextureMapper::setNeedsDisplay()
{
+ if (!m_hasOwnBackingStore)
+ return;
+
m_needsDisplay = true;
notifyChange(TextureMapperLayer::DisplayChange);
addRepaintRect(FloatRect(FloatPoint(), m_size));
@@ -107,6 +110,9 @@
*/
void GraphicsLayerTextureMapper::setNeedsDisplayInRect(const FloatRect& rect)
{
+ if (!m_hasOwnBackingStore)
+ return;
+
if (m_needsDisplay)
return;
m_needsDisplayRect.unite(rect);
@@ -404,8 +410,6 @@
{
updateBackingStore();
m_changeMask = 0;
- m_needsDisplay = false;
- m_needsDisplayRect = IntRect();
}
void GraphicsLayerTextureMapper::didFlushCompositingStateRecursive()
@@ -430,6 +434,10 @@
void GraphicsLayerTextureMapper::prepareBackingStore()
{
+ TextureMapper* textureMapper = m_layer->textureMapper();
+ if (!textureMapper)
+ return;
+
if (!shouldHaveBackingStore()) {
m_backingStore.clear();
return;
@@ -441,9 +449,6 @@
if (dirtyRect.isEmpty())
return;
- TextureMapper* textureMapper = m_layer->textureMapper();
- ASSERT(textureMapper);
-
if (!m_backingStore)
m_backingStore = TextureMapperTiledBackingStore::create();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes