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

Unified Diff: content/browser/compositor/offscreen_browser_compositor_output_surface.cc

Issue 2392183003: cc: Remove SurfaceSize from OutputSurface. (Closed)
Patch Set: nosurfacesize: ozonethinger 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/compositor/offscreen_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
index 491483c04ac6f9f5e5b5ebbf633466e0cbfff6b2..b36ae5f4224074f560ac4ce4567ff2dcb1c6b306 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
@@ -135,12 +135,15 @@ void OffscreenBrowserCompositorOutputSurface::BindFramebuffer() {
void OffscreenBrowserCompositorOutputSurface::SwapBuffers(
cc::CompositorFrame frame) {
+ gfx::Size surface_size = frame.gl_frame_data->size;
+ DCHECK(surface_size == surface_size_);
+ gfx::Rect swap_rect = frame.gl_frame_data->sub_buffer_rect;
+
if (reflector_) {
- if (frame.gl_frame_data->sub_buffer_rect ==
- gfx::Rect(frame.gl_frame_data->size))
- reflector_->OnSourceSwapBuffers();
+ if (swap_rect == gfx::Rect(surface_size))
+ reflector_->OnSourceSwapBuffers(surface_size);
else
- reflector_->OnSourcePostSubBuffer(frame.gl_frame_data->sub_buffer_rect);
+ reflector_->OnSourcePostSubBuffer(swap_rect, surface_size);
}
// TODO(oshima): sync with the reflector's SwapBuffersComplete

Powered by Google App Engine
This is Rietveld 408576698