diff options
author | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-02 22:56:50 +0000 |
---|---|---|
committer | miletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-02 22:56:50 +0000 |
commit | b76029b635be92539c461a084c801b95d53beedf (patch) | |
tree | 5ee99a79709728a2223d878f3e064d6a18566ae6 /content/common | |
parent | bf46313710fa79090e01a2c933dc1411e124e6a3 (diff) | |
download | chromium_src-b76029b635be92539c461a084c801b95d53beedf.zip chromium_src-b76029b635be92539c461a084c801b95d53beedf.tar.gz chromium_src-b76029b635be92539c461a084c801b95d53beedf.tar.bz2 |
Remove some LatencyInfo merging code path
This CL removes a few code paths that do LatencyInfo merging:
1. compositor -> output surface through CompositorFrameMetadata
2. gpu -> browser compositor through
GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params and
GpuHostMsg_AcceleratedSurfacePostSubBuffer_Param
A follow up CL will remove GPU side LatencyInfo merging (mainly in image
transport surface) so that we remove LatencyInfo merging entirely from
the code path renderer cc -> gpu -> browser cc -> gpu.
BUG=246034
TEST=unittests pass.
Review URL: https://codereview.chromium.org/100443006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242825 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common')
-rw-r--r-- | content/common/gpu/client/command_buffer_proxy_impl.cc | 10 | ||||
-rw-r--r-- | content/common/gpu/client/command_buffer_proxy_impl.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc index 768b427..70e070f 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.cc +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc @@ -212,10 +212,16 @@ void CommandBufferProxyImpl::Flush(int32 put_offset) { } void CommandBufferProxyImpl::SetLatencyInfo( - const ui::LatencyInfo& latency_info) { + const std::vector<ui::LatencyInfo>& latency_info) { if (last_state_.error != gpu::error::kNoError) return; - Send(new GpuCommandBufferMsg_SetLatencyInfo(route_id_, latency_info)); + // TODO(miletus) : Pass the std::vector<ui::LatencyInfo> latency_info + // directly without merging once GpuCommandBufferMsg_SetLatencyInfo + // is converted to contain std::vector<ui::LatencyInfo>. + ui::LatencyInfo merged_latency; + for (size_t i = 0; i < latency_info.size(); i++) + merged_latency.MergeWith(latency_info[i]); + Send(new GpuCommandBufferMsg_SetLatencyInfo(route_id_, merged_latency)); } gpu::CommandBuffer::State CommandBufferProxyImpl::FlushSync( diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h index b5b272c..357b29e 100644 --- a/content/common/gpu/client/command_buffer_proxy_impl.h +++ b/content/common/gpu/client/command_buffer_proxy_impl.h @@ -131,7 +131,7 @@ class CommandBufferProxyImpl void SetOnConsoleMessageCallback( const GpuConsoleMessageCallback& callback); - void SetLatencyInfo(const ui::LatencyInfo& latency_info); + void SetLatencyInfo(const std::vector<ui::LatencyInfo>& latency_info); // TODO(apatrick): this is a temporary optimization while skia is calling // ContentGLContext::MakeCurrent prior to every GL call. It saves returning 6 |