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

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

Issue 39973004: Minor changes (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: 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 | « no previous file | src/effects/SkBitmapAlphaThresholdShader.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 2011 Google Inc. 2 * Copyright 2011 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 GrResource_DEFINED 8 #ifndef GrResource_DEFINED
9 #define GrResource_DEFINED 9 #define GrResource_DEFINED
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 * GrContext automatically releases all its resources. 61 * GrContext automatically releases all its resources.
62 */ 62 */
63 const GrContext* getContext() const; 63 const GrContext* getContext() const;
64 GrContext* getContext(); 64 GrContext* getContext();
65 65
66 void setCacheEntry(GrResourceEntry* cacheEntry) { fCacheEntry = cacheEntry; } 66 void setCacheEntry(GrResourceEntry* cacheEntry) { fCacheEntry = cacheEntry; }
67 GrResourceEntry* getCacheEntry() { return fCacheEntry; } 67 GrResourceEntry* getCacheEntry() { return fCacheEntry; }
68 68
69 void incDeferredRefCount() const { SkASSERT(fDeferredRefCount >= 0); ++fDefe rredRefCount; } 69 void incDeferredRefCount() const { SkASSERT(fDeferredRefCount >= 0); ++fDefe rredRefCount; }
70 void decDeferredRefCount() const { SkASSERT(fDeferredRefCount > 0); --fDefer redRefCount; } 70 void decDeferredRefCount() const { SkASSERT(fDeferredRefCount > 0); --fDefer redRefCount; }
71 int getDeferredRefCount() const { return fDeferredRefCount; }
71 72
72 protected: 73 protected:
73 /** 74 /**
74 * isWrapped indicates we have wrapped a client-created backend resource in a GrResource. If it 75 * isWrapped indicates we have wrapped a client-created backend resource in a GrResource. If it
75 * is true then the client is responsible for the lifetime of the underlying backend resource. 76 * is true then the client is responsible for the lifetime of the underlying backend resource.
76 * Otherwise, our onRelease() should free the resource. 77 * Otherwise, our onRelease() should free the resource.
77 */ 78 */
78 GrResource(GrGpu* gpu, bool isWrapped); 79 GrResource(GrGpu* gpu, bool isWrapped);
79 virtual ~GrResource(); 80 virtual ~GrResource();
80 81
(...skipping 24 matching lines...) Expand all
105 106
106 enum Flags { 107 enum Flags {
107 kWrapped_Flag = 0x1, 108 kWrapped_Flag = 0x1,
108 }; 109 };
109 uint32_t fFlags; 110 uint32_t fFlags;
110 111
111 typedef SkRefCnt INHERITED; 112 typedef SkRefCnt INHERITED;
112 }; 113 };
113 114
114 #endif 115 #endif
OLDNEW
« no previous file with comments | « no previous file | src/effects/SkBitmapAlphaThresholdShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698