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 | 8 |
9 #include "Test.h" | 9 #include "Test.h" |
10 | 10 |
11 // This is a GR test | 11 // This is a GR test |
12 #if SK_SUPPORT_GPU | 12 #if SK_SUPPORT_GPU |
13 #include "GrTHashCache.h" | 13 #include "GrTHashTable.h" |
14 | 14 |
15 struct HashElement { | 15 struct HashElement { |
16 int fKey; | 16 int fKey; |
17 int fValue; | 17 int fValue; |
18 }; | 18 }; |
19 | 19 |
20 class GrFindPositivesFunctor { | 20 class GrFindPositivesFunctor { |
21 public: | 21 public: |
22 // only return elements with positive values | 22 // only return elements with positive values |
23 bool operator()(const HashElement* elem) const { | 23 bool operator()(const HashElement* elem) const { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 cache.removeAll(); | 161 cache.removeAll(); |
162 REPORTER_ASSERT(reporter, 0 == cache.count()); | 162 REPORTER_ASSERT(reporter, 0 == cache.count()); |
163 } | 163 } |
164 } | 164 } |
165 | 165 |
166 //////////////////////////////////////////////////////////////////////////////// | 166 //////////////////////////////////////////////////////////////////////////////// |
167 #include "TestClassDef.h" | 167 #include "TestClassDef.h" |
168 DEFINE_TESTCLASS("HashCache", HashCacheTestClass, TestHashCache) | 168 DEFINE_TESTCLASS("HashCache", HashCacheTestClass, TestHashCache) |
169 | 169 |
170 #endif | 170 #endif |
OLD | NEW |