| 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 | 9 |
| 10 #if ENABLE(ASSERT) | 10 #if ENABLE(ASSERT) |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 } | 23 } |
| 24 | 24 |
| 25 void DrawingDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, W
ebDisplayItemList* list) const | 25 void DrawingDisplayItem::appendToWebDisplayItemList(const IntRect& visualRect, W
ebDisplayItemList* list) const |
| 26 { | 26 { |
| 27 if (m_picture) | 27 if (m_picture) |
| 28 list->appendDrawingItem(visualRect, toSkSp(m_picture)); | 28 list->appendDrawingItem(visualRect, toSkSp(m_picture)); |
| 29 } | 29 } |
| 30 | 30 |
| 31 bool DrawingDisplayItem::drawsContent() const | 31 bool DrawingDisplayItem::drawsContent() const |
| 32 { | 32 { |
| 33 return m_picture; | 33 return m_picture.get(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 #ifndef NDEBUG | 36 #ifndef NDEBUG |
| 37 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB
uilder) const | 37 void DrawingDisplayItem::dumpPropertiesAsDebugString(WTF::StringBuilder& stringB
uilder) const |
| 38 { | 38 { |
| 39 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); | 39 DisplayItem::dumpPropertiesAsDebugString(stringBuilder); |
| 40 if (m_picture) { | 40 if (m_picture) { |
| 41 stringBuilder.append(WTF::String::format(", rect: [%f,%f,%f,%f]", | 41 stringBuilder.append(WTF::String::format(", rect: [%f,%f,%f,%f]", |
| 42 m_picture->cullRect().x(), m_picture->cullRect().y(), | 42 m_picture->cullRect().x(), m_picture->cullRect().y(), |
| 43 m_picture->cullRect().width(), m_picture->cullRect().height())); | 43 m_picture->cullRect().width(), m_picture->cullRect().height())); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 return bitmapIsAllZero(bitmap); | 107 return bitmapIsAllZero(bitmap); |
| 108 } | 108 } |
| 109 default: | 109 default: |
| 110 ASSERT_NOT_REACHED(); | 110 ASSERT_NOT_REACHED(); |
| 111 } | 111 } |
| 112 return false; | 112 return false; |
| 113 } | 113 } |
| 114 #endif // ENABLE(ASSERT) | 114 #endif // ENABLE(ASSERT) |
| 115 | 115 |
| 116 } // namespace blink | 116 } // namespace blink |
| OLD | NEW |