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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/Canvas2DLayerBridge.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, 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 if (nameEquals(releasedMailboxInfo->m_mailbox, mailbox)) { 515 if (nameEquals(releasedMailboxInfo->m_mailbox, mailbox)) {
516 break; 516 break;
517 } 517 }
518 ASSERT(releasedMailboxInfo != firstMailbox); 518 ASSERT(releasedMailboxInfo != firstMailbox);
519 } 519 }
520 520
521 if (!contextLost) { 521 if (!contextLost) {
522 // Invalidate texture state in case the compositor altered it since the copy-on-write. 522 // Invalidate texture state in case the compositor altered it since the copy-on-write.
523 if (releasedMailboxInfo->m_image) { 523 if (releasedMailboxInfo->m_image) {
524 if (mailbox.syncPoint) { 524 if (mailbox.syncPoint) {
525 context()->waitSyncPoint(mailbox.syncPoint); 525 context()->waitSyncPoint(mailbox.syncPoint, nullptr);
526 } else if (mailbox.validSyncToken) {
527 context()->waitSyncPoint(0, mailbox.syncToken);
526 } 528 }
527 GrTexture* texture = releasedMailboxInfo->m_image->getTexture(); 529 GrTexture* texture = releasedMailboxInfo->m_image->getTexture();
528 if (texture) { 530 if (texture) {
529 if (lostResource) { 531 if (lostResource) {
530 texture->abandon(); 532 texture->abandon();
531 } else { 533 } else {
532 texture->textureParamsModified(); 534 texture->textureParamsModified();
533 } 535 }
534 } 536 }
535 } 537 }
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 642 }
641 643
642 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) 644 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other)
643 { 645 {
644 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); 646 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox));
645 m_image = other.m_image; 647 m_image = other.m_image;
646 m_parentLayerBridge = other.m_parentLayerBridge; 648 m_parentLayerBridge = other.m_parentLayerBridge;
647 } 649 }
648 650
649 } // namespace blink 651 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698