summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp8
-rw-r--r--Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h2
-rw-r--r--Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp2
4 files changed, 4 insertions, 10 deletions
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
index 7e70bbb0d..d409d9a65 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp
@@ -36,9 +36,7 @@
#include "TextureMapperPlatformLayer.h"
#include <wtf/CurrentTime.h>
#include <wtf/HashMap.h>
-#ifndef NDEBUG
#include <wtf/TemporaryChange.h>
-#endif
#include <wtf/text/CString.h>
namespace WebCore {
@@ -102,9 +100,7 @@ void CoordinatedGraphicsLayer::didChangeGeometry()
CoordinatedGraphicsLayer::CoordinatedGraphicsLayer(GraphicsLayerClient* client)
: GraphicsLayer(client)
-#ifndef NDEBUG
, m_isPurging(false)
-#endif
, m_shouldUpdateVisibleRect(true)
, m_shouldSyncLayerState(true)
, m_shouldSyncChildren(true)
@@ -996,6 +992,8 @@ void CoordinatedGraphicsLayer::removeTile(uint32_t tileID)
{
ASSERT(m_coordinator);
ASSERT(m_coordinator->isFlushingLayerChanges() || m_isPurging);
+ if (m_isPurging)
+ return;
m_layerState.tilesToRemove.append(tileID);
}
@@ -1047,9 +1045,7 @@ void CoordinatedGraphicsLayer::updateContentBuffers()
void CoordinatedGraphicsLayer::purgeBackingStores()
{
-#ifndef NDEBUG
TemporaryChange<bool> updateModeProtector(m_isPurging, true);
-#endif
m_mainBackingStore.clear();
m_previousBackingStore.clear();
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
index cfbc2135d..0c7ef5daf 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h
@@ -218,9 +218,7 @@ private:
FloatPoint m_adjustedPosition;
FloatPoint3D m_adjustedAnchorPoint;
-#ifndef NDEBUG
bool m_isPurging;
-#endif
bool m_shouldUpdateVisibleRect: 1;
bool m_shouldSyncLayerState: 1;
bool m_shouldSyncChildren: 1;
diff --git a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
index 32c7dace4..acd382cdb 100644
--- a/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
+++ b/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
@@ -690,8 +690,6 @@ void CoordinatedGraphicsScene::purgeGLResources()
m_rootLayer.clear();
m_rootLayerID = InvalidCoordinatedLayerID;
- m_layers.clear();
- m_fixedLayers.clear();
m_textureMapper.clear();
m_backingStores.clear();
m_backingStoresWithPendingBuffers.clear();
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
index 4d8210329..fa6f276b7 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
@@ -212,6 +212,8 @@ void CoordinatedLayerTreeHost::renderNextFrame()
void CoordinatedLayerTreeHost::purgeBackingStores()
{
+ // Wait for CoordinatedGraphicsScene::setActive(true) to be called.
+ m_isWaitingForRenderer = true;
m_coordinator->purgeBackingStores();
}