| 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 a300eeed9f73db0964f1c7332db41199fd5153a1..37ac4c9eb5b5da78e0791ae8fbe66a62df5ba1bf 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>
|
|
|
| @@ -318,6 +319,15 @@ void CompositingIOSurfaceMac::SetIOSurface(uint64 io_surface_handle,
|
| CGLSetCurrentContext(0);
|
| }
|
|
|
| +int CompositingIOSurfaceMac::GetRenderer() {
|
| + GLint current_renderer_id = -1;
|
| + if (CGLGetParameter(cglContext_,
|
| + kCGLCPCurrentRendererID,
|
| + ¤t_renderer_id) == kCGLNoError)
|
| + return current_renderer_id & kCGLRendererIDMatchingMask;
|
| + return -1;
|
| +}
|
| +
|
| void CompositingIOSurfaceMac::DrawIOSurface(NSView* view, float scale_factor) {
|
| CGLSetCurrentContext(cglContext_);
|
|
|
|
|