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

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

Issue 2143263002: cc: Remove OutputSurfaceClient::DidSwapBuffers(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removedidswap: fix-webview-swap Created 4 years, 5 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/compositor_frame.h" 10 #include "cc/output/compositor_frame.h"
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 } 96 }
97 } 97 }
98 98
99 if (frame.gl_frame_data->sub_buffer_rect == 99 if (frame.gl_frame_data->sub_buffer_rect ==
100 gfx::Rect(frame.gl_frame_data->size)) { 100 gfx::Rect(frame.gl_frame_data->size)) {
101 context_provider_->ContextSupport()->Swap(); 101 context_provider_->ContextSupport()->Swap();
102 } else { 102 } else {
103 context_provider_->ContextSupport()->PartialSwapBuffers( 103 context_provider_->ContextSupport()->PartialSwapBuffers(
104 frame.gl_frame_data->sub_buffer_rect); 104 frame.gl_frame_data->sub_buffer_rect);
105 } 105 }
106
107 client_->DidSwapBuffers();
108 } 106 }
109 107
110 void GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted( 108 void GpuBrowserCompositorOutputSurface::OnGpuSwapBuffersCompleted(
111 const std::vector<ui::LatencyInfo>& latency_info, 109 const std::vector<ui::LatencyInfo>& latency_info,
112 gfx::SwapResult result, 110 gfx::SwapResult result,
113 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) { 111 const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) {
114 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); 112 RenderWidgetHostImpl::CompositorFrameDrawn(latency_info);
115 OnSwapBuffersComplete(); 113 OnSwapBuffersComplete();
116 } 114 }
117 115
118 #if defined(OS_MACOSX) 116 #if defined(OS_MACOSX)
119 void GpuBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle( 117 void GpuBrowserCompositorOutputSurface::SetSurfaceSuspendedForRecycle(
120 bool suspended) {} 118 bool suspended) {}
121 #endif 119 #endif
122 120
123 } // namespace content 121 } // namespace content
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.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