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

Side by Side Diff: include/gpu/GrResource.h

Issue 22850006: Replace uses of GrAssert by SkASSERT. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years, 4 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/gpu/GrRenderTarget.h ('k') | include/gpu/GrSurface.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 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 8
9 9
10 #ifndef GrResource_DEFINED 10 #ifndef GrResource_DEFINED
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 * for this to return NULL. When resources have been release()ed or 62 * for this to return NULL. When resources have been release()ed or
63 * abandon()ed they no longer have an owning context. Destroying a 63 * abandon()ed they no longer have an owning context. Destroying a
64 * GrContext automatically releases all its resources. 64 * GrContext automatically releases all its resources.
65 */ 65 */
66 const GrContext* getContext() const; 66 const GrContext* getContext() const;
67 GrContext* getContext(); 67 GrContext* getContext();
68 68
69 void setCacheEntry(GrResourceEntry* cacheEntry) { fCacheEntry = cacheEntry; } 69 void setCacheEntry(GrResourceEntry* cacheEntry) { fCacheEntry = cacheEntry; }
70 GrResourceEntry* getCacheEntry() { return fCacheEntry; } 70 GrResourceEntry* getCacheEntry() { return fCacheEntry; }
71 71
72 void incDeferredRefCount() const { GrAssert(fDeferredRefCount >= 0); ++fDefe rredRefCount; } 72 void incDeferredRefCount() const { SkASSERT(fDeferredRefCount >= 0); ++fDefe rredRefCount; }
73 void decDeferredRefCount() const { GrAssert(fDeferredRefCount > 0); --fDefer redRefCount; } 73 void decDeferredRefCount() const { SkASSERT(fDeferredRefCount > 0); --fDefer redRefCount; }
74 74
75 protected: 75 protected:
76 /** 76 /**
77 * isWrapped indicates we have wrapped a client-created backend resource in a GrResource. If it 77 * isWrapped indicates we have wrapped a client-created backend resource in a GrResource. If it
78 * is true then the client is responsible for the lifetime of the underlying backend resource. 78 * is true then the client is responsible for the lifetime of the underlying backend resource.
79 * Otherwise, our onRelease() should free the resource. 79 * Otherwise, our onRelease() should free the resource.
80 */ 80 */
81 GrResource(GrGpu* gpu, bool isWrapped); 81 GrResource(GrGpu* gpu, bool isWrapped);
82 virtual ~GrResource(); 82 virtual ~GrResource();
83 83
(...skipping 24 matching lines...) Expand all
108 108
109 enum Flags { 109 enum Flags {
110 kWrapped_Flag = 0x1, 110 kWrapped_Flag = 0x1,
111 }; 111 };
112 uint32_t fFlags; 112 uint32_t fFlags;
113 113
114 typedef GrRefCnt INHERITED; 114 typedef GrRefCnt INHERITED;
115 }; 115 };
116 116
117 #endif 117 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrRenderTarget.h ('k') | include/gpu/GrSurface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698