| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 #if SK_SUPPORT_GPU | 8 #if SK_SUPPORT_GPU |
| 9 | 9 |
| 10 #include "GrContext.h" | 10 #include "GrContext.h" |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 , fToDelete(NULL) | 241 , fToDelete(NULL) |
| 242 , fSize(kDefaultSize) | 242 , fSize(kDefaultSize) |
| 243 , fProperty(property) { | 243 , fProperty(property) { |
| 244 GrScratchKey scratchKey; | 244 GrScratchKey scratchKey; |
| 245 ComputeScratchKey(fProperty, &scratchKey); | 245 ComputeScratchKey(fProperty, &scratchKey); |
| 246 this->setScratchKey(scratchKey); | 246 this->setScratchKey(scratchKey); |
| 247 ++fNumAlive; | 247 ++fNumAlive; |
| 248 this->registerWithCache(); | 248 this->registerWithCache(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 size_t onGpuMemorySize() const SK_OVERRIDE { return fSize; } | 251 size_t onGpuMemorySize() const override { return fSize; } |
| 252 | 252 |
| 253 TestResource* fToDelete; | 253 TestResource* fToDelete; |
| 254 size_t fSize; | 254 size_t fSize; |
| 255 static int fNumAlive; | 255 static int fNumAlive; |
| 256 SimulatedProperty fProperty; | 256 SimulatedProperty fProperty; |
| 257 typedef GrGpuResource INHERITED; | 257 typedef GrGpuResource INHERITED; |
| 258 }; | 258 }; |
| 259 int TestResource::fNumAlive = 0; | 259 int TestResource::fNumAlive = 0; |
| 260 | 260 |
| 261 class Mock { | 261 class Mock { |
| (...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1115 test_remove_scratch_key(reporter); | 1115 test_remove_scratch_key(reporter); |
| 1116 test_scratch_key_consistency(reporter); | 1116 test_scratch_key_consistency(reporter); |
| 1117 test_purge_invalidated(reporter); | 1117 test_purge_invalidated(reporter); |
| 1118 test_cache_chained_purge(reporter); | 1118 test_cache_chained_purge(reporter); |
| 1119 test_resource_size_changed(reporter); | 1119 test_resource_size_changed(reporter); |
| 1120 test_timestamp_wrap(reporter); | 1120 test_timestamp_wrap(reporter); |
| 1121 test_large_resource_count(reporter); | 1121 test_large_resource_count(reporter); |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 #endif | 1124 #endif |
| OLD | NEW |