OLD | NEW |
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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 UIResourceRequest req = ui_resource_request_queue_.front(); | 607 UIResourceRequest req = ui_resource_request_queue_.front(); |
608 ui_resource_request_queue_.pop_front(); | 608 ui_resource_request_queue_.pop_front(); |
609 | 609 |
610 switch (req.type) { | 610 switch (req.type) { |
611 case UIResourceRequest::UIResourceCreate: | 611 case UIResourceRequest::UIResourceCreate: |
612 layer_tree_host_impl_->CreateUIResource(req.id, req.bitmap); | 612 layer_tree_host_impl_->CreateUIResource(req.id, req.bitmap); |
613 break; | 613 break; |
614 case UIResourceRequest::UIResourceDelete: | 614 case UIResourceRequest::UIResourceDelete: |
615 layer_tree_host_impl_->DeleteUIResource(req.id); | 615 layer_tree_host_impl_->DeleteUIResource(req.id); |
616 break; | 616 break; |
617 default: | 617 case UIResourceRequest::UIResourceInvalidRequest: |
618 NOTREACHED(); | 618 NOTREACHED(); |
619 break; | 619 break; |
620 } | 620 } |
621 } | 621 } |
622 } | 622 } |
623 | 623 |
624 void LayerTreeImpl::AddLayerWithCopyOutputRequest(LayerImpl* layer) { | 624 void LayerTreeImpl::AddLayerWithCopyOutputRequest(LayerImpl* layer) { |
625 // Only the active tree needs to know about layers with copy requests, as | 625 // Only the active tree needs to know about layers with copy requests, as |
626 // they are aborted if not serviced during draw. | 626 // they are aborted if not serviced during draw. |
627 DCHECK(IsActiveTree()); | 627 DCHECK(IsActiveTree()); |
(...skipping 20 matching lines...) Expand all Loading... |
648 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() | 648 const std::vector<LayerImpl*> LayerTreeImpl::LayersWithCopyOutputRequest() |
649 const { | 649 const { |
650 // Only the active tree needs to know about layers with copy requests, as | 650 // Only the active tree needs to know about layers with copy requests, as |
651 // they are aborted if not serviced during draw. | 651 // they are aborted if not serviced during draw. |
652 DCHECK(IsActiveTree()); | 652 DCHECK(IsActiveTree()); |
653 | 653 |
654 return layers_with_copy_output_request_; | 654 return layers_with_copy_output_request_; |
655 } | 655 } |
656 | 656 |
657 } // namespace cc | 657 } // namespace cc |
OLD | NEW |