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

Side by Side Diff: gm/imagefiltersclipped.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/imagefiltersbase.cpp ('k') | gm/imagefilterscropexpand.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 2014 Google Inc. 2 * Copyright 2014 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 "sk_tool_utils.h" 8 #include "sk_tool_utils.h"
9 #include "SkBitmapSource.h" 9 #include "SkBitmapSource.h"
10 #include "SkBlurImageFilter.h" 10 #include "SkBlurImageFilter.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 SkScalar x = SkIntToScalar(width / 2); 46 SkScalar x = SkIntToScalar(width / 2);
47 SkScalar y = SkIntToScalar(height / 2); 47 SkScalar y = SkIntToScalar(height / 2);
48 SkScalar radius = SkMinScalar(x, y) * 0.8f; 48 SkScalar radius = SkMinScalar(x, y) * 0.8f;
49 fGradientCircle.allocN32Pixels(width, height); 49 fGradientCircle.allocN32Pixels(width, height);
50 SkCanvas canvas(fGradientCircle); 50 SkCanvas canvas(fGradientCircle);
51 canvas.clear(0x00000000); 51 canvas.clear(0x00000000);
52 SkColor colors[2]; 52 SkColor colors[2];
53 colors[0] = SK_ColorWHITE; 53 colors[0] = SK_ColorWHITE;
54 colors[1] = SK_ColorBLACK; 54 colors[1] = SK_ColorBLACK;
55 SkAutoTUnref<SkShader> shader( 55 SkAutoTUnref<SkShader> shader(
56 SkGradientShader::CreateRadial(SkPoint::Make(x, y), radius, colors, NULL, 2, 56 SkGradientShader::CreateRadial(SkPoint::Make(x, y), radius, colors, nullptr, 2,
57 SkShader::kClamp_TileMode) 57 SkShader::kClamp_TileMode)
58 ); 58 );
59 SkPaint paint; 59 SkPaint paint;
60 paint.setShader(shader); 60 paint.setShader(shader);
61 canvas.drawCircle(x, y, radius, paint); 61 canvas.drawCircle(x, y, radius, paint);
62 } 62 }
63 63
64 static void draw_clipped_filter(SkCanvas* canvas, SkImageFilter* filter, siz e_t i, 64 static void draw_clipped_filter(SkCanvas* canvas, SkImageFilter* filter, siz e_t i,
65 const SkRect& primBounds, const SkRect& clip Bounds) { 65 const SkRect& primBounds, const SkRect& clip Bounds) {
66 SkPaint paint; 66 SkPaint paint;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 SkBitmap fGradientCircle; 155 SkBitmap fGradientCircle;
156 typedef GM INHERITED; 156 typedef GM INHERITED;
157 }; 157 };
158 158
159 ////////////////////////////////////////////////////////////////////////////// 159 //////////////////////////////////////////////////////////////////////////////
160 160
161 static GM* MyFactory(void*) { return new ImageFiltersClippedGM; } 161 static GM* MyFactory(void*) { return new ImageFiltersClippedGM; }
162 static GMRegistry reg(MyFactory); 162 static GMRegistry reg(MyFactory);
163 163
164 } 164 }
OLDNEW
« no previous file with comments | « gm/imagefiltersbase.cpp ('k') | gm/imagefilterscropexpand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698