Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(59)

Side by Side Diff: src/pdf/SkPDFDevice.h

Issue 1817383002: switch surface to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/image/SkSurface_Raster.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698