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 #include "GrTextureAccess.h" | 8 #include "GrTextureAccess.h" |
9 #include "GrColor.h" | 9 #include "GrColor.h" |
10 #include "GrTexture.h" | 10 #include "GrTexture.h" |
11 | 11 |
12 GrTextureAccess::GrTextureAccess() { | 12 GrTextureAccess::GrTextureAccess() { |
13 #if GR_DEBUG | 13 #if SK_DEBUG |
14 memcpy(fSwizzle, "void", 5); | 14 memcpy(fSwizzle, "void", 5); |
15 fSwizzleMask = 0xbeeffeed; | 15 fSwizzleMask = 0xbeeffeed; |
16 #endif | 16 #endif |
17 } | 17 } |
18 | 18 |
19 GrTextureAccess::GrTextureAccess(GrTexture* texture, const GrTextureParams& para
ms) { | 19 GrTextureAccess::GrTextureAccess(GrTexture* texture, const GrTextureParams& para
ms) { |
20 this->reset(texture, params); | 20 this->reset(texture, params); |
21 } | 21 } |
22 | 22 |
23 GrTextureAccess::GrTextureAccess(GrTexture* texture, | 23 GrTextureAccess::GrTextureAccess(GrTexture* texture, |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 break; | 98 break; |
99 case 'a': | 99 case 'a': |
100 fSwizzleMask |= kA_GrColorComponentFlag; | 100 fSwizzleMask |= kA_GrColorComponentFlag; |
101 break; | 101 break; |
102 default: | 102 default: |
103 GrCrash("Unexpected swizzle string character."); | 103 GrCrash("Unexpected swizzle string character."); |
104 break; | 104 break; |
105 } | 105 } |
106 } | 106 } |
107 } | 107 } |
OLD | NEW |