| 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/DrawingDisplayItem.h" | 5 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 6 | 6 |
| 7 #include "platform/graphics/GraphicsContext.h" | 7 #include "platform/graphics/GraphicsContext.h" |
| 8 #include "public/platform/WebDisplayItemList.h" | 8 #include "public/platform/WebDisplayItemList.h" |
| 9 #include "third_party/skia/include/core/SkPictureAnalyzer.h" | 9 #include "third_party/skia/include/core/SkPictureAnalyzer.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 } | 24 } |
| 25 | 25 |
| 26 void DrawingDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, W
ebDisplayItemList* list) const | 26 void DrawingDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, W
ebDisplayItemList* list) const |
| 27 { | 27 { |
| 28 if (m_picture) | 28 if (m_picture) |
| 29 list->appendDrawingItem(visualRect, toSkSp(m_picture)); | 29 list->appendDrawingItem(visualRect, toSkSp(m_picture)); |
| 30 } | 30 } |
| 31 | 31 |
| 32 bool DrawingDisplayItem::drawsContent() const | 32 bool DrawingDisplayItem::drawsContent() const |
| 33 { | 33 { |
| 34 return m_picture; | 34 return m_picture.get(); |
| 35 } | 35 } |
| 36 | 36 |
| 37 void DrawingDisplayItem::analyzeForGpuRasterization(SkPictureGpuAnalyzer& analyz
er) const | 37 void DrawingDisplayItem::analyzeForGpuRasterization(SkPictureGpuAnalyzer& analyz
er) const |
| 38 { | 38 { |
| 39 analyzer.analyzePicture(m_picture.get()); | 39 analyzer.analyzePicture(m_picture.get()); |
| 40 } | 40 } |
| 41 | 41 |
| 42 #ifndef NDEBUG | 42 #ifndef NDEBUG |
| 43 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB
uilder) const | 43 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB
uilder) const |
| 44 { | 44 { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 return bitmapIsAllZero(bitmap); | 113 return bitmapIsAllZero(bitmap); |
| 114 } | 114 } |
| 115 default: | 115 default: |
| 116 ASSERT_NOT_REACHED(); | 116 ASSERT_NOT_REACHED(); |
| 117 } | 117 } |
| 118 return false; | 118 return false; |
| 119 } | 119 } |
| 120 #endif // ENABLE(ASSERT) | 120 #endif // ENABLE(ASSERT) |
| 121 | 121 |
| 122 } // namespace blink | 122 } // namespace blink |
| OLD | NEW |