| 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/graphics/GraphicsLayer.h" | 7 #include "platform/graphics/GraphicsLayer.h" |
| 8 #include "platform/graphics/paint/DrawingDisplayItem.h" | 8 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 9 #include "platform/tracing/TraceEvent.h" | 9 #include "platform/tracing/TraceEvent.h" |
| 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 10 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
| 11 #include "wtf/AutoReset.h" | 11 #include "wtf/AutoReset.h" |
| 12 #include "wtf/text/StringBuilder.h" | 12 #include "wtf/text/StringBuilder.h" |
| 13 | 13 |
| 14 #ifndef NDEBUG | 14 #ifndef NDEBUG |
| 15 #include "platform/graphics/LoggingCanvas.h" | 15 #include "platform/graphics/LoggingCanvas.h" |
| 16 #include <stdio.h> | 16 #include <stdio.h> |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 namespace blink { | 19 namespace blink { |
| 20 | 20 |
| 21 void PaintController::setTracksRasterInvalidations(bool value) { | 21 void PaintController::setTracksRasterInvalidations(bool value) { |
| 22 if (value) { | 22 if (value) { |
| 23 m_paintChunksRasterInvalidationTrackingMap = | 23 m_paintChunksRasterInvalidationTrackingMap = |
| 24 wrapUnique(new RasterInvalidationTrackingMap<const PaintChunk>); | 24 WTF::wrapUnique(new RasterInvalidationTrackingMap<const PaintChunk>); |
| 25 } else { | 25 } else { |
| 26 m_paintChunksRasterInvalidationTrackingMap = nullptr; | 26 m_paintChunksRasterInvalidationTrackingMap = nullptr; |
| 27 } | 27 } |
| 28 } | 28 } |
| 29 | 29 |
| 30 const PaintArtifact& PaintController::paintArtifact() const { | 30 const PaintArtifact& PaintController::paintArtifact() const { |
| 31 DCHECK(m_newDisplayItemList.isEmpty()); | 31 DCHECK(m_newDisplayItemList.isEmpty()); |
| 32 DCHECK(m_newPaintChunks.isInInitialState()); | 32 DCHECK(m_newPaintChunks.isInInitialState()); |
| 33 return m_currentPaintArtifact; | 33 return m_currentPaintArtifact; |
| 34 } | 34 } |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 887 m_currentPaintArtifact.getDisplayItemList(), showPictures) | 887 m_currentPaintArtifact.getDisplayItemList(), showPictures) |
| 888 .utf8() | 888 .utf8() |
| 889 .data()); | 889 .data()); |
| 890 WTFLogAlways("new display item list: [%s]\n", | 890 WTFLogAlways("new display item list: [%s]\n", |
| 891 displayItemListAsDebugString(m_newDisplayItemList, showPictures) | 891 displayItemListAsDebugString(m_newDisplayItemList, showPictures) |
| 892 .utf8() | 892 .utf8() |
| 893 .data()); | 893 .data()); |
| 894 } | 894 } |
| 895 | 895 |
| 896 } // namespace blink | 896 } // namespace blink |
| OLD | NEW |