| 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,
|
| + ¤t_renderer_id) == kCGLNoError)
|
| + return current_renderer_id & kCGLRendererIDMatchingMask;
|
| + return -1;
|
| +}
|
| +
|
| void CompositingIOSurfaceMac::DrawIOSurface(
|
| NSView* view, float scale_factor,
|
| RenderWidgetHostViewFrameSubscriber* frame_subscriber) {
|
|
|