| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/PaintController.h" | 5 #include "platform/graphics/paint/PaintController.h" |
| 6 | 6 |
| 7 #include "platform/TraceEvent.h" | 7 #include "platform/TraceEvent.h" |
| 8 #include "platform/graphics/GraphicsLayer.h" | 8 #include "platform/graphics/GraphicsLayer.h" |
| 9 #include "platform/graphics/paint/DrawingDisplayItem.h" | 9 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 | 374 |
| 375 // Memory outside this class due to m_newDisplayItemList. | 375 // Memory outside this class due to m_newDisplayItemList. |
| 376 DCHECK(m_newDisplayItemList.isEmpty()); | 376 DCHECK(m_newDisplayItemList.isEmpty()); |
| 377 memoryUsage += m_newDisplayItemList.memoryUsageInBytes(); | 377 memoryUsage += m_newDisplayItemList.memoryUsageInBytes(); |
| 378 | 378 |
| 379 return memoryUsage; | 379 return memoryUsage; |
| 380 } | 380 } |
| 381 | 381 |
| 382 void PaintController::updateCacheGeneration() | 382 void PaintController::updateCacheGeneration() |
| 383 { | 383 { |
| 384 m_currentCacheGeneration = DisplayItemCacheGeneration::next(); | 384 m_currentCacheGeneration = DisplayItemClient::CacheGenerationOrInvalidationR
eason::next(); |
| 385 for (const DisplayItem& displayItem : m_currentPaintArtifact.getDisplayItemL
ist()) { | 385 for (const DisplayItem& displayItem : m_currentPaintArtifact.getDisplayItemL
ist()) { |
| 386 if (!displayItem.isCacheable()) | 386 if (!displayItem.isCacheable()) |
| 387 continue; | 387 continue; |
| 388 displayItem.client().setDisplayItemsCached(m_currentCacheGeneration); | 388 displayItem.client().setDisplayItemsCached(m_currentCacheGeneration); |
| 389 } | 389 } |
| 390 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 390 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 391 CHECK(m_currentSubsequenceClients.isEmpty()); | 391 CHECK(m_currentSubsequenceClients.isEmpty()); |
| 392 DisplayItemClient::endShouldKeepAliveAllClients(this); | 392 DisplayItemClient::endShouldKeepAliveAllClients(this); |
| 393 #endif | 393 #endif |
| 394 } | 394 } |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 | 513 |
| 514 void PaintController::showDebugData() const | 514 void PaintController::showDebugData() const |
| 515 { | 515 { |
| 516 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri
ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); | 516 WTFLogAlways("current display item list: [%s]\n", displayItemListAsDebugStri
ng(m_currentPaintArtifact.getDisplayItemList()).utf8().data()); |
| 517 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m
_newDisplayItemList).utf8().data()); | 517 WTFLogAlways("new display item list: [%s]\n", displayItemListAsDebugString(m
_newDisplayItemList).utf8().data()); |
| 518 } | 518 } |
| 519 | 519 |
| 520 #endif // ifndef NDEBUG | 520 #endif // ifndef NDEBUG |
| 521 | 521 |
| 522 } // namespace blink | 522 } // namespace blink |
| OLD | NEW |