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

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

Issue 1376883004: Overlays: Remove special casing of primary overlay plane (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missed file Created 5 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 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_surfaceless_browser_compositor_output_s urface.h" 5 #include "content/browser/compositor/gpu_surfaceless_browser_compositor_output_s urface.h"
6 6
7 #include "cc/output/compositor_frame.h" 7 #include "cc/output/compositor_frame.h"
8 #include "cc/output/output_surface_client.h" 8 #include "cc/output/output_surface_client.h"
9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h" 9 #include "content/browser/compositor/browser_compositor_overlay_candidate_valida tor.h"
10 #include "content/browser/compositor/buffer_queue.h" 10 #include "content/browser/compositor/buffer_queue.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 unsigned GpuSurfacelessBrowserCompositorOutputSurface::GetOverlayTextureId() 60 unsigned GpuSurfacelessBrowserCompositorOutputSurface::GetOverlayTextureId()
61 const { 61 const {
62 return output_surface_->current_texture_id(); 62 return output_surface_->current_texture_id();
63 } 63 }
64 64
65 void GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers( 65 void GpuSurfacelessBrowserCompositorOutputSurface::SwapBuffers(
66 cc::CompositorFrame* frame) { 66 cc::CompositorFrame* frame) {
67 DCHECK(output_surface_); 67 DCHECK(output_surface_);
68
69 GLuint texture = output_surface_->current_texture_id();
70 output_surface_->SwapBuffers(frame->gl_frame_data->sub_buffer_rect); 68 output_surface_->SwapBuffers(frame->gl_frame_data->sub_buffer_rect);
71 const gfx::Size& size = frame->gl_frame_data->size;
72 context_provider_->ContextGL()->ScheduleOverlayPlaneCHROMIUM(
73 0,
74 GL_OVERLAY_TRANSFORM_NONE_CHROMIUM,
75 texture,
76 0,
77 0,
78 size.width(),
79 size.height(),
80 0,
81 0,
82 1.0f,
83 1.0f);
84 GpuBrowserCompositorOutputSurface::SwapBuffers(frame); 69 GpuBrowserCompositorOutputSurface::SwapBuffers(frame);
85 } 70 }
86 71
87 void GpuSurfacelessBrowserCompositorOutputSurface::OnSwapBuffersComplete() { 72 void GpuSurfacelessBrowserCompositorOutputSurface::OnSwapBuffersComplete() {
88 DCHECK(output_surface_); 73 DCHECK(output_surface_);
89 output_surface_->PageFlipComplete(); 74 output_surface_->PageFlipComplete();
90 GpuBrowserCompositorOutputSurface::OnSwapBuffersComplete(); 75 GpuBrowserCompositorOutputSurface::OnSwapBuffersComplete();
91 } 76 }
92 77
93 void GpuSurfacelessBrowserCompositorOutputSurface::BindFramebuffer() { 78 void GpuSurfacelessBrowserCompositorOutputSurface::BindFramebuffer() {
(...skipping 30 matching lines...) Expand all
124 #endif 109 #endif
125 } 110 }
126 111
127 #if defined(OS_MACOSX) 112 #if defined(OS_MACOSX)
128 void GpuSurfacelessBrowserCompositorOutputSurface::OnSurfaceDisplayed() { 113 void GpuSurfacelessBrowserCompositorOutputSurface::OnSurfaceDisplayed() {
129 OnSwapBuffersComplete(); 114 OnSwapBuffersComplete();
130 } 115 }
131 #endif 116 #endif
132 117
133 } // namespace content 118 } // namespace content
OLDNEW
« cc/output/overlay_processor.cc ('K') | « cc/test/fake_output_surface.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698