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

Side by Side Diff: cc/trees/layer_tree_impl.cc

Issue 22870016: Update the nine patch layer to use UI resources (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased 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
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 ResourceProvider::ResourceId LayerTreeImpl::ResourceIdForUIResource( 650 ResourceProvider::ResourceId LayerTreeImpl::ResourceIdForUIResource(
651 UIResourceId uid) const { 651 UIResourceId uid) const {
652 return layer_tree_host_impl_->ResourceIdForUIResource(uid); 652 return layer_tree_host_impl_->ResourceIdForUIResource(uid);
653 } 653 }
654 654
655 void LayerTreeImpl::ProcessUIResourceRequestQueue() { 655 void LayerTreeImpl::ProcessUIResourceRequestQueue() {
656 while (ui_resource_request_queue_.size() > 0) { 656 while (ui_resource_request_queue_.size() > 0) {
657 UIResourceRequest req = ui_resource_request_queue_.front(); 657 UIResourceRequest req = ui_resource_request_queue_.front();
658 ui_resource_request_queue_.pop_front(); 658 ui_resource_request_queue_.pop_front();
659 659
660 switch (req.type) { 660 switch (req.GetType()) {
661 case UIResourceRequest::UIResourceCreate: 661 case UIResourceRequest::UIResourceCreate:
662 layer_tree_host_impl_->CreateUIResource(req.id, req.bitmap); 662 layer_tree_host_impl_->CreateUIResource(req.GetId(), req.GetBitmap());
663 break; 663 break;
664 case UIResourceRequest::UIResourceDelete: 664 case UIResourceRequest::UIResourceDelete:
665 layer_tree_host_impl_->DeleteUIResource(req.id); 665 layer_tree_host_impl_->DeleteUIResource(req.GetId());
666 break; 666 break;
667 case UIResourceRequest::UIResourceInvalidRequest: 667 case UIResourceRequest::UIResourceInvalidRequest:
668 NOTREACHED(); 668 NOTREACHED();
669 break; 669 break;
670 } 670 }
671 } 671 }
672 672
673 // If all UI resource evictions were not recreated by processing this queue, 673 // If all UI resource evictions were not recreated by processing this queue,
674 // then another commit is required. 674 // then another commit is required.
675 if (layer_tree_host_impl_->EvictedUIResourcesExist()) 675 if (layer_tree_host_impl_->EvictedUIResourcesExist())
(...skipping 27 matching lines...) Expand all
703 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() 703 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest()
704 const { 704 const {
705 // Only the active tree needs to know about layers with copy requests, as 705 // Only the active tree needs to know about layers with copy requests, as
706 // they are aborted if not serviced during draw. 706 // they are aborted if not serviced during draw.
707 DCHECK(IsActiveTree()); 707 DCHECK(IsActiveTree());
708 708
709 return layers_with_copy_output_request_; 709 return layers_with_copy_output_request_;
710 } 710 }
711 711
712 } // namespace cc 712 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698