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

Unified Diff: ui/accelerated_widget_mac/io_surface_texture.mm

Issue 1164363005: Mac: Only allow NSOpenGLContext displaying on the main display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add GPU switch Created 5 years, 6 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 | « ui/accelerated_widget_mac/io_surface_texture.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/accelerated_widget_mac/io_surface_texture.mm
diff --git a/ui/accelerated_widget_mac/io_surface_texture.mm b/ui/accelerated_widget_mac/io_surface_texture.mm
index 052a0dc09931f771bcccda4ee0664aa3d4e1fa23..1069a0b9c51daeb9d069cc96366122bff96cc220 100644
--- a/ui/accelerated_widget_mac/io_surface_texture.mm
+++ b/ui/accelerated_widget_mac/io_surface_texture.mm
@@ -29,12 +29,10 @@ namespace ui {
// static
scoped_refptr<IOSurfaceTexture> IOSurfaceTexture::Create(
- bool needs_gl_finish_workaround) {
- static bool use_ns_gl_surfaces =
- base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableNSGLSurfaces);
+ bool needs_gl_finish_workaround,
+ bool use_ns_apis) {
scoped_refptr<IOSurfaceContext> offscreen_context;
- if (!use_ns_gl_surfaces) {
+ if (!use_ns_apis) {
offscreen_context = IOSurfaceContext::Get(
IOSurfaceContext::kOffscreenContext);
if (!offscreen_context.get()) {
@@ -42,18 +40,21 @@ scoped_refptr<IOSurfaceTexture> IOSurfaceTexture::Create(
return NULL;
}
}
- return new IOSurfaceTexture(offscreen_context, needs_gl_finish_workaround);
+ return new IOSurfaceTexture(
+ offscreen_context, use_ns_apis, needs_gl_finish_workaround);
}
IOSurfaceTexture::IOSurfaceTexture(
const scoped_refptr<IOSurfaceContext>& offscreen_context,
+ bool use_ns_apis,
bool needs_gl_finish_workaround)
: offscreen_context_(offscreen_context),
texture_(0),
gl_error_(GL_NO_ERROR),
eviction_queue_iterator_(eviction_queue_.Get().end()),
eviction_has_been_drawn_since_updated_(false),
- needs_gl_finish_workaround_(needs_gl_finish_workaround) {
+ needs_gl_finish_workaround_(needs_gl_finish_workaround),
+ using_ns_apis_(use_ns_apis) {
}
IOSurfaceTexture::~IOSurfaceTexture() {
« no previous file with comments | « ui/accelerated_widget_mac/io_surface_texture.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698