| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 return *(fFontGlyphUsage.get()); | 188 return *(fFontGlyphUsage.get()); |
| 189 } | 189 } |
| 190 | 190 |
| 191 SkPDFCanon* getCanon() const; | 191 SkPDFCanon* getCanon() const; |
| 192 | 192 |
| 193 protected: | 193 protected: |
| 194 const SkBitmap& onAccessBitmap() override { | 194 const SkBitmap& onAccessBitmap() override { |
| 195 return fLegacyBitmap; | 195 return fLegacyBitmap; |
| 196 } | 196 } |
| 197 | 197 |
| 198 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; | 198 sk_sp<SkSurface> makeSurface(const SkImageInfo&, const SkSurfaceProps&) over
ride; |
| 199 | 199 |
| 200 void drawAnnotation(const SkDraw&, const SkRect&, const char key[], SkData*
value) override; | 200 void drawAnnotation(const SkDraw&, const SkRect&, const char key[], SkData*
value) override; |
| 201 | 201 |
| 202 private: | 202 private: |
| 203 struct RectWithData { | 203 struct RectWithData { |
| 204 SkRect rect; | 204 SkRect rect; |
| 205 sk_sp<SkData> data; | 205 sk_sp<SkData> data; |
| 206 RectWithData(const SkRect& rect, SkData* data) | 206 RectWithData(const SkRect& rect, SkData* data) |
| 207 : rect(rect), data(SkRef(data)) {} | 207 : rect(rect), data(SkRef(data)) {} |
| 208 RectWithData(RectWithData&& other) | 208 RectWithData(RectWithData&& other) |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 | 337 |
| 338 typedef SkBaseDevice INHERITED; | 338 typedef SkBaseDevice INHERITED; |
| 339 | 339 |
| 340 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create | 340 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to
create |
| 341 // an SkPDFDevice | 341 // an SkPDFDevice |
| 342 //friend class SkDocument_PDF; | 342 //friend class SkDocument_PDF; |
| 343 //friend class SkPDFImageShader; | 343 //friend class SkPDFImageShader; |
| 344 }; | 344 }; |
| 345 | 345 |
| 346 #endif | 346 #endif |
| OLD | NEW |