diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:19:40 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2018-12-10 16:01:50 +0000 |
commit | 51f6c2793adab2d864b3d2b360000ef8db1d3e92 (patch) | |
tree | 835b3b4446b012c75e80177cef9fbe6972cc7dbe /chromium/cc/mojo_embedder/async_layer_tree_frame_sink.h | |
parent | 6036726eb981b6c4b42047513b9d3f4ac865daac (diff) |
BASELINE: Update Chromium to 71.0.3578.93
Change-Id: I6a32086c33670e1b033f8b10e6bf1fd4da1d105d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'chromium/cc/mojo_embedder/async_layer_tree_frame_sink.h')
-rw-r--r-- | chromium/cc/mojo_embedder/async_layer_tree_frame_sink.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/chromium/cc/mojo_embedder/async_layer_tree_frame_sink.h b/chromium/cc/mojo_embedder/async_layer_tree_frame_sink.h index 28bbfdf7252..71be58d39f3 100644 --- a/chromium/cc/mojo_embedder/async_layer_tree_frame_sink.h +++ b/chromium/cc/mojo_embedder/async_layer_tree_frame_sink.h @@ -21,6 +21,10 @@ #include "mojo/public/cpp/bindings/binding.h" #include "services/viz/public/interfaces/compositing/compositor_frame_sink.mojom.h" +namespace base { +class HistogramBase; +} // namespace base + namespace viz { class HitTestDataProvider; class LocalSurfaceIdProvider; @@ -37,6 +41,32 @@ class CC_MOJO_EMBEDDER_EXPORT AsyncLayerTreeFrameSink public viz::mojom::CompositorFrameSinkClient, public viz::ExternalBeginFrameSourceClient { public: + // This class is used to handle the graphics pipeline related metrics + // reporting. + class PipelineReporting { + public: + PipelineReporting(viz::BeginFrameArgs args, + base::TimeTicks now, + base::HistogramBase* submit_begin_frame_histogram); + ~PipelineReporting(); + + void Report(); + + int64_t trace_id() const { return trace_id_; } + + private: + // The trace id of a BeginFrame which is used to track its progress on the + // client side. + int64_t trace_id_; + + // The time stamp for the begin frame to arrive on client side. + base::TimeTicks frame_time_; + + // Histogram metrics used to record + // GraphicsPipeline.ClientName.SubmitCompositorFrameAfterBeginFrame + base::HistogramBase* submit_begin_frame_histogram_; + }; + struct CC_MOJO_EMBEDDER_EXPORT UnboundMessagePipes { UnboundMessagePipes(); ~UnboundMessagePipes(); @@ -65,6 +95,7 @@ class CC_MOJO_EMBEDDER_EXPORT AsyncLayerTreeFrameSink UnboundMessagePipes pipes; bool enable_surface_synchronization = false; bool wants_animate_only_begin_frames = false; + const char* client_name = nullptr; }; AsyncLayerTreeFrameSink( @@ -137,7 +168,16 @@ class CC_MOJO_EMBEDDER_EXPORT AsyncLayerTreeFrameSink viz::LocalSurfaceId last_submitted_local_surface_id_; float last_submitted_device_scale_factor_ = 1.f; gfx::Size last_submitted_size_in_pixels_; + // Use this map to record the time when client received the BeginFrameArgs. + base::flat_map<int64_t, PipelineReporting> pipeline_reporting_frame_times_; + + // Histogram metrics used to record + // GraphicsPipeline.ClientName.ReceivedBeginFrame + base::HistogramBase* const receive_begin_frame_histogram_; + // Histogram metrics used to record + // GraphicsPipeline.ClientName.SubmitCompositorFrameAfterBeginFrame + base::HistogramBase* const submit_begin_frame_histogram_; base::WeakPtrFactory<AsyncLayerTreeFrameSink> weak_factory_; DISALLOW_COPY_AND_ASSIGN(AsyncLayerTreeFrameSink); |