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

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

Issue 23740010: Revert 223162 "Update the nine patch layer to use UI resources" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
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 603 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 ResourceProvider::ResourceId LayerTreeImpl::ResourceIdForUIResource( 614 ResourceProvider::ResourceId LayerTreeImpl::ResourceIdForUIResource(
615 UIResourceId uid) const { 615 UIResourceId uid) const {
616 return layer_tree_host_impl_->ResourceIdForUIResource(uid); 616 return layer_tree_host_impl_->ResourceIdForUIResource(uid);
617 } 617 }
618 618
619 void LayerTreeImpl::ProcessUIResourceRequestQueue() { 619 void LayerTreeImpl::ProcessUIResourceRequestQueue() {
620 while (ui_resource_request_queue_.size() > 0) { 620 while (ui_resource_request_queue_.size() > 0) {
621 UIResourceRequest req = ui_resource_request_queue_.front(); 621 UIResourceRequest req = ui_resource_request_queue_.front();
622 ui_resource_request_queue_.pop_front(); 622 ui_resource_request_queue_.pop_front();
623 623
624 switch (req.GetType()) { 624 switch (req.type) {
625 case UIResourceRequest::UIResourceCreate: 625 case UIResourceRequest::UIResourceCreate:
626 layer_tree_host_impl_->CreateUIResource(req.GetId(), req.GetBitmap()); 626 layer_tree_host_impl_->CreateUIResource(req.id, req.bitmap);
627 break; 627 break;
628 case UIResourceRequest::UIResourceDelete: 628 case UIResourceRequest::UIResourceDelete:
629 layer_tree_host_impl_->DeleteUIResource(req.GetId()); 629 layer_tree_host_impl_->DeleteUIResource(req.id);
630 break; 630 break;
631 case UIResourceRequest::UIResourceInvalidRequest: 631 case UIResourceRequest::UIResourceInvalidRequest:
632 NOTREACHED(); 632 NOTREACHED();
633 break; 633 break;
634 } 634 }
635 } 635 }
636 636
637 // If all UI resource evictions were not recreated by processing this queue, 637 // If all UI resource evictions were not recreated by processing this queue,
638 // then another commit is required. 638 // then another commit is required.
639 if (layer_tree_host_impl_->EvictedUIResourcesExist()) 639 if (layer_tree_host_impl_->EvictedUIResourcesExist())
(...skipping 27 matching lines...) Expand all
667 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() 667 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest()
668 const { 668 const {
669 // Only the active tree needs to know about layers with copy requests, as 669 // Only the active tree needs to know about layers with copy requests, as
670 // they are aborted if not serviced during draw. 670 // they are aborted if not serviced during draw.
671 DCHECK(IsActiveTree()); 671 DCHECK(IsActiveTree());
672 672
673 return layers_with_copy_output_request_; 673 return layers_with_copy_output_request_;
674 } 674 }
675 675
676 } // namespace cc 676 } // namespace cc
OLDNEW
« no previous file with comments | « trunk/src/cc/trees/layer_tree_impl.h ('k') | trunk/src/content/browser/renderer_host/compositor_impl_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698