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

Side by Side Diff: gm/bitmapshader.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/bitmaprecttest.cpp ('k') | gm/bitmapsource2.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 9
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 canvas->drawBitmap(fMask, 30, 0, &paint); 77 canvas->drawBitmap(fMask, 30, 0, &paint);
78 78
79 canvas->translate(0, 25); 79 canvas->translate(0, 25);
80 80
81 canvas->drawCircle(10, 10, 10, paint); 81 canvas->drawCircle(10, 10, 10, paint);
82 canvas->drawCircle(40, 10, 10, paint); // no blue circle expected 82 canvas->drawCircle(40, 10, 10, paint); // no blue circle expected
83 83
84 canvas->translate(0, 25); 84 canvas->translate(0, 25);
85 85
86 // clear the shader, colorized by a solid color with a bitmap mask 86 // clear the shader, colorized by a solid color with a bitmap mask
87 paint.setShader(NULL); 87 paint.setShader(nullptr);
88 paint.setColor(SK_ColorGREEN); 88 paint.setColor(SK_ColorGREEN);
89 canvas->drawBitmap(fMask, 0, 0, &paint); 89 canvas->drawBitmap(fMask, 0, 0, &paint);
90 canvas->drawBitmap(fMask, 30, 0, &paint); 90 canvas->drawBitmap(fMask, 30, 0, &paint);
91 91
92 canvas->translate(0, 25); 92 canvas->translate(0, 25);
93 93
94 adopt_shader(&paint, SkShader::CreateBitmapShader(fMask, SkShader::k Repeat_TileMode, 94 adopt_shader(&paint, SkShader::CreateBitmapShader(fMask, SkShader::k Repeat_TileMode,
95 SkShader::kRepeat_ TileMode, &s)); 95 SkShader::kRepeat_ TileMode, &s));
96 paint.setColor(SK_ColorRED); 96 paint.setColor(SK_ColorRED);
97 97
(...skipping 11 matching lines...) Expand all
109 109
110 typedef GM INHERITED; 110 typedef GM INHERITED;
111 }; 111 };
112 112
113 ////////////////////////////////////////////////////////////////////////////// 113 //////////////////////////////////////////////////////////////////////////////
114 114
115 static GM* MyFactory(void*) { return new BitmapShaderGM; } 115 static GM* MyFactory(void*) { return new BitmapShaderGM; }
116 static GMRegistry reg(MyFactory); 116 static GMRegistry reg(MyFactory);
117 117
118 } 118 }
OLDNEW
« no previous file with comments | « gm/bitmaprecttest.cpp ('k') | gm/bitmapsource2.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698