| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef SkPictureBuilder_h | 5 #ifndef SkPictureBuilder_h |
| 6 #define SkPictureBuilder_h | 6 #define SkPictureBuilder_h |
| 7 | 7 |
| 8 #include "platform/RuntimeEnabledFeatures.h" | 8 #include "platform/RuntimeEnabledFeatures.h" |
| 9 #include "platform/graphics/GraphicsContext.h" | 9 #include "platform/graphics/GraphicsContext.h" |
| 10 #include "platform/graphics/paint/DisplayItemList.h" | 10 #include "platform/graphics/paint/DisplayItemList.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor
()); | 32 m_context->setDeviceScaleFactor(containingContext->deviceScaleFactor
()); |
| 33 m_context->setPrinting(containingContext->printing()); | 33 m_context->setPrinting(containingContext->printing()); |
| 34 } | 34 } |
| 35 } | 35 } |
| 36 | 36 |
| 37 GraphicsContext& context() { return *m_context; } | 37 GraphicsContext& context() { return *m_context; } |
| 38 | 38 |
| 39 PassRefPtr<const SkPicture> endRecording() | 39 PassRefPtr<const SkPicture> endRecording() |
| 40 { | 40 { |
| 41 m_context->beginRecording(m_bounds); | 41 m_context->beginRecording(m_bounds); |
| 42 m_displayItemList->commitNewDisplayItemsAndReplay(*m_context); | 42 m_displayItemList->commitNewDisplayItems(); |
| 43 m_displayItemList->paintArtifact().replay(*m_context); |
| 43 return m_context->endRecording(); | 44 return m_context->endRecording(); |
| 44 } | 45 } |
| 45 | 46 |
| 46 private: | 47 private: |
| 47 OwnPtr<DisplayItemList> m_displayItemList; | 48 OwnPtr<DisplayItemList> m_displayItemList; |
| 48 OwnPtr<GraphicsContext> m_context; | 49 OwnPtr<GraphicsContext> m_context; |
| 49 FloatRect m_bounds; | 50 FloatRect m_bounds; |
| 50 }; | 51 }; |
| 51 | 52 |
| 52 } // namespace blink | 53 } // namespace blink |
| 53 | 54 |
| 54 #endif // SkPictureBuilder_h | 55 #endif // SkPictureBuilder_h |
| OLD | NEW |