| Index: content/browser/compositor/io_surface_layer_mac.mm
|
| diff --git a/content/browser/compositor/io_surface_layer_mac.mm b/content/browser/compositor/io_surface_layer_mac.mm
|
| index 7b07adf2733b9e13885e458295c4bcdf05cd988e..d09f24c490265f8efda06d5898b603cc261706d1 100644
|
| --- a/content/browser/compositor/io_surface_layer_mac.mm
|
| +++ b/content/browser/compositor/io_surface_layer_mac.mm
|
| @@ -168,14 +168,6 @@ void IOSurfaceLayerHelper::EndPumpingFrames() {
|
|
|
| @implementation IOSurfaceLayer
|
|
|
| -- (content::IOSurfaceTexture*)iosurface {
|
| - return iosurface_.get();
|
| -}
|
| -
|
| -- (content::IOSurfaceContext*)context {
|
| - return context_.get();
|
| -}
|
| -
|
| - (id)initWithClient:(content::IOSurfaceLayerClient*)client
|
| withScaleFactor:(float)scale_factor {
|
| if (self = [super init]) {
|
| @@ -211,7 +203,7 @@ void IOSurfaceLayerHelper::EndPumpingFrames() {
|
| - (bool)gotFrameWithIOSurface:(IOSurfaceID)io_surface_id
|
| withPixelSize:(gfx::Size)pixel_size
|
| withScaleFactor:(float)scale_factor {
|
| - return iosurface_->SetIOSurface(context_, io_surface_id, pixel_size);
|
| + return iosurface_->SetIOSurface(io_surface_id, pixel_size);
|
| }
|
|
|
| - (void)poisonContextAndSharegroup {
|
| @@ -229,7 +221,13 @@ void IOSurfaceLayerHelper::EndPumpingFrames() {
|
| }
|
|
|
| - (int)rendererID {
|
| - return iosurface_->GetRendererID();
|
| + GLint current_renderer_id = -1;
|
| + if (CGLGetParameter(context_->cgl_context(),
|
| + kCGLCPCurrentRendererID,
|
| + ¤t_renderer_id) == kCGLNoError) {
|
| + return current_renderer_id & kCGLRendererIDMatchingMask;
|
| + }
|
| + return -1;
|
| }
|
|
|
| - (void)resetClient {
|
| @@ -291,12 +289,6 @@ void IOSurfaceLayerHelper::EndPumpingFrames() {
|
| displayTime:(const CVTimeStamp*)timeStamp {
|
| TRACE_EVENT0("browser", "IOSurfaceLayer::drawInCGLContext");
|
|
|
| - if (!iosurface_->HasIOSurface() || context_->cgl_context() != glContext) {
|
| - glClearColor(1, 1, 1, 1);
|
| - glClear(GL_COLOR_BUFFER_BIT);
|
| - return;
|
| - }
|
| -
|
| bool draw_succeeded = iosurface_->DrawIOSurface();
|
| if (helper_)
|
| helper_->DidDraw(draw_succeeded);
|
|
|