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

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: Folded sync_point into sync_tokens 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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 --releasedMailboxInfo; 514 --releasedMailboxInfo;
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.validSyncToken)
525 context()->waitSyncPoint(mailbox.syncPoint); 525 context()->waitSyncToken(mailbox.syncToken);
526 }
527 GrTexture* texture = releasedMailboxInfo->m_image->getTexture(); 526 GrTexture* texture = releasedMailboxInfo->m_image->getTexture();
528 if (texture) { 527 if (texture) {
529 if (lostResource) { 528 if (lostResource) {
530 texture->abandon(); 529 texture->abandon();
531 } else { 530 } else {
532 texture->textureParamsModified(); 531 texture->textureParamsModified();
533 } 532 }
534 } 533 }
535 } 534 }
536 } 535 }
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
640 } 639 }
641 640
642 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) 641 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other)
643 { 642 {
644 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); 643 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox));
645 m_image = other.m_image; 644 m_image = other.m_image;
646 m_parentLayerBridge = other.m_parentLayerBridge; 645 m_parentLayerBridge = other.m_parentLayerBridge;
647 } 646 }
648 647
649 } // namespace blink 648 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698