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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp

Issue 1427543002: Modified old wait sync point functions to also accept new sync tokens. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: format Created 5 years, 1 month 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: third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
index 51465ee01b9e4dae52de954ec294657ae3c1f78c..06088dc9d96fd00d3197d204eef963a114bd624c 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.cpp
@@ -214,9 +214,10 @@ bool ImageBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platform3
sharedContext->produceTextureDirectCHROMIUM(textureId, GL_TEXTURE_2D, mailbox->name);
sharedContext->flush();
- mailbox->syncPoint = sharedContext->insertSyncPoint();
+ mailbox->validSyncToken = sharedContext->insertSyncPoint(mailbox->syncToken);
+ if (mailbox->validSyncToken)
+ context->waitSyncToken(mailbox->syncToken);
- context->waitSyncPoint(mailbox->syncPoint);
Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox->name);
// The canvas is stored in a premultiplied format, so unpremultiply if necessary.
@@ -226,7 +227,10 @@ bool ImageBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platform3
context->deleteTexture(sourceTexture);
context->flush();
- sharedContext->waitSyncPoint(context->insertSyncPoint());
+
+ WGC3Dbyte syncToken[24];
+ if (context->insertSyncPoint(syncToken))
+ sharedContext->waitSyncToken(syncToken);
// Undo grContext texture binding changes introduced in this function
provider->grContext()->resetContext(kTextureBinding_GrGLBackendState);

Powered by Google App Engine
This is Rietveld 408576698