WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
patch
makecurrentfix.patch (text/plain), 4.68 KB, created by
Kalyan
on 2013-03-23 02:26:02 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Kalyan
Created:
2013-03-23 02:26:02 PDT
Size:
4.68 KB
patch
obsolete
>diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 8678f31..f984c8d 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,28 @@ >+2013-03-22 KondapallyKalyan <kalyan.kondapally@intel.com> >+ >+ [EFL] Add support to check for current Drawable. >+ https://bugs.webkit.org/show_bug.cgi?id=113103 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Covered by existing WebGL tests. >+ >+ In MakeCurrent we do an early return if it is >+ the current GL context but ignore Surface. This >+ patch fixes the issue, we now check for both >+ context and surface before doing an early return >+ in MakeCurrent. >+ >+ * platform/graphics/opengl/GLPlatformContext.cpp: >+ (WebCore::GLPlatformContext::makeCurrent): >+ (WebCore::GLPlatformContext::releaseCurrent): >+ (WebCore::GLPlatformContext::destroy): >+ * platform/graphics/opengl/GLPlatformSurface.cpp: >+ (WebCore): >+ (WebCore::GLPlatformSurface::isCurrentDrawable): >+ (WebCore::GLPlatformSurface::onMakeCurrent): >+ * platform/graphics/opengl/GLPlatformSurface.h: >+ > 2013-03-22 Kondapally Kalyan <kalyan.kondapally@intel.com> > > [EFL] Fix build issues to enable CSS Filter and Shaders support. >diff --git a/Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp b/Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp >index bce0425..89ee6b0 100644 >--- a/Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GLPlatformContext.cpp >@@ -197,15 +197,17 @@ bool GLPlatformContext::makeCurrent(GLPlatformSurface* surface) > { > m_contextLost = false; > >- if (isCurrentContext()) >+ if (m_currentContext == this && (!surface || surface->isCurrentDrawable())) > return true; > > m_currentContext = 0; > > if (!surface || (surface && !surface->drawable())) > platformReleaseCurrent(); >- else if (platformMakeCurrent(surface)) >+ else if (platformMakeCurrent(surface)) { > m_currentContext = this; >+ surface->onMakeCurrent(); >+ } > > if (m_resetLostContext) { > resolveResetStatusExtension(); >@@ -240,11 +242,10 @@ bool GLPlatformContext::isValid() const > > void GLPlatformContext::releaseCurrent() > { >- if (!isCurrentContext()) >- return; >- >- m_currentContext = 0; >- platformReleaseCurrent(); >+ if (this == m_currentContext) { >+ m_currentContext = 0; >+ platformReleaseCurrent(); >+ } > } > > PlatformContext GLPlatformContext::handle() const >@@ -281,9 +282,6 @@ void GLPlatformContext::destroy() > { > m_contextHandle = 0; > m_resetLostContext = false; >- >- if (this == m_currentContext) >- m_currentContext = 0; > } > > } // namespace WebCore >diff --git a/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp b/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp >index 0db80e0..9178fee 100644 >--- a/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.cpp >@@ -40,6 +40,8 @@ > > namespace WebCore { > >+static GLPlatformSurface* m_currentDrawable = 0; >+ > PassOwnPtr<GLPlatformSurface> GLPlatformSurface::createOffScreenSurface(SurfaceAttributes attributes) > { > #if USE(GLX) >@@ -63,6 +65,8 @@ GLPlatformSurface::GLPlatformSurface(SurfaceAttributes) > > GLPlatformSurface::~GLPlatformSurface() > { >+ if (m_currentDrawable == this) >+ m_currentDrawable = 0; > } > > PlatformBufferHandle GLPlatformSurface::handle() const >@@ -95,6 +99,16 @@ void GLPlatformSurface::swapBuffers() > notImplemented(); > } > >+bool GLPlatformSurface::isCurrentDrawable() const >+{ >+ return m_currentDrawable == this; >+} >+ >+void GLPlatformSurface::onMakeCurrent() >+{ >+ m_currentDrawable = this; >+} >+ > void GLPlatformSurface::updateContents(const uint32_t) > { > } >@@ -105,6 +119,8 @@ void GLPlatformSurface::setGeometry(const IntRect&) > > void GLPlatformSurface::destroy() > { >+ if (m_currentDrawable == this) >+ m_currentDrawable = 0; > } > > GLPlatformSurface::SurfaceAttributes GLPlatformSurface::attributes() const >diff --git a/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h b/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h >index 543b675..d276fa5 100644 >--- a/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h >+++ b/Source/WebCore/platform/graphics/opengl/GLPlatformSurface.h >@@ -67,6 +67,9 @@ public: > > virtual void swapBuffers(); > >+ virtual bool isCurrentDrawable() const; >+ virtual void onMakeCurrent(); >+ > // Convenience Function to update surface backbuffer with texture contents. > // Note that the function doesn't track or restore any GL states. > // Function does the following(in order):
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 113103
: 194695