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

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

Issue 2699173002: cc: Make OutputSurfaceFrame::sub_buffer_rect optional (Closed)
Patch Set: Removed obsolete comment Created 3 years, 10 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 8c7581c78d232b765dad08f9144b542e3cde64bd..bf2f87710f54171d0450e6b527ccfffbbeb99351 100644
--- a/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/offscreen_browser_compositor_output_surface.cc
@@ -136,13 +136,12 @@ void OffscreenBrowserCompositorOutputSurface::SwapBuffers(
cc::OutputSurfaceFrame frame) {
gfx::Size surface_size = frame.size;
DCHECK(surface_size == reshape_size_);
- gfx::Rect swap_rect = frame.sub_buffer_rect;
if (reflector_) {
- if (swap_rect == gfx::Rect(surface_size))
- reflector_->OnSourceSwapBuffers(surface_size);
+ if (frame.sub_buffer_rect)
+ reflector_->OnSourcePostSubBuffer(*frame.sub_buffer_rect, surface_size);
else
- reflector_->OnSourcePostSubBuffer(swap_rect, surface_size);
+ reflector_->OnSourceSwapBuffers(surface_size);
}
// TODO(oshima): sync with the reflector's SwapBuffersComplete

Powered by Google App Engine
This is Rietveld 408576698