| Index: Source/core/html/canvas/WebGLFramebuffer.cpp
|
| diff --git a/Source/core/html/canvas/WebGLFramebuffer.cpp b/Source/core/html/canvas/WebGLFramebuffer.cpp
|
| index 4d622cfaca290131702086366d500cdc83b34d92..bd44076c72748049c05f2eaef7601e89c3570814 100644
|
| --- a/Source/core/html/canvas/WebGLFramebuffer.cpp
|
| +++ b/Source/core/html/canvas/WebGLFramebuffer.cpp
|
| @@ -424,7 +424,7 @@ GC3Denum WebGLFramebuffer::getColorBufferFormat() const
|
| return attachment->getFormat();
|
| }
|
|
|
| -GC3Denum WebGLFramebuffer::checkStatus(const char** reason) const
|
| +GC3Denum WebGLFramebuffer::checkStatus(WebGLRenderingContext* context, WebGLSharedObject::AcquireMode neededAccessMode, const char** reason) const
|
| {
|
| unsigned int count = 0;
|
| GC3Dsizei width = 0, height = 0;
|
| @@ -439,6 +439,9 @@ GC3Denum WebGLFramebuffer::checkStatus(const char** reason) const
|
| *reason = "attachment is not valid";
|
| return GraphicsContext3D::FRAMEBUFFER_UNSUPPORTED;
|
| }
|
| + WebGLSharedObject* object = attachment->getObject();
|
| + if (object && !object->isAcquiredForContext(context, neededAccessMode, true, 0, reason))
|
| + return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
|
| if (!attachment->getFormat()) {
|
| *reason = "attachment is an unsupported format";
|
| return GraphicsContext3D::FRAMEBUFFER_INCOMPLETE_ATTACHMENT;
|
| @@ -481,9 +484,9 @@ GC3Denum WebGLFramebuffer::checkStatus(const char** reason) const
|
| return GraphicsContext3D::FRAMEBUFFER_COMPLETE;
|
| }
|
|
|
| -bool WebGLFramebuffer::onAccess(GraphicsContext3D* context3d, const char** reason)
|
| +bool WebGLFramebuffer::onAccess(WebGLRenderingContext* context, WebGLSharedObject::AcquireMode neededAccessMode, const char** reason)
|
| {
|
| - if (checkStatus(reason) != GraphicsContext3D::FRAMEBUFFER_COMPLETE)
|
| + if (checkStatus(context, neededAccessMode, reason) != GraphicsContext3D::FRAMEBUFFER_COMPLETE)
|
| return false;
|
| return true;
|
| }
|
|
|