| OLD | NEW |
| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 m_layer->setNearestNeighbor(m_filterQuality == kNone_SkFilterQuality); | 112 m_layer->setNearestNeighbor(m_filterQuality == kNone_SkFilterQuality); |
| 113 m_canvas->setNotificationClient(this); | 113 m_canvas->setNotificationClient(this); |
| 114 #ifndef NDEBUG | 114 #ifndef NDEBUG |
| 115 canvas2DLayerBridgeInstanceCounter.increment(); | 115 canvas2DLayerBridgeInstanceCounter.increment(); |
| 116 #endif | 116 #endif |
| 117 } | 117 } |
| 118 | 118 |
| 119 Canvas2DLayerBridge::~Canvas2DLayerBridge() | 119 Canvas2DLayerBridge::~Canvas2DLayerBridge() |
| 120 { | 120 { |
| 121 ASSERT(m_destructionInProgress); | 121 ASSERT(m_destructionInProgress); |
| 122 ASSERT(!Canvas2DLayerManager::get().isInList(this)); | 122 // TODO(junov): This can go back to a regular ASSERT once crbug.com/466793 i
s resolved. |
| 123 RELEASE_ASSERT(!Canvas2DLayerManager::get().isInList(this)); |
| 123 if (m_canvas) | 124 if (m_canvas) |
| 124 m_canvas->setNotificationClient(nullptr); | 125 m_canvas->setNotificationClient(nullptr); |
| 125 m_layer.clear(); | 126 m_layer.clear(); |
| 126 ASSERT(m_mailboxes.size() == 0); | 127 ASSERT(m_mailboxes.size() == 0); |
| 127 #ifndef NDEBUG | 128 #ifndef NDEBUG |
| 128 canvas2DLayerBridgeInstanceCounter.decrement(); | 129 canvas2DLayerBridgeInstanceCounter.decrement(); |
| 129 #endif | 130 #endif |
| 130 } | 131 } |
| 131 | 132 |
| 132 void Canvas2DLayerBridge::beginDestruction() | 133 void Canvas2DLayerBridge::beginDestruction() |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 return adoptRef(m_canvas->newImageSnapshot()); | 533 return adoptRef(m_canvas->newImageSnapshot()); |
| 533 } | 534 } |
| 534 | 535 |
| 535 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) { | 536 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) { |
| 536 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); | 537 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); |
| 537 m_image = other.m_image; | 538 m_image = other.m_image; |
| 538 m_parentLayerBridge = other.m_parentLayerBridge; | 539 m_parentLayerBridge = other.m_parentLayerBridge; |
| 539 } | 540 } |
| 540 | 541 |
| 541 } // namespace blink | 542 } // namespace blink |
| OLD | NEW |