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

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

Issue 20362002: make the filter mode for GrTextureAccess an enum so we can plumb down (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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
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 #ifndef GrTexture_DEFINED 9 #ifndef GrTexture_DEFINED
10 #define GrTexture_DEFINED 10 #define GrTexture_DEFINED
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 } 120 }
121 #else 121 #else
122 void validate() const {} 122 void validate() const {}
123 #endif 123 #endif
124 static GrResourceKey ComputeKey(const GrGpu* gpu, 124 static GrResourceKey ComputeKey(const GrGpu* gpu,
125 const GrTextureParams* params, 125 const GrTextureParams* params,
126 const GrTextureDesc& desc, 126 const GrTextureDesc& desc,
127 const GrCacheID& cacheID); 127 const GrCacheID& cacheID);
128 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc); 128 static GrResourceKey ComputeScratchKey(const GrTextureDesc& desc);
129 static bool NeedsResizing(const GrResourceKey& key); 129 static bool NeedsResizing(const GrResourceKey& key);
130 static bool NeedsFiltering(const GrResourceKey& key); 130 static bool NeedsBilerp(const GrResourceKey& key);
131 static bool NeedsMipMap(const GrResourceKey& key);
131 132
132 protected: 133 protected:
133 // A texture refs its rt representation but not vice-versa. It is up to 134 // A texture refs its rt representation but not vice-versa. It is up to
134 // the subclass constructor to initialize this pointer. 135 // the subclass constructor to initialize this pointer.
135 SkAutoTUnref<GrRenderTarget> fRenderTarget; 136 SkAutoTUnref<GrRenderTarget> fRenderTarget;
136 137
137 GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) 138 GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc)
138 : INHERITED(gpu, isWrapped, desc) 139 : INHERITED(gpu, isWrapped, desc)
139 , fRenderTarget(NULL) { 140 , fRenderTarget(NULL) {
140 141
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 GrTexture* setTexture(GrTexture* texture) { 194 GrTexture* setTexture(GrTexture* texture) {
194 fTexture.reset(SkSafeRef(texture)); 195 fTexture.reset(SkSafeRef(texture));
195 return texture; 196 return texture;
196 } 197 }
197 private: 198 private:
198 SkAutoTUnref<GrTexture> fTexture; 199 SkAutoTUnref<GrTexture> fTexture;
199 SkIPoint fOffset; 200 SkIPoint fOffset;
200 }; 201 };
201 202
202 #endif 203 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698