| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 void PaintController::copyCachedSubsequence(const DisplayItemList& currentList,
DisplayItemList::iterator& currentIt, DisplayItemList& updatedList, SkPictureGpu
Analyzer& gpuAnalyzer) | 213 void PaintController::copyCachedSubsequence(const DisplayItemList& currentList,
DisplayItemList::iterator& currentIt, DisplayItemList& updatedList, SkPictureGpu
Analyzer& gpuAnalyzer) |
| 214 { | 214 { |
| 215 DCHECK(currentIt->getType() == DisplayItem::Subsequence); | 215 DCHECK(currentIt->getType() == DisplayItem::Subsequence); |
| 216 DisplayItem::Id endSubsequenceId(currentIt->client(), DisplayItem::EndSubseq
uence); | 216 DisplayItem::Id endSubsequenceId(currentIt->client(), DisplayItem::EndSubseq
uence); |
| 217 do { | 217 do { |
| 218 // We should always find the EndSubsequence display item. | 218 // We should always find the EndSubsequence display item. |
| 219 DCHECK(currentIt != m_currentPaintArtifact.getDisplayItemList().end()); | 219 DCHECK(currentIt != m_currentPaintArtifact.getDisplayItemList().end()); |
| 220 DCHECK(currentIt->hasValidClient()); | 220 DCHECK(currentIt->hasValidClient()); |
| 221 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS | 221 #if CHECK_DISPLAY_ITEM_CLIENT_ALIVENESS |
| 222 CHECK(clientCacheIsValid(currentIt->client()) || !currentIt->isCacheable
()); | 222 CHECK(currentIt->client().isAlive()); |
| 223 #endif | 223 #endif |
| 224 updatedList.appendByMoving(*currentIt, currentList.visualRect(currentIt
- m_currentPaintArtifact.getDisplayItemList().begin()), gpuAnalyzer); | 224 updatedList.appendByMoving(*currentIt, currentList.visualRect(currentIt
- m_currentPaintArtifact.getDisplayItemList().begin()), gpuAnalyzer); |
| 225 ++currentIt; | 225 ++currentIt; |
| 226 } while (!endSubsequenceId.matches(updatedList.last())); | 226 } while (!endSubsequenceId.matches(updatedList.last())); |
| 227 } | 227 } |
| 228 | 228 |
| 229 static IntRect visualRectForDisplayItem(const DisplayItem& displayItem, const La
youtSize& offsetFromLayoutObject) | 229 static IntRect visualRectForDisplayItem(const DisplayItem& displayItem, const La
youtSize& offsetFromLayoutObject) |
| 230 { | 230 { |
| 231 LayoutRect visualRect = displayItem.client().visualRect(); | 231 LayoutRect visualRect = displayItem.client().visualRect(); |
| 232 visualRect.move(-offsetFromLayoutObject); | 232 visualRect.move(-offsetFromLayoutObject); |
| (...skipping 280 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 |