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

Side by Side Diff: src/image/SkSurface_Base.h

Issue 544233002: "NULL !=" = NULL (Closed) Base URL: https://skia.googlesource.com/skia.git@are
Patch Set: rebase Created 6 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/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.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 2012 Google Inc. 2 * Copyright 2012 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 #ifndef SkSurface_Base_DEFINED 8 #ifndef SkSurface_Base_DEFINED
9 #define SkSurface_Base_DEFINED 9 #define SkSurface_Base_DEFINED
10 10
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 void aboutToDraw(ContentChangeMode mode); 72 void aboutToDraw(ContentChangeMode mode);
73 friend class SkCanvas; 73 friend class SkCanvas;
74 friend class SkSurface; 74 friend class SkSurface;
75 75
76 typedef SkSurface INHERITED; 76 typedef SkSurface INHERITED;
77 }; 77 };
78 78
79 SkCanvas* SkSurface_Base::getCachedCanvas() { 79 SkCanvas* SkSurface_Base::getCachedCanvas() {
80 if (NULL == fCachedCanvas) { 80 if (NULL == fCachedCanvas) {
81 fCachedCanvas = this->onNewCanvas(); 81 fCachedCanvas = this->onNewCanvas();
82 if (NULL != fCachedCanvas) { 82 if (fCachedCanvas) {
83 fCachedCanvas->setSurfaceBase(this); 83 fCachedCanvas->setSurfaceBase(this);
84 } 84 }
85 } 85 }
86 return fCachedCanvas; 86 return fCachedCanvas;
87 } 87 }
88 88
89 SkImage* SkSurface_Base::getCachedImage() { 89 SkImage* SkSurface_Base::getCachedImage() {
90 if (NULL == fCachedImage) { 90 if (NULL == fCachedImage) {
91 fCachedImage = this->onNewImageSnapshot(); 91 fCachedImage = this->onNewImageSnapshot();
92 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this); 92 SkASSERT(!fCachedCanvas || fCachedCanvas->getSurfaceBase() == this);
93 } 93 }
94 return fCachedImage; 94 return fCachedImage;
95 } 95 }
96 96
97 #endif 97 #endif
OLDNEW
« no previous file with comments | « src/image/SkSurface.cpp ('k') | src/image/SkSurface_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698