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 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1026 OcclusionTracker occlusion_tracker( | 1026 OcclusionTracker occlusion_tracker( |
1027 root_layer_->render_surface()->content_rect(), record_metrics_for_frame); | 1027 root_layer_->render_surface()->content_rect(), record_metrics_for_frame); |
1028 occlusion_tracker.set_minimum_tracking_size( | 1028 occlusion_tracker.set_minimum_tracking_size( |
1029 settings_.minimum_occlusion_tracking_size); | 1029 settings_.minimum_occlusion_tracking_size); |
1030 | 1030 |
1031 PrioritizeTextures(render_surface_layer_list, | 1031 PrioritizeTextures(render_surface_layer_list, |
1032 occlusion_tracker.overdraw_metrics()); | 1032 occlusion_tracker.overdraw_metrics()); |
1033 | 1033 |
1034 in_paint_layer_contents_ = true; | 1034 in_paint_layer_contents_ = true; |
1035 | 1035 |
1036 const bool prevent_occlusion = false; | |
1037 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list); | 1036 LayerIteratorType end = LayerIteratorType::End(&render_surface_layer_list); |
1038 for (LayerIteratorType it = | 1037 for (LayerIteratorType it = |
1039 LayerIteratorType::Begin(&render_surface_layer_list); | 1038 LayerIteratorType::Begin(&render_surface_layer_list); |
1040 it != end; | 1039 it != end; |
1041 ++it) { | 1040 ++it) { |
1042 occlusion_tracker.EnterLayer(it, prevent_occlusion); | 1041 occlusion_tracker.EnterLayer(it); |
1043 | 1042 |
1044 if (it.represents_target_render_surface()) { | 1043 if (it.represents_target_render_surface()) { |
1045 PaintMasksForRenderSurface( | 1044 PaintMasksForRenderSurface( |
1046 *it, queue, did_paint_content, need_more_updates); | 1045 *it, queue, did_paint_content, need_more_updates); |
1047 } else if (it.represents_itself() && it->DrawsContent()) { | 1046 } else if (it.represents_itself() && it->DrawsContent()) { |
1048 devtools_instrumentation::ScopedLayerTreeTask | 1047 devtools_instrumentation::ScopedLayerTreeTask |
1049 update_layer(devtools_instrumentation::kUpdateLayer, it->id(), id()); | 1048 update_layer(devtools_instrumentation::kUpdateLayer, it->id(), id()); |
1050 DCHECK(!it->paint_properties().bounds.IsEmpty()); | 1049 DCHECK(!it->paint_properties().bounds.IsEmpty()); |
1051 *did_paint_content |= it->Update(queue, &occlusion_tracker); | 1050 *did_paint_content |= it->Update(queue, &occlusion_tracker); |
1052 *need_more_updates |= it->NeedMoreUpdates(); | 1051 *need_more_updates |= it->NeedMoreUpdates(); |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1264 | 1263 |
1265 bool LayerTreeHost::ScheduleMicroBenchmark( | 1264 bool LayerTreeHost::ScheduleMicroBenchmark( |
1266 const std::string& benchmark_name, | 1265 const std::string& benchmark_name, |
1267 scoped_ptr<base::Value> value, | 1266 scoped_ptr<base::Value> value, |
1268 const MicroBenchmark::DoneCallback& callback) { | 1267 const MicroBenchmark::DoneCallback& callback) { |
1269 return micro_benchmark_controller_.ScheduleRun( | 1268 return micro_benchmark_controller_.ScheduleRun( |
1270 benchmark_name, value.Pass(), callback); | 1269 benchmark_name, value.Pass(), callback); |
1271 } | 1270 } |
1272 | 1271 |
1273 } // namespace cc | 1272 } // namespace cc |
OLD | NEW |