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

Unified Diff: content/browser/renderer_host/compositing_iosurface_mac.mm

Issue 11418244: Order the GL overlays above windows if possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: missed a class Created 8 years, 1 month 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/renderer_host/compositing_iosurface_mac.mm
diff --git a/content/browser/renderer_host/compositing_iosurface_mac.mm b/content/browser/renderer_host/compositing_iosurface_mac.mm
index 589fb7fa82b505e6ccfa902ef557785f81de055e..2d446ee70a79a3b69016330a831836bf3bc1f8f0 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -167,7 +167,8 @@ CompositingIOSurfaceMac::CopyContext::CopyContext() {
CompositingIOSurfaceMac::CopyContext::~CopyContext() {
}
-CompositingIOSurfaceMac* CompositingIOSurfaceMac::Create() {
+// static
+CompositingIOSurfaceMac* CompositingIOSurfaceMac::Create(bool below_window) {
TRACE_EVENT0("browser", "CompositingIOSurfaceMac::Create");
IOSurfaceSupport* io_surface_support = IOSurfaceSupport::Initialize();
if (!io_surface_support) {
@@ -198,10 +199,13 @@ CompositingIOSurfaceMac* CompositingIOSurfaceMac::Create() {
return NULL;
}
- // We "punch a hole" in the window, and have the WindowServer render the
- // OpenGL surface underneath so we can draw over it.
- GLint belowWindow = -1;
- [glContext setValues:&belowWindow forParameter:NSOpenGLCPSurfaceOrder];
+ // If requested, ask the WindowServer to render the OpenGL surface underneath
+ // the window. This, combined with a hole punched in the window, will allow
+ // for views to "overlap" the GL surface from the user's point of view.
+ if (below_window) {
+ GLint belowWindow = -1;
+ [glContext setValues:&belowWindow forParameter:NSOpenGLCPSurfaceOrder];
+ }
CGLContextObj cglContext = (CGLContextObj)[glContext CGLContextObj];
if (!cglContext) {

Powered by Google App Engine
This is Rietveld 408576698