OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkPDFDevice_DEFINED | 8 #ifndef SkPDFDevice_DEFINED |
9 #define SkPDFDevice_DEFINED | 9 #define SkPDFDevice_DEFINED |
10 | 10 |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 protected: | 195 protected: |
196 const SkBitmap& onAccessBitmap() override { | 196 const SkBitmap& onAccessBitmap() override { |
197 return fLegacyBitmap; | 197 return fLegacyBitmap; |
198 } | 198 } |
199 | 199 |
200 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; | 200 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; |
201 | 201 |
202 void drawAnnotation(const SkDraw&, const SkRect&, const char key[], SkData*
value) override; | 202 void drawAnnotation(const SkDraw&, const SkRect&, const char key[], SkData*
value) override; |
203 | 203 |
| 204 void drawSpecial(const SkDraw&, SkSpecialImage*, int x, int y, const SkPaint
&) override; |
| 205 sk_sp<SkSpecialImage> makeSpecial(const SkBitmap&) override; |
| 206 sk_sp<SkSpecialImage> makeSpecial(const SkImage*) override; |
| 207 sk_sp<SkSpecialImage> snapSpecial() override; |
| 208 |
204 private: | 209 private: |
205 struct RectWithData { | 210 struct RectWithData { |
206 SkRect rect; | 211 SkRect rect; |
207 sk_sp<SkData> data; | 212 sk_sp<SkData> data; |
208 RectWithData(const SkRect& rect, SkData* data) | 213 RectWithData(const SkRect& rect, SkData* data) |
209 : rect(rect), data(SkRef(data)) {} | 214 : rect(rect), data(SkRef(data)) {} |
210 RectWithData(RectWithData&& other) | 215 RectWithData(RectWithData&& other) |
211 : rect(other.rect), data(std::move(other.data)) {} | 216 : rect(other.rect), data(std::move(other.data)) {} |
212 RectWithData& operator=(RectWithData&& other) { | 217 RectWithData& operator=(RectWithData&& other) { |
213 rect = other.rect; | 218 rect = other.rect; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 | 330 |
326 typedef SkBaseDevice INHERITED; | 331 typedef SkBaseDevice INHERITED; |
327 | 332 |
328 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 333 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
329 // an SkPDFDevice | 334 // an SkPDFDevice |
330 //friend class SkDocument_PDF; | 335 //friend class SkDocument_PDF; |
331 //friend class SkPDFImageShader; | 336 //friend class SkPDFImageShader; |
332 }; | 337 }; |
333 | 338 |
334 #endif | 339 #endif |
OLD | NEW |