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

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

Issue 1044093005: Preliminary compositor disabling patch. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove renderpass calculation Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | content/common/cc_messages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
diff --git a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
index 33f7d63727e28b00d9bc544f03f24a5a65c71938..ea9e6b9b046d9c4e331643ad898399c0455f1aa0 100644
--- a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
@@ -47,8 +47,13 @@ void GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(
cc::CompositorFrame* frame) {
DCHECK(output_surface_);
- GLuint texture = output_surface_->current_texture_id();
- output_surface_->SwapBuffers(frame->gl_frame_data->sub_buffer_rect);
+ GLuint texture;
+ if (!frame->gl_frame_data->sub_buffer_rect.IsEmpty()) {
+ texture = output_surface_->current_texture_id();
+ output_surface_->SwapBuffers(frame->gl_frame_data->sub_buffer_rect);
+ } else {
+ texture = output_surface_->last_texture_id();
+ }
const gfx::Size& size = frame->gl_frame_data->size;
context_provider_->ContextGL()->ScheduleOverlayPlaneCHROMIUM(
0,
« no previous file with comments | « content/browser/compositor/delegated_frame_host.cc ('k') | content/common/cc_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698