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/layer_tree_host.h" | 5 #include "cc/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | |
| 7 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 8 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 9 #include "cc/font_atlas.h" | 10 #include "cc/font_atlas.h" |
| 10 #include "cc/graphics_context.h" | 11 #include "cc/graphics_context.h" |
| 11 #include "cc/heads_up_display_layer.h" | 12 #include "cc/heads_up_display_layer.h" |
| 12 #include "cc/heads_up_display_layer_impl.h" | 13 #include "cc/heads_up_display_layer_impl.h" |
| 13 #include "cc/layer.h" | 14 #include "cc/layer.h" |
| 14 #include "cc/layer_animation_controller.h" | 15 #include "cc/layer_animation_controller.h" |
| 15 #include "cc/layer_iterator.h" | 16 #include "cc/layer_iterator.h" |
| 16 #include "cc/layer_tree_host_client.h" | 17 #include "cc/layer_tree_host_client.h" |
| 17 #include "cc/layer_tree_host_common.h" | 18 #include "cc/layer_tree_host_common.h" |
| 18 #include "cc/layer_tree_host_impl.h" | 19 #include "cc/layer_tree_host_impl.h" |
| 19 #include "cc/math_util.h" | 20 #include "cc/math_util.h" |
| 20 #include "cc/occlusion_tracker.h" | 21 #include "cc/occlusion_tracker.h" |
| 21 #include "cc/overdraw_metrics.h" | 22 #include "cc/overdraw_metrics.h" |
| 22 #include "cc/settings.h" | 23 #include "cc/settings.h" |
| 23 #include "cc/single_thread_proxy.h" | 24 #include "cc/single_thread_proxy.h" |
| 25 #include "cc/switches.h" | |
| 24 #include "cc/thread.h" | 26 #include "cc/thread.h" |
| 25 #include "cc/thread_proxy.h" | 27 #include "cc/thread_proxy.h" |
| 26 #include "cc/tree_synchronizer.h" | 28 #include "cc/tree_synchronizer.h" |
| 27 | 29 |
| 28 using namespace std; | 30 using namespace std; |
| 29 | 31 |
| 30 namespace { | 32 namespace { |
| 31 static int numLayerTreeInstances; | 33 static int numLayerTreeInstances; |
| 32 } | 34 } |
| 33 | 35 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 44 , showScreenSpaceRects(false) | 46 , showScreenSpaceRects(false) |
| 45 , showReplicaScreenSpaceRects(false) | 47 , showReplicaScreenSpaceRects(false) |
| 46 , showOccludingRects(false) | 48 , showOccludingRects(false) |
| 47 , renderVSyncEnabled(true) | 49 , renderVSyncEnabled(true) |
| 48 , refreshRate(0) | 50 , refreshRate(0) |
| 49 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) | 51 , maxPartialTextureUpdates(std::numeric_limits<size_t>::max()) |
| 50 , defaultTileSize(gfx::Size(256, 256)) | 52 , defaultTileSize(gfx::Size(256, 256)) |
| 51 , maxUntiledLayerSize(gfx::Size(512, 512)) | 53 , maxUntiledLayerSize(gfx::Size(512, 512)) |
| 52 , minimumOcclusionTrackingSize(gfx::Size(160, 160)) | 54 , minimumOcclusionTrackingSize(gfx::Size(160, 160)) |
| 53 { | 55 { |
| 56 // TODO(danakj): Move this to chromium when we don't go through the WebKit A PI anymore. | |
| 57 showPropertyChangedRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::s witches::kShowPropertyChangedRects); | |
|
tfarina
2012/11/13 15:00:19
do we need cc:: here? We are in cc namespace alrea
| |
| 58 showSurfaceDamageRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::swi tches::kShowSurfaceDamageRects); | |
| 59 showScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switc hes::kShowScreenSpaceRects); | |
| 60 showReplicaScreenSpaceRects = CommandLine::ForCurrentProcess()->HasSwitch(cc ::switches::kShowReplicaScreenSpaceRects); | |
| 61 showOccludingRects = CommandLine::ForCurrentProcess()->HasSwitch(cc::switche s::kShowOccludingRects); | |
| 54 } | 62 } |
| 55 | 63 |
| 56 LayerTreeSettings::~LayerTreeSettings() | 64 LayerTreeSettings::~LayerTreeSettings() |
| 57 { | 65 { |
| 58 } | 66 } |
| 59 | 67 |
| 60 RendererCapabilities::RendererCapabilities() | 68 RendererCapabilities::RendererCapabilities() |
| 61 : bestTextureFormat(0) | 69 : bestTextureFormat(0) |
| 62 , contextHasCachedFrontBuffer(false) | 70 , contextHasCachedFrontBuffer(false) |
| 63 , usingPartialSwap(false) | 71 , usingPartialSwap(false) |
| (...skipping 774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 838 else | 846 else |
| 839 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); | 847 layer->notifyAnimationFinished(wallClockTime.ToDoubleT()); |
| 840 } | 848 } |
| 841 } | 849 } |
| 842 | 850 |
| 843 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) | 851 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn dex) |
| 844 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); | 852 setAnimationEventsRecursive(events, layer->children()[childIndex].get(), wallClockTime); |
| 845 } | 853 } |
| 846 | 854 |
| 847 } // namespace cc | 855 } // namespace cc |
| OLD | NEW |