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

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

Issue 2403373002: cc: Clean up OutputSurfaceClient. (Closed)
Patch Set: osclient: rebase Created 4 years, 2 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 22 matching lines...) Expand all
33 weak_ptr_factory_(this) {} 33 weak_ptr_factory_(this) {}
34 34
35 GpuBrowserCompositorOutputSurface::~GpuBrowserCompositorOutputSurface() = 35 GpuBrowserCompositorOutputSurface::~GpuBrowserCompositorOutputSurface() =
36 default; 36 default;
37 37
38 void GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( 38 void GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted(
39 const std::vector<ui::LatencyInfo>& latency_info, 39 const std::vector<ui::LatencyInfo>& latency_info,
40 gfx::SwapResult result, 40 gfx::SwapResult result,
41 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) { 41 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) {
42 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 42 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
43 client_->DidSwapBuffersComplete(); 43 client_->DidReceiveSwapBuffersAck();
44 } 44 }
45 45
46 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() { 46 void GpuBrowserCompositorOutputSurface::OnReflectorChanged() {
47 if (!reflector_) { 47 if (!reflector_) {
48 reflector_texture_.reset(); 48 reflector_texture_.reset();
49 } else { 49 } else {
50 reflector_texture_.reset(new ReflectorTexture(context_provider())); 50 reflector_texture_.reset(new ReflectorTexture(context_provider()));
51 reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox()); 51 reflector_->OnSourceTextureMailboxUpdated(reflector_texture_->mailbox());
52 } 52 }
53 } 53 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 ContextProviderCommandBuffer* provider_command_buffer = 139 ContextProviderCommandBuffer* provider_command_buffer =
140 static_cast<content::ContextProviderCommandBuffer*>( 140 static_cast<content::ContextProviderCommandBuffer*>(
141 context_provider_.get()); 141 context_provider_.get());
142 gpu::CommandBufferProxyImpl* command_buffer_proxy = 142 gpu::CommandBufferProxyImpl* command_buffer_proxy =
143 provider_command_buffer->GetCommandBufferProxy(); 143 provider_command_buffer->GetCommandBufferProxy();
144 DCHECK(command_buffer_proxy); 144 DCHECK(command_buffer_proxy);
145 return command_buffer_proxy; 145 return command_buffer_proxy;
146 } 146 }
147 147
148 } // namespace content 148 } // namespace content
OLDNEW
« no previous file with comments | « cc/test/pixel_test_output_surface.cc ('k') | content/browser/compositor/offscreen_browser_compositor_output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698