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 | 6 |
7 #include "platform/graphics/RecordingImageBufferSurface.h" | 7 #include "platform/graphics/RecordingImageBufferSurface.h" |
8 | 8 |
9 #include "platform/graphics/GraphicsContext.h" | 9 #include "platform/graphics/GraphicsContext.h" |
10 #include "platform/graphics/ImageBuffer.h" | 10 #include "platform/graphics/ImageBuffer.h" |
11 #include "third_party/skia/include/core/SkCanvas.h" | 11 #include "third_party/skia/include/core/SkCanvas.h" |
12 #include "third_party/skia/include/core/SkPictureRecorder.h" | 12 #include "third_party/skia/include/core/SkPictureRecorder.h" |
13 #include "wtf/PassOwnPtr.h" | 13 #include "wtf/PassOwnPtr.h" |
14 #include "wtf/PassRefPtr.h" | 14 #include "wtf/PassRefPtr.h" |
15 | 15 |
16 namespace WebCore { | 16 namespace blink { |
17 | 17 |
18 RecordingImageBufferSurface::RecordingImageBufferSurface(const IntSize& size, Op
acityMode opacityMode) | 18 RecordingImageBufferSurface::RecordingImageBufferSurface(const IntSize& size, Op
acityMode opacityMode) |
19 : ImageBufferSurface(size, opacityMode) | 19 : ImageBufferSurface(size, opacityMode) |
20 , m_graphicsContext(0) | 20 , m_graphicsContext(0) |
21 , m_initialSaveCount(0) | 21 , m_initialSaveCount(0) |
22 , m_frameWasCleared(true) | 22 , m_frameWasCleared(true) |
23 , m_surfaceUsedSincePreviousFrameWasPresented(false) | 23 , m_surfaceUsedSincePreviousFrameWasPresented(false) |
24 { | 24 { |
25 initializeCurrentFrame(); | 25 initializeCurrentFrame(); |
26 } | 26 } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 initializeCurrentFrame(); | 137 initializeCurrentFrame(); |
138 | 138 |
139 SkCanvas* newCanvas = m_currentFrame->getRecordingCanvas(); | 139 SkCanvas* newCanvas = m_currentFrame->getRecordingCanvas(); |
140 newCanvas->concat(ctm); | 140 newCanvas->concat(ctm); |
141 newCanvas->clipRect(clip); | 141 newCanvas->clipRect(clip); |
142 | 142 |
143 m_frameWasCleared = false; | 143 m_frameWasCleared = false; |
144 return true; | 144 return true; |
145 } | 145 } |
146 | 146 |
147 } // namespace WebCore | 147 } // namespace blink |
OLD | NEW |