| OLD | NEW |
| 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 Loading... |
| 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 | 131 |
| 132 protected: | 132 protected: |
| 133 // A texture refs its rt representation but not vice-versa. It is up to | 133 // A texture refs its rt representation but not vice-versa. It is up to |
| 134 // the subclass constructor to initialize this pointer. | 134 // the subclass constructor to initialize this pointer. |
| 135 SkAutoTUnref<GrRenderTarget> fRenderTarget; | 135 SkAutoTUnref<GrRenderTarget> fRenderTarget; |
| 136 | 136 |
| 137 GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) | 137 GrTexture(GrGpu* gpu, bool isWrapped, const GrTextureDesc& desc) |
| 138 : INHERITED(gpu, isWrapped, desc) | 138 : INHERITED(gpu, isWrapped, desc) |
| 139 , fRenderTarget(NULL) { | 139 , fRenderTarget(NULL) { |
| 140 | 140 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 GrTexture* setTexture(GrTexture* texture) { | 193 GrTexture* setTexture(GrTexture* texture) { |
| 194 fTexture.reset(SkSafeRef(texture)); | 194 fTexture.reset(SkSafeRef(texture)); |
| 195 return texture; | 195 return texture; |
| 196 } | 196 } |
| 197 private: | 197 private: |
| 198 SkAutoTUnref<GrTexture> fTexture; | 198 SkAutoTUnref<GrTexture> fTexture; |
| 199 SkIPoint fOffset; | 199 SkIPoint fOffset; |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 #endif | 202 #endif |
| OLD | NEW |