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_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
868 RenderingStats* stats_ptr = | 868 RenderingStats* stats_ptr = |
869 debug_state_.RecordRenderingStats() ? &stats : NULL; | 869 debug_state_.RecordRenderingStats() ? &stats : NULL; |
870 | 870 |
871 in_paint_layer_contents_ = true; | 871 in_paint_layer_contents_ = true; |
872 | 872 |
873 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list); | 873 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list); |
874 for (LayerIteratorType it = | 874 for (LayerIteratorType it = |
875 LayerIteratorType::Begin(&render_surface_layer_list); | 875 LayerIteratorType::Begin(&render_surface_layer_list); |
876 it != end; | 876 it != end; |
877 ++it) { | 877 ++it) { |
878 bool prevent_occlusion = | 878 bool prevent_occlusion = it.target_render_surface_layer()->HasCopyRequest(); |
879 it.target_render_surface_layer()->HasRequestCopyCallback(); | |
880 occlusion_tracker.EnterLayer(it, prevent_occlusion); | 879 occlusion_tracker.EnterLayer(it, prevent_occlusion); |
881 | 880 |
882 if (it.represents_target_render_surface()) { | 881 if (it.represents_target_render_surface()) { |
883 DCHECK(it->render_surface()->draw_opacity() || | 882 DCHECK(it->render_surface()->draw_opacity() || |
884 it->render_surface()->draw_opacity_is_animating()); | 883 it->render_surface()->draw_opacity_is_animating()); |
885 need_more_updates |= PaintMasksForRenderSurface(*it, queue, stats_ptr); | 884 need_more_updates |= PaintMasksForRenderSurface(*it, queue, stats_ptr); |
886 } else if (it.represents_itself()) { | 885 } else if (it.represents_itself()) { |
887 DCHECK(!it->paint_properties().bounds.IsEmpty()); | 886 DCHECK(!it->paint_properties().bounds.IsEmpty()); |
888 it->Update(queue, &occlusion_tracker, stats_ptr); | 887 it->Update(queue, &occlusion_tracker, stats_ptr); |
889 need_more_updates |= it->NeedMoreUpdates(); | 888 need_more_updates |= it->NeedMoreUpdates(); |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1017 bool start_ready_animations = true; | 1016 bool start_ready_animations = true; |
1018 (*iter).second->UpdateState(start_ready_animations, NULL); | 1017 (*iter).second->UpdateState(start_ready_animations, NULL); |
1019 } | 1018 } |
1020 } | 1019 } |
1021 | 1020 |
1022 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { | 1021 skia::RefPtr<SkPicture> LayerTreeHost::CapturePicture() { |
1023 return proxy_->CapturePicture(); | 1022 return proxy_->CapturePicture(); |
1024 } | 1023 } |
1025 | 1024 |
1026 } // namespace cc | 1025 } // namespace cc |
OLD | NEW |