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

Side by Side Diff: gm/filterbitmap.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/fatpathfill.cpp ('k') | gm/filterfastbounds.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 9
10 #include "Resources.h" 10 #include "Resources.h"
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 189
190 protected: 190 protected:
191 SkString fFilename; 191 SkString fFilename;
192 int fSize; 192 int fSize;
193 193
194 SkScalar getScale() override { 194 SkScalar getScale() override {
195 return 192.f/fSize; 195 return 192.f/fSize;
196 } 196 }
197 197
198 void makeBitmap() override { 198 void makeBitmap() override {
199 SkImageDecoder* codec = NULL; 199 SkImageDecoder* codec = nullptr;
200 SkString resourcePath = GetResourcePath(fFilename.c_str()); 200 SkString resourcePath = GetResourcePath(fFilename.c_str());
201 SkFILEStream stream(resourcePath.c_str()); 201 SkFILEStream stream(resourcePath.c_str());
202 if (stream.isValid()) { 202 if (stream.isValid()) {
203 codec = SkImageDecoder::Factory(&stream); 203 codec = SkImageDecoder::Factory(&stream);
204 } 204 }
205 if (codec) { 205 if (codec) {
206 stream.rewind(); 206 stream.rewind();
207 codec->decode(&stream, &fBM, kN32_SkColorType, SkImageDecoder::kDe codePixels_Mode); 207 codec->decode(&stream, &fBM, kN32_SkColorType, SkImageDecoder::kDe codePixels_Mode);
208 delete codec; 208 delete codec;
209 } else { 209 } else {
(...skipping 24 matching lines...) Expand all
234 DEF_GM( return new FilterBitmapCheckerboardGM(32,2); ) 234 DEF_GM( return new FilterBitmapCheckerboardGM(32,2); )
235 DEF_GM( return new FilterBitmapCheckerboardGM(192,192); ) 235 DEF_GM( return new FilterBitmapCheckerboardGM(192,192); )
236 DEF_GM( return new FilterBitmapImageGM("mandrill_16.png"); ) 236 DEF_GM( return new FilterBitmapImageGM("mandrill_16.png"); )
237 DEF_GM( return new FilterBitmapImageGM("mandrill_32.png"); ) 237 DEF_GM( return new FilterBitmapImageGM("mandrill_32.png"); )
238 DEF_GM( return new FilterBitmapImageGM("mandrill_64.png"); ) 238 DEF_GM( return new FilterBitmapImageGM("mandrill_64.png"); )
239 DEF_GM( return new FilterBitmapImageGM("mandrill_64.png", true); ) 239 DEF_GM( return new FilterBitmapImageGM("mandrill_64.png", true); )
240 DEF_GM( return new FilterBitmapImageGM("mandrill_128.png"); ) 240 DEF_GM( return new FilterBitmapImageGM("mandrill_128.png"); )
241 DEF_GM( return new FilterBitmapImageGM("mandrill_256.png"); ) 241 DEF_GM( return new FilterBitmapImageGM("mandrill_256.png"); )
242 DEF_GM( return new FilterBitmapImageGM("mandrill_512.png"); ) 242 DEF_GM( return new FilterBitmapImageGM("mandrill_512.png"); )
243 DEF_GM( return new FilterBitmapImageGM("color_wheel.png"); ) 243 DEF_GM( return new FilterBitmapImageGM("color_wheel.png"); )
OLDNEW
« no previous file with comments | « gm/fatpathfill.cpp ('k') | gm/filterfastbounds.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698