Skip to content

Commit 42103c1

Browse files
authored
Merge pull request #1247 from varumugam123/invalid_context
Always make PlatformDisplay's sharingGLContext() current
2 parents 9f13ddc + 2ac9a6c commit 42103c1

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

Source/WebCore/platform/graphics/cairo/ImageBufferCairoGLSurfaceBackend.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,10 @@ void ImageBufferCairoGLSurfaceBackend::swapBuffersIfNeeded()
150150
auto backendSize = this->backendSize();
151151

152152
GLContext* previousActiveContext = GLContext::current();
153+
auto* context = PlatformDisplay::sharedDisplayForCompositing().sharingGLContext();
154+
context->makeContextCurrent();
153155

154156
if (!m_textures[1]) {
155-
auto* context = PlatformDisplay::sharedDisplayForCompositing().sharingGLContext();
156-
context->makeContextCurrent();
157-
158157
glGenTextures(1, &m_textures[1]);
159158
glBindTexture(GL_TEXTURE_2D, m_textures[1]);
160159
glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);

0 commit comments

Comments
 (0)