| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrTextureAccess_DEFINED | 8 #ifndef GrTextureAccess_DEFINED |
| 9 #define GrTextureAccess_DEFINED | 9 #define GrTextureAccess_DEFINED |
| 10 | 10 |
| 11 #include "GrNoncopyable.h" | 11 #include "GrNoncopyable.h" |
| 12 #include "SkRefCnt.h" | 12 #include "SkRefCnt.h" |
| 13 #include "SkShader.h" | 13 #include "SkShader.h" |
| 14 | 14 |
| 15 class GrTexture; | 15 class GrTexture; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * Represents the filtering and tile modes used to access a texture. It is mostl
y used with | 18 * Represents the filtering and tile modes used to access a texture. It is mostl
y used with |
| 19 * GrTextureAccess (defined below). Also, some of the texture cache methods requ
ire knowledge about | 19 * GrTextureAccess (defined below). Also, some of the texture cache methods requ
ire knowledge about |
| 20 * filtering and tiling to perform a cache lookup. If it wasn't for this latter
usage this would | 20 * filtering and tiling to perform a cache lookup. If it wasn't for this latter
usage this would |
| 21 * be folded into GrTextureAccess. | 21 * be folded into GrTextureAccess. The default is clamp tile modes and no filter
ing. |
| 22 */ | 22 */ |
| 23 class GrTextureParams { | 23 class GrTextureParams { |
| 24 public: | 24 public: |
| 25 GrTextureParams() { | 25 GrTextureParams() { |
| 26 this->reset(); | 26 this->reset(); |
| 27 } | 27 } |
| 28 | 28 |
| 29 enum FilterMode { | 29 enum FilterMode { |
| 30 kNone_FilterMode, | 30 kNone_FilterMode, |
| 31 kBilerp_FilterMode, | 31 kBilerp_FilterMode, |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 GrTextureParams fParams; | 180 GrTextureParams fParams; |
| 181 SkAutoTUnref<GrTexture> fTexture; | 181 SkAutoTUnref<GrTexture> fTexture; |
| 182 uint32_t fSwizzleMask; | 182 uint32_t fSwizzleMask; |
| 183 char fSwizzle[5]; | 183 char fSwizzle[5]; |
| 184 | 184 |
| 185 typedef GrNoncopyable INHERITED; | 185 typedef GrNoncopyable INHERITED; |
| 186 }; | 186 }; |
| 187 | 187 |
| 188 #endif | 188 #endif |
| OLD | NEW |