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

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

Issue 1761793003: Revert of move annotations to canvas virtual (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/gpu/SkGpuDevice.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 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 191
192 SkPDFCanon* getCanon() const { return fCanon; } 192 SkPDFCanon* getCanon() const { return fCanon; }
193 193
194 protected: 194 protected:
195 const SkBitmap& onAccessBitmap() override { 195 const SkBitmap& onAccessBitmap() override {
196 return fLegacyBitmap; 196 return fLegacyBitmap;
197 } 197 }
198 198
199 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override; 199 SkSurface* newSurface(const SkImageInfo&, const SkSurfaceProps&) override;
200 200
201 void drawAnnotation(const SkDraw&, const SkRect&, const char key[], SkData* value) override;
202
203 private: 201 private:
204 // TODO(vandebo): push most of SkPDFDevice's state into a core object in 202 // TODO(vandebo): push most of SkPDFDevice's state into a core object in
205 // order to get the right access levels without using friend. 203 // order to get the right access levels without using friend.
206 friend class ScopedContentEntry; 204 friend class ScopedContentEntry;
207 205
208 SkISize fPageSize; 206 SkISize fPageSize;
209 SkISize fContentSize; 207 SkISize fContentSize;
210 SkMatrix fInitialTransform; 208 SkMatrix fInitialTransform;
211 SkClipStack fExistingClipStack; 209 SkClipStack fExistingClipStack;
212 SkRegion fExistingClipRegion; 210 SkRegion fExistingClipRegion;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 const SkPaint& paint); 296 const SkPaint& paint);
299 297
300 /** Helper method for copyContentToData. It is responsible for copying the 298 /** Helper method for copyContentToData. It is responsible for copying the
301 * list of content entries |entry| to |data|. 299 * list of content entries |entry| to |data|.
302 */ 300 */
303 void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const; 301 void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const;
304 302
305 bool handleInversePath(const SkDraw& d, const SkPath& origPath, 303 bool handleInversePath(const SkDraw& d, const SkPath& origPath,
306 const SkPaint& paint, bool pathIsMutable, 304 const SkPaint& paint, bool pathIsMutable,
307 const SkMatrix* prePathMatrix = nullptr); 305 const SkMatrix* prePathMatrix = nullptr);
308 void handlePointAnnotation(const SkPoint&, const SkMatrix&, const char key[] , SkData* value); 306 bool handlePointAnnotation(const SkPoint* points, size_t count,
309 void handlePathAnnotation(const SkPath&, const SkDraw& d, const char key[], SkData* value); 307 const SkMatrix& matrix, SkAnnotation* annot);
308 bool handlePathAnnotation(const SkPath& path, const SkDraw& d,
309 SkAnnotation* annot);
310 310
311 typedef SkBaseDevice INHERITED; 311 typedef SkBaseDevice INHERITED;
312 312
313 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create 313 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
314 // an SkPDFDevice 314 // an SkPDFDevice
315 //friend class SkDocument_PDF; 315 //friend class SkDocument_PDF;
316 //friend class SkPDFImageShader; 316 //friend class SkPDFImageShader;
317 }; 317 };
318 318
319 #endif 319 #endif
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698