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