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

Side by Side Diff: include/core/SkPixelRef.h

Issue 23021015: Initial error handling code (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Adapting code to sk_once changes Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « include/core/SkPathEffect.h ('k') | include/core/SkRasterizer.h » ('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 2008 The Android Open Source Project 3 * Copyright 2008 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 #ifndef SkPixelRef_DEFINED 10 #ifndef SkPixelRef_DEFINED
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 virtual void globalRef(void* data=NULL); 200 virtual void globalRef(void* data=NULL);
201 201
202 /** 202 /**
203 * Release a "global" ref on this object. 203 * Release a "global" ref on this object.
204 * The default implementation just calls unref(), but subclasses can overri de 204 * The default implementation just calls unref(), but subclasses can overri de
205 * this method to implement additional behavior. 205 * this method to implement additional behavior.
206 */ 206 */
207 virtual void globalUnref(); 207 virtual void globalUnref();
208 #endif 208 #endif
209 209
210 SK_DEFINE_FLATTENABLE_TYPE(SkPixelRef)
211
210 protected: 212 protected:
211 /** Called when the lockCount goes from 0 to 1. The caller will have already 213 /** Called when the lockCount goes from 0 to 1. The caller will have already
212 acquire a mutex for thread safety, so this method need not do that. 214 acquire a mutex for thread safety, so this method need not do that.
213 */ 215 */
214 virtual void* onLockPixels(SkColorTable**) = 0; 216 virtual void* onLockPixels(SkColorTable**) = 0;
215 /** Called when the lock count goes from 1 to 0. The caller will have 217 /** Called when the lock count goes from 1 to 0. The caller will have
216 already acquire a mutex for thread safety, so this method need not do 218 already acquire a mutex for thread safety, so this method need not do
217 that. 219 that.
218 */ 220 */
219 virtual void onUnlockPixels() = 0; 221 virtual void onUnlockPixels() = 0;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 bool fIsImmutable; 272 bool fIsImmutable;
271 // only ever set in constructor, const after that 273 // only ever set in constructor, const after that
272 bool fPreLocked; 274 bool fPreLocked;
273 275
274 void setMutex(SkBaseMutex* mutex); 276 void setMutex(SkBaseMutex* mutex);
275 277
276 typedef SkFlattenable INHERITED; 278 typedef SkFlattenable INHERITED;
277 }; 279 };
278 280
279 #endif 281 #endif
OLDNEW
« no previous file with comments | « include/core/SkPathEffect.h ('k') | include/core/SkRasterizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698