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

Side by Side Diff: gm/tinybitmap.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/tilemodes_scaled.cpp ('k') | gm/transparency.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 2011 Google Inc. 3 * Copyright 2011 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 #include "SkColorPriv.h" 9 #include "SkColorPriv.h"
10 #include "SkShader.h" 10 #include "SkShader.h"
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 #include "SkUtils.h" 12 #include "SkUtils.h"
13 13
14 namespace skiagm { 14 namespace skiagm {
15 15
16 static SkBitmap make_bitmap() { 16 static SkBitmap make_bitmap() {
17 const SkPMColor c[] = { SkPackARGB32(0x80, 0x80, 0, 0) }; 17 const SkPMColor c[] = { SkPackARGB32(0x80, 0x80, 0, 0) };
18 SkColorTable* ctable = new SkColorTable(c, SK_ARRAY_COUNT(c)); 18 SkColorTable* ctable = new SkColorTable(c, SK_ARRAY_COUNT(c));
19 19
20 SkBitmap bm; 20 SkBitmap bm;
21 bm.allocPixels(SkImageInfo::Make(1, 1, kIndex_8_SkColorType, 21 bm.allocPixels(SkImageInfo::Make(1, 1, kIndex_8_SkColorType,
22 kPremul_SkAlphaType), 22 kPremul_SkAlphaType),
23 NULL, ctable); 23 nullptr, ctable);
24 ctable->unref(); 24 ctable->unref();
25 25
26 bm.lockPixels(); 26 bm.lockPixels();
27 *bm.getAddr8(0, 0) = 0; 27 *bm.getAddr8(0, 0) = 0;
28 bm.unlockPixels(); 28 bm.unlockPixels();
29 return bm; 29 return bm;
30 } 30 }
31 31
32 class TinyBitmapGM : public GM { 32 class TinyBitmapGM : public GM {
33 public: 33 public:
(...skipping 22 matching lines...) Expand all
56 private: 56 private:
57 typedef GM INHERITED; 57 typedef GM INHERITED;
58 }; 58 };
59 59
60 ////////////////////////////////////////////////////////////////////////////// 60 //////////////////////////////////////////////////////////////////////////////
61 61
62 static GM* MyFactory(void*) { return new TinyBitmapGM; } 62 static GM* MyFactory(void*) { return new TinyBitmapGM; }
63 static GMRegistry reg(MyFactory); 63 static GMRegistry reg(MyFactory);
64 64
65 } 65 }
OLDNEW
« no previous file with comments | « gm/tilemodes_scaled.cpp ('k') | gm/transparency.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698