diff options
author | egraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-21 16:38:43 +0000 |
---|---|---|
committer | egraether@chromium.org <egraether@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-21 16:38:43 +0000 |
commit | 372bad5f74bce22b5a09ecba66744079e64dc477 (patch) | |
tree | 28131cc00e2a26dd6c906448803f67b271bfaed6 /cc/trees/layer_tree_host.h | |
parent | d4062c83ab5f22fad6a3ffc3f1945373106bf517 (diff) | |
download | chromium_src-372bad5f74bce22b5a09ecba66744079e64dc477.zip chromium_src-372bad5f74bce22b5a09ecba66744079e64dc477.tar.gz chromium_src-372bad5f74bce22b5a09ecba66744079e64dc477.tar.bz2 |
cc:: Add RenderingStatsInstrumentation to manage collection of RenderingStats
This change adds the class RenderingStatsInstrumentation that manages conditional
saving and thread-specific access to a private RenderingStats instance.
An instance of RenderingStatsRecorder is created on LayerTreeHost, which
passes references to LayerTreeHostImpl and TileManager. Access to reading
and writing on the internal RenderingStats instance is guarded by a lock.
All rendering stats saving in LayerTreeHost, Single-/ThreadProxy,
LayerTreeHostImpl and TileManager has been switched to use the
RenderingStatsInstrumentation. Stats collection within Layer::update() still
follows the original structure to keep this change small.
BUG=181319
NOTRY=true
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=189475
Review URL: https://chromiumcodereview.appspot.com/12519006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189621 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees/layer_tree_host.h')
-rw-r--r-- | cc/trees/layer_tree_host.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h index ea769aa..934ae46 100644 --- a/cc/trees/layer_tree_host.h +++ b/cc/trees/layer_tree_host.h @@ -17,7 +17,6 @@ #include "cc/animation/animation_events.h" #include "cc/base/cc_export.h" #include "cc/base/scoped_ptr_vector.h" -#include "cc/debug/rendering_stats.h" #include "cc/output/output_surface.h" #include "cc/scheduler/rate_limiter.h" #include "cc/trees/layer_tree_host_client.h" @@ -51,10 +50,12 @@ class LayerTreeHostImplClient; class PrioritizedResourceManager; class PrioritizedResource; class Region; +class RenderingStatsInstrumentation; class ResourceProvider; class ResourceUpdateQueue; class ScrollbarLayer; class TopControlsManager; +struct RenderingStats; struct ScrollAndScaleSet; // Provides information on an Impl's rendering capabilities back to the @@ -148,6 +149,10 @@ class CC_EXPORT LayerTreeHost : public RateLimiterClient { void CollectRenderingStats(RenderingStats* stats) const; + RenderingStatsInstrumentation* rendering_stats_instrumentation() const { + return rendering_stats_instrumentation_.get(); + } + const RendererCapabilities& GetRendererCapabilities() const; void SetNeedsAnimate(); @@ -247,7 +252,8 @@ class CC_EXPORT LayerTreeHost : public RateLimiterClient { bool PaintLayerContents(const LayerList& render_surface_layer_list, ResourceUpdateQueue* quue); bool PaintMasksForRenderSurface(Layer* render_surface_layer, - ResourceUpdateQueue* queue); + ResourceUpdateQueue* queue, + RenderingStats* stats); void UpdateLayers(Layer* root_layer, ResourceUpdateQueue* queue); void UpdateHudLayer(); @@ -275,7 +281,7 @@ class CC_EXPORT LayerTreeHost : public RateLimiterClient { scoped_ptr<Proxy> proxy_; int commit_number_; - RenderingStats rendering_stats_; + scoped_ptr<RenderingStatsInstrumentation> rendering_stats_instrumentation_; bool renderer_initialized_; bool output_surface_lost_; |