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

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

Issue 1459043003: Revert "Replaced blink sync points with new sync tokens." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/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 16d54fdb23a6b13abd067f904ad9aa639ce81dae..c8b928e6ba2d410cba0eae8b5697184f5e3e19a7 100644
--- a/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
+++ b/third_party/WebKit/Source/platform/graphics/gpu/DrawingBuffer.cpp
@@ -312,9 +312,8 @@ bool DrawingBuffer::prepareMailbox(WebExternalTextureMailbox* outMailbox, WebExt
m_contentsChanged = false;
m_context->produceTextureDirectCHROMIUM(frontColorBufferMailbox->textureInfo.textureId, GL_TEXTURE_2D, frontColorBufferMailbox->mailbox.name);
- const WGC3Duint64 fenceSync = m_context->insertFenceSyncCHROMIUM();
m_context->flush();
- frontColorBufferMailbox->mailbox.validSyncToken = m_context->genSyncTokenCHROMIUM(fenceSync, frontColorBufferMailbox->mailbox.syncToken);
+ frontColorBufferMailbox->mailbox.validSyncToken = m_context->insertSyncPoint(frontColorBufferMailbox->mailbox.syncToken);
frontColorBufferMailbox->mailbox.allowOverlay = frontColorBufferMailbox->textureInfo.imageId != 0;
setBufferClearNeeded(true);
@@ -379,7 +378,7 @@ PassRefPtr<DrawingBuffer::MailboxInfo> DrawingBuffer::recycledMailbox()
ASSERT(mailboxInfo);
if (mailboxInfo->mailbox.validSyncToken) {
- m_context->waitSyncTokenCHROMIUM(mailboxInfo->mailbox.syncToken);
+ m_context->waitSyncToken(mailboxInfo->mailbox.syncToken);
mailboxInfo->mailbox.validSyncToken = false;
}
@@ -407,7 +406,7 @@ 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.validSyncToken)
- m_context->waitSyncTokenCHROMIUM(mailbox.syncToken);
+ m_context->waitSyncToken(mailbox.syncToken);
deleteChromiumImageForTexture(&m_textureMailboxes[i]->textureInfo);
@@ -514,13 +513,11 @@ bool DrawingBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platfor
textureId = m_colorBuffer.textureId;
m_context->genMailboxCHROMIUM(mailbox.name);
m_context->produceTextureDirectCHROMIUM(textureId, GL_TEXTURE_2D, mailbox.name);
- const WGC3Duint64 fenceSync = m_context->insertFenceSyncCHROMIUM();
m_context->flush();
- mailbox.validSyncToken = m_context->genSyncTokenCHROMIUM(fenceSync, mailbox.syncToken);
+ mailbox.validSyncToken = m_context->insertSyncPoint(mailbox.syncToken);
}
- if (mailbox.validSyncToken)
- context->waitSyncTokenCHROMIUM(mailbox.syncToken);
+ context->waitSyncToken(mailbox.syncToken);
Platform3DObject sourceTexture = context->createAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
GLboolean unpackPremultiplyAlphaNeeded = GL_FALSE;
@@ -534,12 +531,10 @@ bool DrawingBuffer::copyToPlatformTexture(WebGraphicsContext3D* context, Platfor
context->deleteTexture(sourceTexture);
- const WGC3Duint64 fenceSync = context->insertFenceSyncCHROMIUM();
-
context->flush();
GLbyte syncToken[24];
- if (context->genSyncTokenCHROMIUM(fenceSync, syncToken))
- m_context->waitSyncTokenCHROMIUM(syncToken);
+ if (context->insertSyncPoint(syncToken))
+ m_context->waitSyncToken(syncToken);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698