diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-12 14:27:29 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-10-13 09:35:20 +0000 |
commit | c30a6232df03e1efbd9f3b226777b07e087a1122 (patch) | |
tree | e992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/ui/gl/gl_context.cc | |
parent | 7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff) | |
download | qtwebengine-chromium-85-based.tar.gz |
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/ui/gl/gl_context.cc')
-rw-r--r-- | chromium/ui/gl/gl_context.cc | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/chromium/ui/gl/gl_context.cc b/chromium/ui/gl/gl_context.cc index 94cf06ed56c..60c4665776f 100644 --- a/chromium/ui/gl/gl_context.cc +++ b/chromium/ui/gl/gl_context.cc @@ -201,7 +201,7 @@ void GLContext::DirtyVirtualContextState() { constexpr uint64_t kInvalidFenceId = 0; uint64_t GLContext::BackpressureFenceCreate() { - TRACE_EVENT0("gpu", "GLContextEGL::BackpressureFenceCreate"); + TRACE_EVENT0("gpu", "GLContext::BackpressureFenceCreate"); // This flush will trigger a crash if FlushForDriverCrashWorkaround is not // called sufficiently frequently. @@ -392,6 +392,9 @@ bool GLContext::MakeVirtuallyCurrent( GLContext* virtual_context, GLSurface* surface) { if (!ForceGpuSwitchIfNeeded()) return false; + if (virtual_context_lost_) + return false; + bool switched_real_contexts = GLContext::GetRealCurrent() != this; if (switched_real_contexts || !surface->IsCurrent()) { GLSurface* current_surface = GLSurface::GetCurrent(); @@ -401,6 +404,7 @@ bool GLContext::MakeVirtuallyCurrent( if (switched_real_contexts || !current_surface || !virtual_context->IsCurrent(surface)) { if (!MakeCurrent(surface)) { + virtual_context_lost_ = true; return false; } } @@ -441,6 +445,7 @@ bool GLContext::MakeVirtuallyCurrent( virtual_context->SetCurrent(surface); if (!surface->OnMakeCurrent(virtual_context)) { LOG(ERROR) << "Could not make GLSurface current."; + virtual_context_lost_ = true; return false; } return true; |