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

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

Issue 571623003: Partial swap implementation for surfaceless (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: simplify some of the swap logic. verified works Created 6 years, 3 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/buffer_queue_unittest.cc ('k') | ui/gl/gl_surface_ozone.cc » ('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 a1e7f54a117e103294fa4a0217e1d53a4983b881..ca61db250aa0f9ebbbe325cbf30927b5e3f16a91 100644
--- a/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
+++ b/content/browser/compositor/gpu_surfaceless_browser_compositor_output_surface.cc
@@ -38,11 +38,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);
const gfx::Size& size = frame->gl_frame_data->size;
context_provider_->ContextGL()->ScheduleOverlayPlaneCHROMIUM(
0,
GL_OVERLAY_TRANSFORM_NONE_CHROMIUM,
- output_surface_->current_texture_id(),
+ texture,
0,
0,
size.width(),
@@ -51,7 +53,6 @@ void GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(
0,
1.0f,
1.0f);
- output_surface_->SwapBuffers();
GpuBrowserCompositorOutputSurface::SwapBuffers(frame);
}
« no previous file with comments | « content/browser/compositor/buffer_queue_unittest.cc ('k') | ui/gl/gl_surface_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698