| 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;
|
| }
|
|
|