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

Side by Side Diff: cc/trees/layer_tree_impl.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 typo 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_impl.h" 5 #include "cc/trees/layer_tree_impl.h"
6 6
7 #include "base/debug/trace_event.h" 7 #include "base/debug/trace_event.h"
8 #include "cc/animation/keyframed_animation_curve.h" 8 #include "cc/animation/keyframed_animation_curve.h"
9 #include "cc/animation/scrollbar_animation_controller.h" 9 #include "cc/animation/scrollbar_animation_controller.h"
10 #include "cc/debug/traced_value.h" 10 #include "cc/debug/traced_value.h"
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 layer_tree_host_impl_->CreateUIResource(req.id, req.bitmap); 622 layer_tree_host_impl_->CreateUIResource(req.id, req.bitmap);
623 break; 623 break;
624 case UIResourceRequest::UIResourceDelete: 624 case UIResourceRequest::UIResourceDelete:
625 layer_tree_host_impl_->DeleteUIResource(req.id); 625 layer_tree_host_impl_->DeleteUIResource(req.id);
626 break; 626 break;
627 case UIResourceRequest::UIResourceInvalidRequest: 627 case UIResourceRequest::UIResourceInvalidRequest:
628 NOTREACHED(); 628 NOTREACHED();
629 break; 629 break;
630 } 630 }
631 } 631 }
632
633 // If all UI resource evictions were not recreated by processing this queue,
634 // then another commit is required.
635 if (layer_tree_host_impl_->EvictedUIResourcesExist())
636 layer_tree_host_impl_->SetNeedsCommit();
632 } 637 }
633 638
634 void LayerTreeImpl::AddLayerWithCopyOutputRequest(LayerImpl* layer) { 639 void LayerTreeImpl::AddLayerWithCopyOutputRequest(LayerImpl* layer) {
635 // Only the active tree needs to know about layers with copy requests, as 640 // Only the active tree needs to know about layers with copy requests, as
636 // they are aborted if not serviced during draw. 641 // they are aborted if not serviced during draw.
637 DCHECK(IsActiveTree()); 642 DCHECK(IsActiveTree());
638 643
639 DCHECK(std::find(layers_with_copy_output_request_.begin(), 644 DCHECK(std::find(layers_with_copy_output_request_.begin(),
640 layers_with_copy_output_request_.end(), 645 layers_with_copy_output_request_.end(),
641 layer) == layers_with_copy_output_request_.end()); 646 layer) == layers_with_copy_output_request_.end());
(...skipping 16 matching lines...) Expand all
658 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() 663 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest()
659 const { 664 const {
660 // Only the active tree needs to know about layers with copy requests, as 665 // Only the active tree needs to know about layers with copy requests, as
661 // they are aborted if not serviced during draw. 666 // they are aborted if not serviced during draw.
662 DCHECK(IsActiveTree()); 667 DCHECK(IsActiveTree());
663 668
664 return layers_with_copy_output_request_; 669 return layers_with_copy_output_request_;
665 } 670 }
666 671
667 } // namespace cc 672 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_context.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698