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

Side by Side Diff: src/pdf/SkPDFGraphicState.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/pdf/SkPDFFormXObject.cpp ('k') | src/pdf/SkPDFResourceDict.h » ('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 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkLazyPtr.h" 9 #include "SkLazyPtr.h"
10 #include "SkPDFCanon.h" 10 #include "SkPDFCanon.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 case SkXfermode::kSrcOut_Mode: 58 case SkXfermode::kSrcOut_Mode:
59 case SkXfermode::kDstOut_Mode: 59 case SkXfermode::kDstOut_Mode:
60 case SkXfermode::kSrcATop_Mode: 60 case SkXfermode::kSrcATop_Mode:
61 case SkXfermode::kDstATop_Mode: 61 case SkXfermode::kDstATop_Mode:
62 case SkXfermode::kModulate_Mode: 62 case SkXfermode::kModulate_Mode:
63 return "Normal"; 63 return "Normal";
64 64
65 // TODO(vandebo): Figure out if we can support more of these modes. 65 // TODO(vandebo): Figure out if we can support more of these modes.
66 case SkXfermode::kXor_Mode: 66 case SkXfermode::kXor_Mode:
67 case SkXfermode::kPlus_Mode: 67 case SkXfermode::kPlus_Mode:
68 return NULL; 68 return nullptr;
69 } 69 }
70 return NULL; 70 return nullptr;
71 } 71 }
72 72
73 // If a SkXfermode is unsupported in PDF, this function returns 73 // If a SkXfermode is unsupported in PDF, this function returns
74 // SrcOver, otherwise, it returns that Xfermode as a Mode. 74 // SrcOver, otherwise, it returns that Xfermode as a Mode.
75 static SkXfermode::Mode mode_for_pdf(const SkXfermode* xfermode) { 75 static SkXfermode::Mode mode_for_pdf(const SkXfermode* xfermode) {
76 SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode; 76 SkXfermode::Mode mode = SkXfermode::kSrcOver_Mode;
77 if (xfermode) { 77 if (xfermode) {
78 xfermode->asMode(&mode); 78 xfermode->asMode(&mode);
79 } 79 }
80 switch (mode) { 80 switch (mode) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 static_assert(SkPaint::kJoinCount == 3, "paint_join_mismatch"); 222 static_assert(SkPaint::kJoinCount == 3, "paint_join_mismatch");
223 SkASSERT(strokeJoin >= 0 && strokeJoin <= 2); 223 SkASSERT(strokeJoin >= 0 && strokeJoin <= 2);
224 dict->insertInt("LJ", strokeJoin); 224 dict->insertInt("LJ", strokeJoin);
225 225
226 dict->insertScalar("LW", fStrokeWidth); 226 dict->insertScalar("LW", fStrokeWidth);
227 dict->insertScalar("ML", fStrokeMiter); 227 dict->insertScalar("ML", fStrokeMiter);
228 dict->insertBool("SA", true); // SA = Auto stroke adjustment. 228 dict->insertBool("SA", true); // SA = Auto stroke adjustment.
229 dict->insertName("BM", as_blend_mode(xferMode)); 229 dict->insertName("BM", as_blend_mode(xferMode));
230 dict->emitObject(stream, objNumMap, substitutes); 230 dict->emitObject(stream, objNumMap, substitutes);
231 } 231 }
OLDNEW
« no previous file with comments | « src/pdf/SkPDFFormXObject.cpp ('k') | src/pdf/SkPDFResourceDict.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698