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

Unified Diff: ui/accelerated_widget_mac/io_surface_texture.h

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
Index: ui/accelerated_widget_mac/io_surface_texture.h
diff --git a/ui/accelerated_widget_mac/io_surface_texture.h b/ui/accelerated_widget_mac/io_surface_texture.h
index 8ff9d63840e4d49aafc7bb188f2e5003bfcdab34..22780452479a0c201d8d73523697ce0cca59ca9b 100644
--- a/ui/accelerated_widget_mac/io_surface_texture.h
+++ b/ui/accelerated_widget_mac/io_surface_texture.h
@@ -41,7 +41,8 @@ class IOSurfaceTexture
: public base::RefCounted<IOSurfaceTexture> {
public:
static scoped_refptr<IOSurfaceTexture> Create(
- bool needs_gl_finish_workaround);
+ bool needs_gl_finish_workaround,
+ bool use_ns_apis);
// Returns true if there is no need to call SetIOSurface with the provided
// values.
@@ -69,6 +70,7 @@ class IOSurfaceTexture
IOSurfaceTexture(
const scoped_refptr<IOSurfaceContext>& context,
+ bool use_ns_apis,
bool needs_gl_finish_workaround);
~IOSurfaceTexture();
@@ -113,8 +115,12 @@ class IOSurfaceTexture
void EvictionMarkEvicted();
EvictionQueue::iterator eviction_queue_iterator_;
bool eviction_has_been_drawn_since_updated_;
+
const bool needs_gl_finish_workaround_;
+ // Set if this is for access through NS APIs.
+ const bool using_ns_apis_;
+
static void EvictionScheduleDoEvict();
static void EvictionDoEvict();
static base::LazyInstance<EvictionQueue> eviction_queue_;
« no previous file with comments | « ui/accelerated_widget_mac/io_surface_ns_gl_surface.mm ('k') | ui/accelerated_widget_mac/io_surface_texture.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698