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

Side by Side Diff: src/core/SkRasterClip.h

Issue 72603005: Guard against most unintentionally ephemeral SkAutoFoo instantiations. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: undo autoasciitolc Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/core/SkString.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 2010 Google Inc. 2 * Copyright 2010 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 SkRasterClip_DEFINED 8 #ifndef SkRasterClip_DEFINED
9 #define SkRasterClip_DEFINED 9 #define SkRasterClip_DEFINED
10 10
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 public: 105 public:
106 SkAutoRasterClipValidate(const SkRasterClip& rc) : fRC(rc) { 106 SkAutoRasterClipValidate(const SkRasterClip& rc) : fRC(rc) {
107 fRC.validate(); 107 fRC.validate();
108 } 108 }
109 ~SkAutoRasterClipValidate() { 109 ~SkAutoRasterClipValidate() {
110 fRC.validate(); 110 fRC.validate();
111 } 111 }
112 private: 112 private:
113 const SkRasterClip& fRC; 113 const SkRasterClip& fRC;
114 }; 114 };
115 #define SkAutoRasterClipValidate(...) SK_REQUIRE_LOCAL_VAR(SkAutoRasterClipValid ate)
115 116
116 #ifdef SK_DEBUG 117 #ifdef SK_DEBUG
117 #define AUTO_RASTERCLIP_VALIDATE(rc) SkAutoRasterClipValidate arcv(rc) 118 #define AUTO_RASTERCLIP_VALIDATE(rc) SkAutoRasterClipValidate arcv(rc)
118 #else 119 #else
119 #define AUTO_RASTERCLIP_VALIDATE(rc) 120 #define AUTO_RASTERCLIP_VALIDATE(rc)
120 #endif 121 #endif
121 122
122 /////////////////////////////////////////////////////////////////////////////// 123 ///////////////////////////////////////////////////////////////////////////////
123 124
124 /** 125 /**
(...skipping 28 matching lines...) Expand all
153 154
154 private: 155 private:
155 SkRegion fBWRgn; 156 SkRegion fBWRgn;
156 SkAAClipBlitter fAABlitter; 157 SkAAClipBlitter fAABlitter;
157 // what we return 158 // what we return
158 const SkRegion* fClipRgn; 159 const SkRegion* fClipRgn;
159 SkBlitter* fBlitter; 160 SkBlitter* fBlitter;
160 }; 161 };
161 162
162 #endif 163 #endif
OLDNEW
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/core/SkString.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698