summaryrefslogtreecommitdiff
path: root/chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2022-06-22 09:53:13 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2022-06-22 10:23:17 +0000
commitc5dbcb143405a38088d78b4b760d64aaff5157ab (patch)
treeb37edca540b35f898e212bebfa6ded0806988122 /chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp
parent774f54339e5db91f785733232d3950366db65d07 (diff)
downloadqtwebengine-chromium-c5dbcb143405a38088d78b4b760d64aaff5157ab.tar.gz
BASELINE: Update Chromium to 102.0.5005.137
Change-Id: I162cdc7f56760218868e000a4c8ea92573344036 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp')
-rw-r--r--chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp b/chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp
index 0554b7f40c6..645f53ba038 100644
--- a/chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp
+++ b/chromium/third_party/angle/src/libGLESv2/egl_stubs.cpp
@@ -61,7 +61,7 @@ EGLBoolean BindTexImage(Thread *thread, Display *display, Surface *eglSurface, E
GetDisplayIfValid(display), EGL_FALSE);
gl::Context *context = thread->getContext();
- if (context)
+ if (context && !context->isContextLost())
{
gl::TextureType type =
egl_gl::EGLTextureTargetToTextureType(eglSurface->getTextureTarget());
@@ -573,15 +573,18 @@ EGLBoolean ReleaseTexImage(Thread *thread, Display *display, Surface *eglSurface
{
ANGLE_EGL_TRY_RETURN(thread, display->prepareForCall(), "eglReleaseTexImage",
GetDisplayIfValid(display), EGL_FALSE);
- gl::Texture *texture = eglSurface->getBoundTexture();
-
- if (texture)
+ gl::Context *context = thread->getContext();
+ if (context && !context->isContextLost())
{
- ANGLE_EGL_TRY_RETURN(thread, eglSurface->releaseTexImage(thread->getContext(), buffer),
- "eglReleaseTexImage", GetSurfaceIfValid(display, eglSurface),
- EGL_FALSE);
- }
+ gl::Texture *texture = eglSurface->getBoundTexture();
+ if (texture)
+ {
+ ANGLE_EGL_TRY_RETURN(thread, eglSurface->releaseTexImage(thread->getContext(), buffer),
+ "eglReleaseTexImage", GetSurfaceIfValid(display, eglSurface),
+ EGL_FALSE);
+ }
+ }
thread->setSuccess();
return EGL_TRUE;
}