Chromium Code Reviews| 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 if (Canvas2DLayerManager::get().isInList(this)) { |
|
Stephen Chennney
2015/06/25 16:26:24
Why not just change this to RELEASE_ASSERT(...)?
| |
| 123 // TODO(junov): This can go back to being an ASSERT when done investigat ing crbug.com/466793 | |
| 124 CRASH(); | |
| 125 } | |
| 123 if (m_canvas) | 126 if (m_canvas) |
| 124 m_canvas->setNotificationClient(nullptr); | 127 m_canvas->setNotificationClient(nullptr); |
| 125 m_layer.clear(); | 128 m_layer.clear(); |
| 126 ASSERT(m_mailboxes.size() == 0); | 129 ASSERT(m_mailboxes.size() == 0); |
| 127 #ifndef NDEBUG | 130 #ifndef NDEBUG |
| 128 canvas2DLayerBridgeInstanceCounter.decrement(); | 131 canvas2DLayerBridgeInstanceCounter.decrement(); |
| 129 #endif | 132 #endif |
| 130 } | 133 } |
| 131 | 134 |
| 132 void Canvas2DLayerBridge::beginDestruction() | 135 void Canvas2DLayerBridge::beginDestruction() |
| (...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 532 return adoptRef(m_canvas->newImageSnapshot()); | 535 return adoptRef(m_canvas->newImageSnapshot()); |
| 533 } | 536 } |
| 534 | 537 |
| 535 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) { | 538 Canvas2DLayerBridge::MailboxInfo::MailboxInfo(const MailboxInfo& other) { |
| 536 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); | 539 memcpy(&m_mailbox, &other.m_mailbox, sizeof(m_mailbox)); |
| 537 m_image = other.m_image; | 540 m_image = other.m_image; |
| 538 m_parentLayerBridge = other.m_parentLayerBridge; | 541 m_parentLayerBridge = other.m_parentLayerBridge; |
| 539 } | 542 } |
| 540 | 543 |
| 541 } // namespace blink | 544 } // namespace blink |
| OLD | NEW |