summaryrefslogtreecommitdiffstats
path: root/cc/single_thread_proxy.cc
diff options
context:
space:
mode:
authorreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-17 23:42:00 +0000
committerreveman@chromium.org <reveman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-17 23:42:00 +0000
commit6f90b9e6f0ad978c11510fa362791aa896fdde7d (patch)
tree4dfa92539bba970b5f1211bd3ec746ef641dcee8 /cc/single_thread_proxy.cc
parent7522077b67bd9aa3ef0630b83d1572bdd678e88c (diff)
downloadchromium_src-6f90b9e6f0ad978c11510fa362791aa896fdde7d.zip
chromium_src-6f90b9e6f0ad978c11510fa362791aa896fdde7d.tar.gz
chromium_src-6f90b9e6f0ad978c11510fa362791aa896fdde7d.tar.bz2
cc: Fix resource eviction with impl-side painting.
When evicting resources with impl-side painting we need wait until the active tree is without evicted resources before we can draw. This moves the ContentsTexturesPurged state from LTHI to the LTI and makes LTHI::canDraw() return false when the active LTI has ContentsTexturesPurged set. The result is no change in behavior when we only have one tree, while with impl-side painting when we have two trees, canDraw() will not return true until the new tree without ContentsTexturesPurged set has been activated. BUG=170157 Review URL: https://chromiumcodereview.appspot.com/11886091 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@177532 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/single_thread_proxy.cc')
-rw-r--r--cc/single_thread_proxy.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/cc/single_thread_proxy.cc b/cc/single_thread_proxy.cc
index 1dc1e6b..f4b7f29 100644
--- a/cc/single_thread_proxy.cc
+++ b/cc/single_thread_proxy.cc
@@ -7,6 +7,7 @@
#include "base/debug/trace_event.h"
#include "cc/draw_quad.h"
#include "cc/layer_tree_host.h"
+#include "cc/layer_tree_impl.h"
#include "cc/output_surface.h"
#include "cc/prioritized_resource_manager.h"
#include "cc/resource_update_controller.h"
@@ -257,7 +258,7 @@ void SingleThreadProxy::stop()
DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
DebugScopedSetImplThread impl(this);
- if (!m_layerTreeHostImpl->contentsTexturesPurged())
+ if (!m_layerTreeHostImpl->activeTree()->ContentsTexturesPurged())
m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl->resourceProvider());
m_layerTreeHostImpl.reset();
}
@@ -344,9 +345,6 @@ bool SingleThreadProxy::commitAndComposite()
scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQueue);
m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAllocationLimitBytes());
- if (m_layerTreeHostImpl->contentsTexturesPurged())
- m_layerTreeHostImpl->resetContentsTexturesPurged();
-
m_layerTreeHost->willCommit();
doCommit(queue.Pass());
bool result = doComposite();