| 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 #include "config.h" | 5 #include "config.h" |
| 6 #include "web/WebGraphicsContextImpl.h" | 6 #include "web/WebGraphicsContextImpl.h" |
| 7 | 7 |
| 8 #include "platform/graphics/GraphicsContext.h" | 8 #include "platform/graphics/GraphicsContext.h" |
| 9 #include "platform/graphics/paint/DrawingRecorder.h" | 9 #include "platform/graphics/paint/DrawingRecorder.h" |
| 10 | 10 |
| 11 namespace blink { | 11 namespace blink { |
| 12 | 12 |
| 13 WebGraphicsContextImpl::WebGraphicsContextImpl(GraphicsContext& graphicsContext,
const DisplayItemClientWrapper& client, DisplayItem::Type type) | 13 WebGraphicsContextImpl::WebGraphicsContextImpl(GraphicsContext& graphicsContext,
const DisplayItemClientWrapper& client, DisplayItem::Type type) |
| 14 : m_graphicsContext(graphicsContext) | 14 : m_graphicsContext(graphicsContext) |
| 15 , m_client(client) | 15 , m_client(client) |
| 16 , m_type(type) | 16 , m_type(type) |
| 17 , m_cacheSkipper(graphicsContext) |
| 17 #ifndef NDEBUG | 18 #ifndef NDEBUG |
| 18 , m_hasBegunDrawing(false) | 19 , m_hasBegunDrawing(false) |
| 19 #endif | 20 #endif |
| 20 { | 21 { |
| 21 } | 22 } |
| 22 | 23 |
| 23 WebGraphicsContextImpl::~WebGraphicsContextImpl() | 24 WebGraphicsContextImpl::~WebGraphicsContextImpl() |
| 24 { | 25 { |
| 25 } | 26 } |
| 26 | 27 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 37 return canvas; | 38 return canvas; |
| 38 } | 39 } |
| 39 | 40 |
| 40 void WebGraphicsContextImpl::endDrawing() | 41 void WebGraphicsContextImpl::endDrawing() |
| 41 { | 42 { |
| 42 ASSERT(m_drawingRecorder); | 43 ASSERT(m_drawingRecorder); |
| 43 m_drawingRecorder.clear(); | 44 m_drawingRecorder.clear(); |
| 44 } | 45 } |
| 45 | 46 |
| 46 } // namespace blink | 47 } // namespace blink |
| OLD | NEW |