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

Unified Diff: third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.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: Fix mock gpu video accelerator factory Created 5 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: 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 46d5362e87646632b3469c07389fc540a3bb24f2..83d98209e6783f7b9a62dd4b887b2cbb8dd8bdfa 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -369,9 +369,11 @@ PassRefPtr<DrawingBuffer::MailboxInfo> DrawingBuffer::recycledMailbox()
}
ASSERT(mailboxInfo);
- if (mailboxInfo->mailbox.syncPoint) {
- m_context->waitSyncPoint(mailboxInfo->mailbox.syncPoint);
+ if (mailboxInfo->mailbox.syncPoint || mailboxInfo->mailbox.validSyncToken) {
+ m_context->waitSyncPoint(mailboxInfo->mailbox.syncPoint,
+ mailboxInfo->mailbox.syncToken);
mailboxInfo->mailbox.syncPoint = 0;
+ mailboxInfo->mailbox.validSyncToken = false;
}
if (mailboxInfo->size != m_size) {
@@ -397,8 +399,8 @@ void DrawingBuffer::deleteMailbox(const WebExternalTextureMailbox& mailbox)
{
for (size_t i = 0; i < m_textureMailboxes.size(); i++) {
if (nameEquals(m_textureMailboxes[i]->mailbox, mailbox)) {
- if (mailbox.syncPoint)
- m_context->waitSyncPoint(mailbox.syncPoint);
+ if (mailbox.syncPoint || mailbox.validSyncToken)
+ m_context->waitSyncPoint(mailbox.syncPoint, mailbox.syncToken);
deleteChromiumImageForTexture(&m_textureMailboxes[i]->textureInfo);
@@ -509,7 +511,7 @@ bool DrawingBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platfor
mailbox.syncPoint = m_context->insertSyncPoint();
}
- context->waitSyncPoint(mailbox.syncPoint);
+ context->waitSyncPoint(mailbox.syncPoint, mailbox.syncToken);
Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE;
@@ -524,7 +526,7 @@ bool DrawingBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platfor
context->deleteTexture(sourceTexture);
context->flush();
- m_context->waitSyncPoint(context->insertSyncPoint());
+ m_context->waitSyncPoint(context->insertSyncPoint(), nullptr);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698