OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2010 Google Inc. | 2 * Copyright 2010 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 // This is a GPU-backend specific test | 8 // This is a GPU-backend specific test |
9 #if SK_SUPPORT_GPU | 9 #if SK_SUPPORT_GPU |
10 | 10 |
| 11 #include "GrMurmur3HashKey.h" |
11 #include "GrBinHashKey.h" | 12 #include "GrBinHashKey.h" |
12 | 13 |
13 #include "Test.h" | 14 #include "Test.h" |
14 | 15 |
15 template<typename KeyType> static void TestHash(skiatest::Reporter* reporter) { | 16 template<typename KeyType> static void TestHash(skiatest::Reporter* reporter) { |
16 const char* testStringA_ = "abcdABCD"; | 17 const char* testStringA_ = "abcdABCD"; |
17 const char* testStringB_ = "abcdBBCD"; | 18 const char* testStringB_ = "abcdBBCD"; |
18 const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(testStringA_
); | 19 const uint32_t* testStringA = reinterpret_cast<const uint32_t*>(testStringA_
); |
19 const uint32_t* testStringB = reinterpret_cast<const uint32_t*>(testStringB_
); | 20 const uint32_t* testStringB = reinterpret_cast<const uint32_t*>(testStringB_
); |
20 | 21 |
(...skipping 17 matching lines...) Expand all Loading... |
38 DEF_TEST(GrBinHashKey, reporter) { | 39 DEF_TEST(GrBinHashKey, reporter) { |
39 enum { | 40 enum { |
40 kDataLenUsedForKey = 8 | 41 kDataLenUsedForKey = 8 |
41 }; | 42 }; |
42 | 43 |
43 TestHash<GrBinHashKey<kDataLenUsedForKey> >(reporter); | 44 TestHash<GrBinHashKey<kDataLenUsedForKey> >(reporter); |
44 TestHash<GrMurmur3HashKey<kDataLenUsedForKey> >(reporter); | 45 TestHash<GrMurmur3HashKey<kDataLenUsedForKey> >(reporter); |
45 } | 46 } |
46 | 47 |
47 #endif | 48 #endif |
OLD | NEW |