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

Side by Side Diff: gm/xfermodes2.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 | « gm/xfermodes.cpp ('k') | gm/xfermodes3.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 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "gm.h" 8 #include "gm.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 canvas->save(); 48 canvas->save();
49 49
50 canvas->translate(x, y); 50 canvas->translate(x, y);
51 SkPaint p; 51 SkPaint p;
52 p.setAntiAlias(false); 52 p.setAntiAlias(false);
53 p.setStyle(SkPaint::kFill_Style); 53 p.setStyle(SkPaint::kFill_Style);
54 p.setShader(fBG); 54 p.setShader(fBG);
55 SkRect r = SkRect::MakeWH(w, h); 55 SkRect r = SkRect::MakeWH(w, h);
56 canvas->drawRect(r, p); 56 canvas->drawRect(r, p);
57 57
58 canvas->saveLayer(&r, NULL); 58 canvas->saveLayer(&r, nullptr);
59 59
60 p.setShader(fDst); 60 p.setShader(fDst);
61 canvas->drawRect(r, p); 61 canvas->drawRect(r, p);
62 p.setShader(fSrc); 62 p.setShader(fSrc);
63 p.setXfermode(xm); 63 p.setXfermode(xm);
64 canvas->drawRect(r, p); 64 canvas->drawRect(r, p);
65 65
66 canvas->restore(); 66 canvas->restore();
67 67
68 r.inset(-SK_ScalarHalf, -SK_ScalarHalf); 68 r.inset(-SK_ScalarHalf, -SK_ScalarHalf);
69 p.setStyle(SkPaint::kStroke_Style); 69 p.setStyle(SkPaint::kStroke_Style);
70 p.setShader(NULL); 70 p.setShader(nullptr);
71 p.setXfermode(NULL); 71 p.setXfermode(nullptr);
72 canvas->drawRect(r, p); 72 canvas->drawRect(r, p);
73 73
74 canvas->restore(); 74 canvas->restore();
75 75
76 #if 1 76 #if 1
77 canvas->drawText(SkXfermode::ModeName(mode), strlen(SkXfermode::Mode Name(mode)), 77 canvas->drawText(SkXfermode::ModeName(mode), strlen(SkXfermode::Mode Name(mode)),
78 x + w/2, y - labelP.getTextSize()/2, labelP); 78 x + w/2, y - labelP.getTextSize()/2, labelP);
79 #endif 79 #endif
80 x += w + SkIntToScalar(10); 80 x += w + SkIntToScalar(10);
81 if ((m % W) == W - 1) { 81 if ((m % W) == W - 1) {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 typedef GM INHERITED; 146 typedef GM INHERITED;
147 }; 147 };
148 148
149 ////////////////////////////////////////////////////////////////////////////// 149 //////////////////////////////////////////////////////////////////////////////
150 150
151 static GM* MyFactory(void*) { return new Xfermodes2GM; } 151 static GM* MyFactory(void*) { return new Xfermodes2GM; }
152 static GMRegistry reg(MyFactory); 152 static GMRegistry reg(MyFactory);
153 153
154 } 154 }
OLDNEW
« no previous file with comments | « gm/xfermodes.cpp ('k') | gm/xfermodes3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698