Chromium Code Reviews| 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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1051 LayerIteratorType::Begin(&render_surface_layer_list); | 1051 LayerIteratorType::Begin(&render_surface_layer_list); |
| 1052 it != end; | 1052 it != end; |
| 1053 ++it) { | 1053 ++it) { |
| 1054 bool prevent_occlusion = it.target_render_surface_layer()->HasCopyRequest(); | 1054 bool prevent_occlusion = it.target_render_surface_layer()->HasCopyRequest(); |
| 1055 occlusion_tracker.EnterLayer(it, prevent_occlusion); | 1055 occlusion_tracker.EnterLayer(it, prevent_occlusion); |
| 1056 | 1056 |
| 1057 if (it.represents_target_render_surface()) { | 1057 if (it.represents_target_render_surface()) { |
| 1058 PaintMasksForRenderSurface( | 1058 PaintMasksForRenderSurface( |
| 1059 *it, queue, did_paint_content, need_more_updates); | 1059 *it, queue, did_paint_content, need_more_updates); |
| 1060 } else if (it.represents_itself() && it->DrawsContent()) { | 1060 } else if (it.represents_itself() && it->DrawsContent()) { |
| 1061 devtools_instrumentation::ScopedLayerTreeTask | 1061 bool zero_opacity = !it->draw_opacity() && |
|
enne (OOO)
2013/10/29 23:54:22
Zero opacity is not the only reason to skip a laye
sadrul
2013/10/30 15:44:42
Done (I am calling it 'skip_drawing' to be more li
| |
| 1062 update_layer(devtools_instrumentation::kUpdateLayer, it->id(), id()); | 1062 !it->draw_opacity_is_animating(); |
| 1063 DCHECK(!it->paint_properties().bounds.IsEmpty()); | 1063 if (!zero_opacity) { |
| 1064 *did_paint_content |= it->Update(queue, &occlusion_tracker); | 1064 devtools_instrumentation::ScopedLayerTreeTask update_layer( |
| 1065 *need_more_updates |= it->NeedMoreUpdates(); | 1065 devtools_instrumentation::kUpdateLayer, it->id(), id()); |
| 1066 DCHECK(!it->paint_properties().bounds.IsEmpty()); | |
| 1067 *did_paint_content |= it->Update(queue, &occlusion_tracker); | |
| 1068 *need_more_updates |= it->NeedMoreUpdates(); | |
| 1069 } | |
| 1066 } | 1070 } |
| 1067 | 1071 |
| 1068 occlusion_tracker.LeaveLayer(it); | 1072 occlusion_tracker.LeaveLayer(it); |
| 1069 } | 1073 } |
| 1070 | 1074 |
| 1071 in_paint_layer_contents_ = false; | 1075 in_paint_layer_contents_ = false; |
| 1072 | 1076 |
| 1073 occlusion_tracker.overdraw_metrics()->RecordMetrics(this); | 1077 occlusion_tracker.overdraw_metrics()->RecordMetrics(this); |
| 1074 } | 1078 } |
| 1075 | 1079 |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1284 | 1288 |
| 1285 bool LayerTreeHost::ScheduleMicroBenchmark( | 1289 bool LayerTreeHost::ScheduleMicroBenchmark( |
| 1286 const std::string& benchmark_name, | 1290 const std::string& benchmark_name, |
| 1287 scoped_ptr<base::Value> value, | 1291 scoped_ptr<base::Value> value, |
| 1288 const MicroBenchmark::DoneCallback& callback) { | 1292 const MicroBenchmark::DoneCallback& callback) { |
| 1289 return micro_benchmark_controller_.ScheduleRun( | 1293 return micro_benchmark_controller_.ScheduleRun( |
| 1290 benchmark_name, value.Pass(), callback); | 1294 benchmark_name, value.Pass(), callback); |
| 1291 } | 1295 } |
| 1292 | 1296 |
| 1293 } // namespace cc | 1297 } // namespace cc |
| OLD | NEW |