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

Unified Diff: cc/test/test_web_graphics_context_3d.cc

Issue 2387333003: cc: Set sync token on resource even if context is lost. (Closed)
Patch Set: danakj's review Created 4 years, 2 months 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
Index: cc/test/test_web_graphics_context_3d.cc
diff --git a/cc/test/test_web_graphics_context_3d.cc b/cc/test/test_web_graphics_context_3d.cc
index 8f690b735ecd3c760e5fb984097739a8af3bbdd6..bf7387a3dc866691a2b6ecd227b7a28da8d27aea 100644
--- a/cc/test/test_web_graphics_context_3d.cc
+++ b/cc/test/test_web_graphics_context_3d.cc
@@ -646,6 +646,10 @@ GLuint64 TestWebGraphicsContext3D::insertFenceSync() {
void TestWebGraphicsContext3D::genSyncToken(GLuint64 fence_sync,
GLbyte* sync_token) {
+ // Don't return a valid sync token if context is lost. This matches behavior
+ // of CommandBufferProxyImpl.
+ if (context_lost_)
+ return;
gpu::SyncToken sync_token_data(gpu::CommandBufferNamespace::GPU_IO, 0,
gpu::CommandBufferId(), fence_sync);
sync_token_data.SetVerifyFlush();

Powered by Google App Engine
This is Rietveld 408576698