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

Side by Side Diff: gm/imagefilterstransformed.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/imagefiltersscaled.cpp ('k') | gm/imagefromyuvtextures.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 2015 Google Inc. 2 * Copyright 2015 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 27 matching lines...) Expand all
38 SkScalar x = SkIntToScalar(width / 2); 38 SkScalar x = SkIntToScalar(width / 2);
39 SkScalar y = SkIntToScalar(height / 2); 39 SkScalar y = SkIntToScalar(height / 2);
40 SkScalar radius = SkMinScalar(x, y) * 0.8f; 40 SkScalar radius = SkMinScalar(x, y) * 0.8f;
41 fGradientCircle.allocN32Pixels(width, height); 41 fGradientCircle.allocN32Pixels(width, height);
42 SkCanvas canvas(fGradientCircle); 42 SkCanvas canvas(fGradientCircle);
43 canvas.clear(0x00000000); 43 canvas.clear(0x00000000);
44 SkColor colors[2]; 44 SkColor colors[2];
45 colors[0] = SK_ColorWHITE; 45 colors[0] = SK_ColorWHITE;
46 colors[1] = SK_ColorBLACK; 46 colors[1] = SK_ColorBLACK;
47 SkAutoTUnref<SkShader> shader( 47 SkAutoTUnref<SkShader> shader(
48 SkGradientShader::CreateRadial(SkPoint::Make(x, y), radius, colors, NULL, 2, 48 SkGradientShader::CreateRadial(SkPoint::Make(x, y), radius, colors, nullptr, 2,
49 SkShader::kClamp_TileMode) 49 SkShader::kClamp_TileMode)
50 ); 50 );
51 SkPaint paint; 51 SkPaint paint;
52 paint.setShader(shader); 52 paint.setShader(shader);
53 canvas.drawCircle(x, y, radius, paint); 53 canvas.drawCircle(x, y, radius, paint);
54 } 54 }
55 55
56 void onOnceBeforeDraw() override { 56 void onOnceBeforeDraw() override {
57 fCheckerboard.allocN32Pixels(64, 64); 57 fCheckerboard.allocN32Pixels(64, 64);
58 SkCanvas checkerboardCanvas(fCheckerboard); 58 SkCanvas checkerboardCanvas(fCheckerboard);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 SkBitmap fCheckerboard; 115 SkBitmap fCheckerboard;
116 SkBitmap fGradientCircle; 116 SkBitmap fGradientCircle;
117 typedef GM INHERITED; 117 typedef GM INHERITED;
118 }; 118 };
119 119
120 ////////////////////////////////////////////////////////////////////////////// 120 //////////////////////////////////////////////////////////////////////////////
121 121
122 DEF_GM( return new ImageFiltersTransformedGM; ) 122 DEF_GM( return new ImageFiltersTransformedGM; )
123 123
124 } 124 }
OLDNEW
« no previous file with comments | « gm/imagefiltersscaled.cpp ('k') | gm/imagefromyuvtextures.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698