Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1156)

Unified Diff: cc/trees/layer_tree_host.cc

Issue 23548022: [cc] Evict UIResources when the renderer is not visible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typos Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 773a689ac03749590685580a88dafb9cb92fcf0b..611d6aee0a1df4c242c2ece7b9c88a8bc557ea5c 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -444,9 +444,6 @@ void LayerTreeHost::DidLoseOutputSurface() {
if (output_surface_lost_)
return;
- bool resource_lost = true;
- RecreateUIResources(resource_lost);
-
num_failed_recreate_attempts_ = 0;
output_surface_lost_ = true;
SetNeedsCommit();
@@ -1176,7 +1173,7 @@ void LayerTreeHost::DeleteUIResource(UIResourceId uid) {
ui_resource_client_map_.erase(uid);
}
-void LayerTreeHost::RecreateUIResources(bool resource_lost) {
+void LayerTreeHost::RecreateUIResources() {
for (UIResourceClientMap::iterator iter = ui_resource_client_map_.begin();
iter != ui_resource_client_map_.end();
++iter) {
@@ -1184,6 +1181,7 @@ void LayerTreeHost::RecreateUIResources(bool resource_lost) {
UIResourceRequest request;
request.type = UIResourceRequest::UIResourceCreate;
request.id = uid;
+ bool resource_lost = true;
request.bitmap = iter->second->GetBitmap(uid, resource_lost);
DCHECK(request.bitmap.get());
ui_resource_request_queue_.push_back(request);

Powered by Google App Engine
This is Rietveld 408576698