| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 GrResourceKey_DEFINED | 9 #ifndef GrResourceKey_DEFINED |
| 10 #define GrResourceKey_DEFINED | 10 #define GrResourceKey_DEFINED |
| 11 | 11 |
| 12 #include "GrTypes.h" | 12 #include "GrTypes.h" |
| 13 #include "SkTemplates.h" | 13 #include "SkTemplates.h" |
| 14 #include "GrBinHashKey.h" | |
| 15 | 14 |
| 16 uint32_t GrResourceKeyHash(const uint32_t* data, size_t size); | 15 uint32_t GrResourceKeyHash(const uint32_t* data, size_t size); |
| 17 | 16 |
| 18 class GrResourceKey { | 17 class GrResourceKey { |
| 19 public: | 18 public: |
| 20 uint32_t hash() const { | 19 uint32_t hash() const { |
| 21 this->validate(); | 20 this->validate(); |
| 22 return fKey[kHash_MetaDataIdx]; | 21 return fKey[kHash_MetaDataIdx]; |
| 23 } | 22 } |
| 24 | 23 |
| (...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 // add the inner key to the end of the key so that op[] can be i
ndexed normally. | 220 // add the inner key to the end of the key so that op[] can be i
ndexed normally. |
| 222 this->operator[](extraData32Cnt + i) = innerKey.data()[i]; | 221 this->operator[](extraData32Cnt + i) = innerKey.data()[i]; |
| 223 } | 222 } |
| 224 } | 223 } |
| 225 private: | 224 private: |
| 226 typedef INHERITED::Builder INHERITED; | 225 typedef INHERITED::Builder INHERITED; |
| 227 }; | 226 }; |
| 228 }; | 227 }; |
| 229 | 228 |
| 230 #endif | 229 #endif |
| OLD | NEW |