| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "platform/graphics/paint/DisplayItemClient.h" | 5 #include "platform/graphics/paint/DisplayItemClient.h" |
| 6 | 6 |
| 7 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 7 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 8 #include "wtf/HashMap.h" | 8 #include "wtf/HashMap.h" |
| 9 #include "wtf/HashSet.h" | 9 #include "wtf/HashSet.h" |
| 10 #endif | 10 #endif |
| 11 | 11 |
| 12 namespace blink { | 12 namespace blink { |
| 13 | 13 |
| 14 DisplayItemCacheGeneration::Generation DisplayItemCacheGeneration::s_nextGenerat
ion = 1; | 14 DisplayItemCacheGeneration::Generation DisplayItemCacheGeneration::s_nextGenerat
ion = kFirstValidGeneration; |
| 15 | 15 |
| 16 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 16 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 17 | 17 |
| 18 HashSet<const DisplayItemClient*>* liveDisplayItemClients = nullptr; | 18 HashSet<const DisplayItemClient*>* liveDisplayItemClients = nullptr; |
| 19 HashMap<const void*, HashMap<const DisplayItemClient*, String>>* displayItemClie
ntsShouldKeepAlive = nullptr; | 19 HashMap<const void*, HashMap<const DisplayItemClient*, String>>* displayItemClie
ntsShouldKeepAlive = nullptr; |
| 20 | 20 |
| 21 DisplayItemClient::DisplayItemClient() | 21 DisplayItemClient::DisplayItemClient() |
| 22 { | 22 { |
| 23 if (displayItemClientsShouldKeepAlive) { | 23 if (displayItemClientsShouldKeepAlive) { |
| 24 for (auto item : *displayItemClientsShouldKeepAlive) | 24 for (auto item : *displayItemClientsShouldKeepAlive) |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 void DisplayItemClient::endShouldKeepAliveAllClients() | 67 void DisplayItemClient::endShouldKeepAliveAllClients() |
| 68 { | 68 { |
| 69 delete displayItemClientsShouldKeepAlive; | 69 delete displayItemClientsShouldKeepAlive; |
| 70 displayItemClientsShouldKeepAlive = nullptr; | 70 displayItemClientsShouldKeepAlive = nullptr; |
| 71 } | 71 } |
| 72 | 72 |
| 73 #endif // CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 73 #endif // CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 74 | 74 |
| 75 } // namespace blink | 75 } // namespace blink |
| OLD | NEW |