| 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 "config.h" | 5 #include "config.h" |
| 6 #include "platform/graphics/paint/DrawingDisplayItem.h" | 6 #include "platform/graphics/paint/DrawingDisplayItem.h" |
| 7 | 7 |
| 8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
| 9 #include "public/platform/WebDisplayItemList.h" | 9 #include "public/platform/WebDisplayItemList.h" |
| 10 | 10 |
| 11 #if ENABLE(ASSERT) | 11 #if ENABLE(ASSERT) |
| 12 #include "third_party/skia/include/core/SkBitmap.h" | 12 #include "third_party/skia/include/core/SkBitmap.h" |
| 13 #include "third_party/skia/include/core/SkCanvas.h" | 13 #include "third_party/skia/include/core/SkCanvas.h" |
| 14 #include "third_party/skia/include/core/SkData.h" | 14 #include "third_party/skia/include/core/SkData.h" |
| 15 #include "third_party/skia/include/core/SkStream.h" | 15 #include "third_party/skia/include/core/SkStream.h" |
| 16 #endif | 16 #endif |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| 19 | 19 |
| 20 void DrawingDisplayItem::replay(GraphicsContext& context) | 20 void DrawingDisplayItem::replay(GraphicsContext& context) const |
| 21 { | 21 { |
| 22 if (m_picture) | 22 if (m_picture) |
| 23 context.drawPicture(m_picture.get()); | 23 context.drawPicture(m_picture.get()); |
| 24 } | 24 } |
| 25 | 25 |
| 26 void DrawingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) co
nst | 26 void DrawingDisplayItem::appendToWebDisplayItemList(WebDisplayItemList* list) co
nst |
| 27 { | 27 { |
| 28 if (m_picture) | 28 if (m_picture) |
| 29 list->appendDrawingItem(m_picture.get()); | 29 list->appendDrawingItem(m_picture.get()); |
| 30 } | 30 } |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 return bitmapIsAllZero(bitmap); | 108 return bitmapIsAllZero(bitmap); |
| 109 } | 109 } |
| 110 default: | 110 default: |
| 111 ASSERT_NOT_REACHED(); | 111 ASSERT_NOT_REACHED(); |
| 112 } | 112 } |
| 113 return false; | 113 return false; |
| 114 } | 114 } |
| 115 #endif // ENABLE(ASSERT) | 115 #endif // ENABLE(ASSERT) |
| 116 | 116 |
| 117 } | 117 } |
| OLD | NEW |