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

Side by Side Diff: gm/drawbitmaprect.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/drawatlascolor.cpp ('k') | gm/drawfilter.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 #include "gm.h" 8 #include "gm.h"
9 #include "SkBlurMask.h" 9 #include "SkBlurMask.h"
10 #include "SkBlurMaskFilter.h" 10 #include "SkBlurMaskFilter.h"
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 mat.postScale(SK_Scalar1 / 4, SK_Scalar1 / 4); 74 mat.postScale(SK_Scalar1 / 4, SK_Scalar1 / 4);
75 } 75 }
76 // Let backends know we won't change this, so they don't have to deep copy i t defensively. 76 // Let backends know we won't change this, so they don't have to deep copy i t defensively.
77 bm->setImmutable(); 77 bm->setImmutable();
78 78
79 return image_from_bitmap(*bm); 79 return image_from_bitmap(*bm);
80 } 80 }
81 81
82 static void canvasproc(SkCanvas* canvas, SkImage*, const SkBitmap& bm, const SkI Rect& srcR, 82 static void canvasproc(SkCanvas* canvas, SkImage*, const SkBitmap& bm, const SkI Rect& srcR,
83 const SkRect& dstR) { 83 const SkRect& dstR) {
84 canvas->drawBitmapRect(bm, srcR, dstR, NULL); 84 canvas->drawBitmapRect(bm, srcR, dstR, nullptr);
85 } 85 }
86 86
87 static void imageproc(SkCanvas* canvas, SkImage* image, const SkBitmap&, const S kIRect& srcR, 87 static void imageproc(SkCanvas* canvas, SkImage* image, const SkBitmap&, const S kIRect& srcR,
88 const SkRect& dstR) { 88 const SkRect& dstR) {
89 canvas->drawImageRect(image, srcR, dstR, NULL); 89 canvas->drawImageRect(image, srcR, dstR, nullptr);
90 } 90 }
91 91
92 static void imagescaleproc(SkCanvas* canvas, SkImage* image, const SkBitmap&, co nst SkIRect& srcIR, 92 static void imagescaleproc(SkCanvas* canvas, SkImage* image, const SkBitmap&, co nst SkIRect& srcIR,
93 const SkRect& dstR) { 93 const SkRect& dstR) {
94 const int newW = SkScalarRoundToInt(dstR.width()); 94 const int newW = SkScalarRoundToInt(dstR.width());
95 const int newH = SkScalarRoundToInt(dstR.height()); 95 const int newH = SkScalarRoundToInt(dstR.height());
96 SkAutoTUnref<SkImage> newImage(image->newImage(newW, newH, &srcIR)); 96 SkAutoTUnref<SkImage> newImage(image->newImage(newW, newH, &srcIR));
97 97
98 #ifdef SK_DEBUG 98 #ifdef SK_DEBUG
99 const SkIRect baseR = SkIRect::MakeWH(image->width(), image->height()); 99 const SkIRect baseR = SkIRect::MakeWH(image->width(), image->height());
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 SkBlurMaskFilter::kIgnoreTransform_BlurFlag); 219 SkBlurMaskFilter::kIgnoreTransform_BlurFlag);
220 paint.setMaskFilter(mf)->unref(); 220 paint.setMaskFilter(mf)->unref();
221 canvas->drawBitmapRect(bm, srcRect, dstRect, &paint); 221 canvas->drawBitmapRect(bm, srcRect, dstRect, &paint);
222 } 222 }
223 } 223 }
224 224
225 private: 225 private:
226 typedef skiagm::GM INHERITED; 226 typedef skiagm::GM INHERITED;
227 }; 227 };
228 228
229 DEF_GM( return new DrawBitmapRectGM(canvasproc, NULL); ) 229 DEF_GM( return new DrawBitmapRectGM(canvasproc, nullptr); )
230 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); ) 230 DEF_GM( return new DrawBitmapRectGM(imageproc, "-imagerect"); )
231 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); ) 231 DEF_GM( return new DrawBitmapRectGM(imagescaleproc, "-imagescale"); )
OLDNEW
« no previous file with comments | « gm/drawatlascolor.cpp ('k') | gm/drawfilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698