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

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: updated dchecks in ui_resource_bitmap 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
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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 ResourceProvider::ResourceId LayerTreeImpl::ResourceIdForUIResource( 610 ResourceProvider::ResourceId LayerTreeImpl::ResourceIdForUIResource(
611 UIResourceId uid) const { 611 UIResourceId uid) const {
612 return layer_tree_host_impl_->ResourceIdForUIResource(uid); 612 return layer_tree_host_impl_->ResourceIdForUIResource(uid);
613 } 613 }
614 614
615 void LayerTreeImpl::ProcessUIResourceRequestQueue() { 615 void LayerTreeImpl::ProcessUIResourceRequestQueue() {
616 while (ui_resource_request_queue_.size() > 0) { 616 while (ui_resource_request_queue_.size() > 0) {
617 UIResourceRequest req = ui_resource_request_queue_.front(); 617 UIResourceRequest req = ui_resource_request_queue_.front();
618 ui_resource_request_queue_.pop_front(); 618 ui_resource_request_queue_.pop_front();
619 619
620 switch (req.type) { 620 switch (req.GetType()) {
621 case UIResourceRequest::UIResourceCreate: 621 case UIResourceRequest::UIResourceCreate:
622 layer_tree_host_impl_->CreateUIResource(req.id, req.bitmap); 622 layer_tree_host_impl_->CreateUIResource(req.GetId(), req.GetBitmap());
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.GetId());
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 } 632 }
633 633
634 void LayerTreeImpl::AddLayerWithCopyOutputRequest(LayerImpl* layer) { 634 void LayerTreeImpl::AddLayerWithCopyOutputRequest(LayerImpl* layer) {
635 // Only the active tree needs to know about layers with copy requests, as 635 // Only the active tree needs to know about layers with copy requests, as
(...skipping 22 matching lines...) Expand all
658 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() 658 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest()
659 const { 659 const {
660 // Only the active tree needs to know about layers with copy requests, as 660 // Only the active tree needs to know about layers with copy requests, as
661 // they are aborted if not serviced during draw. 661 // they are aborted if not serviced during draw.
662 DCHECK(IsActiveTree()); 662 DCHECK(IsActiveTree());
663 663
664 return layers_with_copy_output_request_; 664 return layers_with_copy_output_request_;
665 } 665 }
666 666
667 } // namespace cc 667 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698