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 |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 const SkScalar pos[], int scalarsPerPos, | 115 const SkScalar pos[], int scalarsPerPos, |
116 const SkPoint& offset, const SkPaint& paint) overri
de; | 116 const SkPoint& offset, const SkPaint& paint) overri
de; |
117 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, | 117 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, int vertexCou
nt, |
118 const SkPoint verts[], const SkPoint texs[], | 118 const SkPoint verts[], const SkPoint texs[], |
119 const SkColor colors[], SkXfermode* xmode, | 119 const SkColor colors[], SkXfermode* xmode, |
120 const uint16_t indices[], int indexCount, | 120 const uint16_t indices[], int indexCount, |
121 const SkPaint& paint) override; | 121 const SkPaint& paint) override; |
122 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const Sk
Paint&) override; | 122 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, const Sk
Paint&) override; |
123 | 123 |
124 /////////////////////////////////////////////////////////////////////////// | 124 /////////////////////////////////////////////////////////////////////////// |
| 125 |
| 126 void drawSpecial(const SkDraw&, SkSpecialImage*, int x, int y, const SkPaint
&) override; |
| 127 sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override; |
| 128 sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override; |
| 129 sk_sp<SkSpecialImage> snapSpecial() override; |
| 130 |
| 131 /////////////////////////////////////////////////////////////////////////// |
125 | 132 |
126 /** Update as needed the pixel value in the bitmap, so that the caller can | 133 /** Update as needed the pixel value in the bitmap, so that the caller can |
127 access the pixels directly. Note: only the pixels field should be | 134 access the pixels directly. Note: only the pixels field should be |
128 altered. The config/width/height/rowbytes must remain unchanged. | 135 altered. The config/width/height/rowbytes must remain unchanged. |
129 @return the device contents as a bitmap | 136 @return the device contents as a bitmap |
130 */ | 137 */ |
131 const SkBitmap& onAccessBitmap() override; | 138 const SkBitmap& onAccessBitmap() override; |
132 | 139 |
133 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } | 140 SkPixelRef* getPixelRef() const { return fBitmap.pixelRef(); } |
134 // just for subclasses, to assign a custom pixelref | 141 // just for subclasses, to assign a custom pixelref |
(...skipping 30 matching lines...) Expand all Loading... |
165 SkImageFilterCache* getImageFilterCache() override; | 172 SkImageFilterCache* getImageFilterCache() override; |
166 | 173 |
167 SkBitmap fBitmap; | 174 SkBitmap fBitmap; |
168 | 175 |
169 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). | 176 void setNewSize(const SkISize&); // Used by SkCanvas for resetForNextPictur
e(). |
170 | 177 |
171 typedef SkBaseDevice INHERITED; | 178 typedef SkBaseDevice INHERITED; |
172 }; | 179 }; |
173 | 180 |
174 #endif // SkBitmapDevice_DEFINED | 181 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |