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

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

Issue 2396953002: Revert[8] "replace SkXfermode obj with SkBlendMode enum in paints" (Closed)
Patch Set: add tmp virtual to unroll legacy arithmodes Created 4 years, 2 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/SkImage.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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override; 239 SkBaseDevice* onCreateDevice(const CreateInfo&, const SkPaint*) override;
240 240
241 void init(); 241 void init();
242 void cleanUp(); 242 void cleanUp();
243 sk_sp<SkPDFObject> makeFormXObjectFromDevice(); 243 sk_sp<SkPDFObject> makeFormXObjectFromDevice();
244 244
245 void drawFormXObjectWithMask(int xObjectIndex, 245 void drawFormXObjectWithMask(int xObjectIndex,
246 sk_sp<SkPDFObject> mask, 246 sk_sp<SkPDFObject> mask,
247 const SkClipStack* clipStack, 247 const SkClipStack* clipStack,
248 const SkRegion& clipRegion, 248 const SkRegion& clipRegion,
249 SkXfermode::Mode mode, 249 SkBlendMode,
250 bool invertClip); 250 bool invertClip);
251 251
252 // If the paint or clip is such that we shouldn't draw anything, this 252 // If the paint or clip is such that we shouldn't draw anything, this
253 // returns nullptr and does not create a content entry. 253 // returns nullptr and does not create a content entry.
254 // setUpContentEntry and finishContentEntry can be used directly, but 254 // setUpContentEntry and finishContentEntry can be used directly, but
255 // the preferred method is to use the ScopedContentEntry helper class. 255 // the preferred method is to use the ScopedContentEntry helper class.
256 ContentEntry* setUpContentEntry(const SkClipStack* clipStack, 256 ContentEntry* setUpContentEntry(const SkClipStack* clipStack,
257 const SkRegion& clipRegion, 257 const SkRegion& clipRegion,
258 const SkMatrix& matrix, 258 const SkMatrix& matrix,
259 const SkPaint& paint, 259 const SkPaint& paint,
260 bool hasText, 260 bool hasText,
261 sk_sp<SkPDFObject>* dst); 261 sk_sp<SkPDFObject>* dst);
262 void finishContentEntry(SkXfermode::Mode xfermode, 262 void finishContentEntry(SkBlendMode, sk_sp<SkPDFObject> dst, SkPath* shape);
263 sk_sp<SkPDFObject> dst,
264 SkPath* shape);
265 bool isContentEmpty(); 263 bool isContentEmpty();
266 264
267 void populateGraphicStateEntryFromPaint(const SkMatrix& matrix, 265 void populateGraphicStateEntryFromPaint(const SkMatrix& matrix,
268 const SkClipStack& clipStack, 266 const SkClipStack& clipStack,
269 const SkRegion& clipRegion, 267 const SkRegion& clipRegion,
270 const SkPaint& paint, 268 const SkPaint& paint,
271 bool hasText, 269 bool hasText,
272 GraphicStateEntry* entry); 270 GraphicStateEntry* entry);
273 int addGraphicStateResource(SkPDFObject* gs); 271 int addGraphicStateResource(SkPDFObject* gs);
274 int addXObjectResource(SkPDFObject* xObject); 272 int addXObjectResource(SkPDFObject* xObject);
(...skipping 21 matching lines...) Expand all
296 294
297 typedef SkBaseDevice INHERITED; 295 typedef SkBaseDevice INHERITED;
298 296
299 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create 297 // TODO(edisonn): Only SkDocument_PDF and SkPDFImageShader should be able to create
300 // an SkPDFDevice 298 // an SkPDFDevice
301 //friend class SkDocument_PDF; 299 //friend class SkDocument_PDF;
302 //friend class SkPDFImageShader; 300 //friend class SkPDFImageShader;
303 }; 301 };
304 302
305 #endif 303 #endif
OLDNEW
« no previous file with comments | « src/image/SkImage.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698