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

Side by Side Diff: src/animator/SkDrawTo.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 | « src/animator/SkDrawShader.cpp ('k') | src/animator/SkDump.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 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
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 8
9 9
10 #include "SkDrawTo.h" 10 #include "SkDrawTo.h"
11 #include "SkAnimateMaker.h" 11 #include "SkAnimateMaker.h"
12 #include "SkCanvas.h" 12 #include "SkCanvas.h"
13 #include "SkDrawBitmap.h" 13 #include "SkDrawBitmap.h"
14 14
15 #if SK_USE_CONDENSED_INFO == 0 15 #if SK_USE_CONDENSED_INFO == 0
16 16
17 const SkMemberInfo SkDrawTo::fInfo[] = { 17 const SkMemberInfo SkDrawTo::fInfo[] = {
18 SK_MEMBER(drawOnce, Boolean), 18 SK_MEMBER(drawOnce, Boolean),
19 SK_MEMBER(use, Bitmap) 19 SK_MEMBER(use, Bitmap)
20 }; 20 };
21 21
22 #endif 22 #endif
23 23
24 DEFINE_GET_MEMBER(SkDrawTo); 24 DEFINE_GET_MEMBER(SkDrawTo);
25 25
26 SkDrawTo::SkDrawTo() : drawOnce(false), use(NULL), fDrawnOnce(false) { 26 SkDrawTo::SkDrawTo() : drawOnce(false), use(nullptr), fDrawnOnce(false) {
27 } 27 }
28 28
29 #if 0 29 #if 0
30 SkDrawTo::~SkDrawTo() { 30 SkDrawTo::~SkDrawTo() {
31 SkASSERT(0); 31 SkASSERT(0);
32 } 32 }
33 #endif 33 #endif
34 34
35 bool SkDrawTo::draw(SkAnimateMaker& maker) { 35 bool SkDrawTo::draw(SkAnimateMaker& maker) {
36 if (fDrawnOnce) 36 if (fDrawnOnce)
37 return false; 37 return false;
38 SkCanvas canvas(use->fBitmap); 38 SkCanvas canvas(use->fBitmap);
39 SkCanvas* save = maker.fCanvas; 39 SkCanvas* save = maker.fCanvas;
40 maker.fCanvas = &canvas; 40 maker.fCanvas = &canvas;
41 INHERITED::draw(maker); 41 INHERITED::draw(maker);
42 maker.fCanvas = save; 42 maker.fCanvas = save;
43 fDrawnOnce = drawOnce; 43 fDrawnOnce = drawOnce;
44 return false; 44 return false;
45 } 45 }
46 46
47 #ifdef SK_DUMP_ENABLED 47 #ifdef SK_DUMP_ENABLED
48 void SkDrawTo::dump(SkAnimateMaker* maker) { 48 void SkDrawTo::dump(SkAnimateMaker* maker) {
49 dumpBase(maker); 49 dumpBase(maker);
50 dumpAttrs(maker); 50 dumpAttrs(maker);
51 if (use) 51 if (use)
52 SkDebugf("use=\"%s\" ", use->id); 52 SkDebugf("use=\"%s\" ", use->id);
53 dumpDrawables(maker); 53 dumpDrawables(maker);
54 } 54 }
55 #endif 55 #endif
OLDNEW
« no previous file with comments | « src/animator/SkDrawShader.cpp ('k') | src/animator/SkDump.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698