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

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

Issue 12383042: Switch all contexts in a share group to be on the same screen as the window they present to. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 9 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: 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 12ca3fd9475a3069b72c11b2a7ccecb783a79b44..052bd5843842dc340359e851115f1fffd4d0682d 100644
--- a/content/browser/renderer_host/compositing_iosurface_mac.mm
+++ b/content/browser/renderer_host/compositing_iosurface_mac.mm
@@ -4,6 +4,7 @@
#include "content/browser/renderer_host/compositing_iosurface_mac.h"
+#include <OpenGL/CGLRenderers.h>
#include <OpenGL/OpenGL.h>
#include <vector>
@@ -349,6 +350,15 @@ void CompositingIOSurfaceMac::SetIOSurface(uint64 io_surface_handle,
CGLSetCurrentContext(0);
}
+int CompositingIOSurfaceMac::GetRendererID() {
+ GLint current_renderer_id = -1;
+ if (CGLGetParameter(cglContext_,
+ kCGLCPCurrentRendererID,
+ &current_renderer_id) == kCGLNoError)
+ return current_renderer_id & kCGLRendererIDMatchingMask;
+ return -1;
+}
+
void CompositingIOSurfaceMac::DrawIOSurface(
NSView* view, float scale_factor,
RenderWidgetHostViewFrameSubscriber* frame_subscriber) {

Powered by Google App Engine
This is Rietveld 408576698