Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: content/browser/compositor/gpu_browser_compositor_output_surface.cc

Issue 2788893004: Renaming gpu swap buffer callbacks and the screenshot latency component. (Closed)
Patch Set: Updating android compositor Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "content/browser/compositor/gpu_browser_compositor_output_surface.h" 5 #include "content/browser/compositor/gpu_browser_compositor_output_surface.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "cc/output/output_surface_client.h" 10 #include "cc/output/output_surface_client.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 GetCommandBufferProxy()->SetNeedsVSync(needs_vsync); 47 GetCommandBufferProxy()->SetNeedsVSync(needs_vsync);
48 #else 48 #else
49 NOTREACHED(); 49 NOTREACHED();
50 #endif // defined(OS_WIN) 50 #endif // defined(OS_WIN)
51 } 51 }
52 52
53 void GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( 53 void GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted(
54 const std::vector<ui::LatencyInfo>& latency_info, 54 const std::vector<ui::LatencyInfo>& latency_info,
55 gfx::SwapResult result, 55 gfx::SwapResult result,
56 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) { 56 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) {
57 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 57 RenderWidgetHostImpl::OnGpuSwapBuffersCompleted(latency_info);
58 client_->DidReceiveSwapBuffersAck(); 58 client_->DidReceiveSwapBuffersAck();
59 } 59 }
60 60
61 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() { 61 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() {
62 if (!reflector_) { 62 if (!reflector_) {
63 reflector_texture_.reset(); 63 reflector_texture_.reset();
64 } else { 64 } else {
65 reflector_texture_.reset(new ReflectorTexture(context_provider())); 65 reflector_texture_.reset(new ReflectorTexture(context_provider()));
66 reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox()); 66 reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox());
67 } 67 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 GpuBrowserCompositorOutputSurface::GetCommandBufferProxy() { 169 GpuBrowserCompositorOutputSurface::GetCommandBufferProxy() {
170 ui::ContextProviderCommandBuffer* provider_command_buffer = 170 ui::ContextProviderCommandBuffer* provider_command_buffer =
171 static_cast<ui::ContextProviderCommandBuffer*>(context_provider_.get()); 171 static_cast<ui::ContextProviderCommandBuffer*>(context_provider_.get());
172 gpu::CommandBufferProxyImpl* command_buffer_proxy = 172 gpu::CommandBufferProxyImpl* command_buffer_proxy =
173 provider_command_buffer->GetCommandBufferProxy(); 173 provider_command_buffer->GetCommandBufferProxy();
174 DCHECK(command_buffer_proxy); 174 DCHECK(command_buffer_proxy);
175 return command_buffer_proxy; 175 return command_buffer_proxy;
176 } 176 }
177 177
178 } // namespace content 178 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698