Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1012)

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp

Issue 2567733002: replace flaky DCHECK in DrawingBuffer with early-out (Closed)
Patch Set: add comment + rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_conformance_expectations.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
index 03530d5f11a032dcd567d80ab8472752b7fb404e..547c1341da87bcb9d927d52d58904ba1ebbc682f 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -713,7 +713,11 @@ bool DrawingBuffer::copyToPlatformTexture(gpu::gles2::GLES2Interface* gl,
m_gl->GenSyncTokenCHROMIUM(fenceSync, produceSyncToken.GetData());
}
- DCHECK(produceSyncToken.HasData());
+ if (!produceSyncToken.HasData()) {
+ // This should only happen if the context has been lost.
+ return false;
+ }
+
gl->WaitSyncTokenCHROMIUM(produceSyncToken.GetConstData());
GLuint sourceTexture =
gl->CreateAndConsumeTextureCHROMIUM(target, mailbox.name);
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_conformance_expectations.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698