diff options
Diffstat (limited to 'WebCore/platform/graphics/mac/Canvas3DLayer.mm')
-rw-r--r-- | WebCore/platform/graphics/mac/Canvas3DLayer.mm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/WebCore/platform/graphics/mac/Canvas3DLayer.mm b/WebCore/platform/graphics/mac/Canvas3DLayer.mm index 59a7384..22a0a10 100644 --- a/WebCore/platform/graphics/mac/Canvas3DLayer.mm +++ b/WebCore/platform/graphics/mac/Canvas3DLayer.mm @@ -41,10 +41,11 @@ using namespace WebCore; @implementation Canvas3DLayer --(id)initWithContext:(CGLContextObj)context texture:(GLuint)texture +-(id)initWithContext:(GraphicsContext3D*)context { - m_contextObj = context; - m_texture = texture; + m_context = context; + m_contextObj = static_cast<CGLContextObj>(context->platformGraphicsContext3D()); + m_texture = static_cast<GLuint>(context->platformTexture()); self = [super init]; return self; } @@ -70,8 +71,8 @@ using namespace WebCore; -(void)drawInCGLContext:(CGLContextObj)glContext pixelFormat:(CGLPixelFormatObj)pixelFormat forLayerTime:(CFTimeInterval)timeInterval displayTime:(const CVTimeStamp *)timeStamp { - CGLSetCurrentContext(m_contextObj); - glFinish(); + m_context->prepareTexture(); + CGLSetCurrentContext(glContext); CGRect frame = [self frame]; |