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

Side by Side Diff: samplecode/SampleFilter2.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 | « samplecode/SampleFilter.cpp ('k') | samplecode/SampleFilterFuzz.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 "SampleCode.h" 8 #include "SampleCode.h"
9 #include "SkView.h" 9 #include "SkView.h"
10 #include "SkCanvas.h" 10 #include "SkCanvas.h"
(...skipping 18 matching lines...) Expand all
29 SkBitmap* fBitmaps; 29 SkBitmap* fBitmaps;
30 int fBitmapCount; 30 int fBitmapCount;
31 int fCurrIndex; 31 int fCurrIndex;
32 32
33 Filter2View() { 33 Filter2View() {
34 fBitmapCount = SK_ARRAY_COUNT(gNames)*2; 34 fBitmapCount = SK_ARRAY_COUNT(gNames)*2;
35 fBitmaps = new SkBitmap[fBitmapCount]; 35 fBitmaps = new SkBitmap[fBitmapCount];
36 36
37 for (int i = 0; i < fBitmapCount/2; i++) { 37 for (int i = 0; i < fBitmapCount/2; i++) {
38 SkImageDecoder::DecodeFile(gNames[i], &fBitmaps[i], kN32_SkColorType , 38 SkImageDecoder::DecodeFile(gNames[i], &fBitmaps[i], kN32_SkColorType ,
39 SkImageDecoder::kDecodePixels_Mode, NULL) ; 39 SkImageDecoder::kDecodePixels_Mode, nullp tr);
40 } 40 }
41 for (int i = fBitmapCount/2; i < fBitmapCount; i++) { 41 for (int i = fBitmapCount/2; i < fBitmapCount; i++) {
42 SkImageDecoder::DecodeFile(gNames[i-fBitmapCount/2], &fBitmaps[i], k RGB_565_SkColorType, 42 SkImageDecoder::DecodeFile(gNames[i-fBitmapCount/2], &fBitmaps[i], k RGB_565_SkColorType,
43 SkImageDecoder::kDecodePixels_Mode, NULL) ; 43 SkImageDecoder::kDecodePixels_Mode, nullp tr);
44 } 44 }
45 fCurrIndex = 0; 45 fCurrIndex = 0;
46 46
47 this->setBGColor(SK_ColorGRAY); 47 this->setBGColor(SK_ColorGRAY);
48 } 48 }
49 49
50 virtual ~Filter2View() { 50 virtual ~Filter2View() {
51 delete[] fBitmaps; 51 delete[] fBitmaps;
52 } 52 }
53 53
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 112
113 private: 113 private:
114 typedef SampleView INHERITED; 114 typedef SampleView INHERITED;
115 }; 115 };
116 116
117 ////////////////////////////////////////////////////////////////////////////// 117 //////////////////////////////////////////////////////////////////////////////
118 118
119 static SkView* MyFactory() { return new Filter2View; } 119 static SkView* MyFactory() { return new Filter2View; }
120 static SkViewRegister reg(MyFactory); 120 static SkViewRegister reg(MyFactory);
OLDNEW
« no previous file with comments | « samplecode/SampleFilter.cpp ('k') | samplecode/SampleFilterFuzz.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698