OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef SkBitmapDevice_DEFINED | 9 #ifndef SkBitmapDevice_DEFINED |
10 #define SkBitmapDevice_DEFINED | 10 #define SkBitmapDevice_DEFINED |
11 | 11 |
12 #include "SkBitmap.h" | 12 #include "SkBitmap.h" |
13 #include "SkCanvas.h" | 13 #include "SkCanvas.h" |
14 #include "SkColor.h" | 14 #include "SkColor.h" |
15 #include "SkDevice.h" | 15 #include "SkDevice.h" |
16 #include "SkImageInfo.h" | 16 #include "SkImageInfo.h" |
17 #include "SkRect.h" | 17 #include "SkRect.h" |
18 #include "SkScalar.h" | 18 #include "SkScalar.h" |
19 #include "SkSize.h" | 19 #include "SkSize.h" |
20 #include "SkSurfaceProps.h" | 20 #include "SkSurfaceProps.h" |
21 #include "SkTypes.h" | 21 #include "SkTypes.h" |
22 | 22 |
23 class SkDraw; | 23 class SkDraw; |
24 class SkImageFilterCache; | 24 class SkImageFilterCache; |
25 class SkMatrix; | 25 class SkMatrix; |
26 class SkPaint; | 26 class SkPaint; |
27 class SkPath; | 27 class SkPath; |
28 class SkPixelRef; | 28 class SkPixelRef; |
29 class SkPixmap; | 29 class SkPixmap; |
| 30 class SkRasterCanvasLayerAllocator; |
30 class SkRRect; | 31 class SkRRect; |
31 class SkSurface; | 32 class SkSurface; |
32 class SkXfermode; | 33 class SkXfermode; |
33 struct SkPoint; | 34 struct SkPoint; |
34 | 35 |
35 /////////////////////////////////////////////////////////////////////////////// | 36 /////////////////////////////////////////////////////////////////////////////// |
36 class SK_API SkBitmapDevice : public SkBaseDevice { | 37 class SK_API SkBitmapDevice : public SkBaseDevice { |
37 public: | 38 public: |
38 /** | 39 /** |
39 * Construct a new device with the specified bitmap as its backend. It is | 40 * Construct a new device with the specified bitmap as its backend. It is |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 friend class SkDrawIter; | 152 friend class SkDrawIter; |
152 friend class SkDeviceFilteredPaint; | 153 friend class SkDeviceFilteredPaint; |
153 | 154 |
154 friend class SkSurface_Raster; | 155 friend class SkSurface_Raster; |
155 | 156 |
156 // used to change the backend's pixels (and possibly config/rowbytes) | 157 // used to change the backend's pixels (and possibly config/rowbytes) |
157 // but cannot change the width/height, so there should be no change to | 158 // but cannot change the width/height, so there should be no change to |
158 // any clip information. | 159 // any clip information. |
159 void replaceBitmapBackendForRasterSurface(const SkBitmap&) override; | 160 void replaceBitmapBackendForRasterSurface(const SkBitmap&) override; |
160 | 161 |
161 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; | 162 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*, |
| 163 SkRasterCanvasLayerAllocator*) override; |
162 | 164 |
163 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; | 165 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; |
164 | 166 |
165 SkImageFilterCache* getImageFilterCache() override; | 167 SkImageFilterCache* getImageFilterCache() override; |
166 | 168 |
167 SkBitmap fBitmap; | 169 SkBitmap fBitmap; |
168 | 170 |
169 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). | 171 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). |
170 | 172 |
171 typedef SkBaseDevice INHERITED; | 173 typedef SkBaseDevice INHERITED; |
172 }; | 174 }; |
173 | 175 |
174 #endif // SkBitmapDevice_DEFINED | 176 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |