| 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 // Include here to ensure SK_SUPPORT_GPU is set correctly before it is examined. | 8 // Include here to ensure SK_SUPPORT_GPU is set correctly before it is examined. |
| 9 #include "SkTypes.h" | 9 #include "SkTypes.h" |
| 10 | 10 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 | 233 |
| 234 GR_GL_CALL(gl, GenTextures(1, &texIDs[0])); | 234 GR_GL_CALL(gl, GenTextures(1, &texIDs[0])); |
| 235 | 235 |
| 236 context->resetContext(); | 236 context->resetContext(); |
| 237 } | 237 } |
| 238 | 238 |
| 239 class TestResource : public GrGpuResource { | 239 class TestResource : public GrGpuResource { |
| 240 static const size_t kDefaultSize = 100; | 240 static const size_t kDefaultSize = 100; |
| 241 enum ScratchConstructor { kScratchConstructor }; | 241 enum ScratchConstructor { kScratchConstructor }; |
| 242 public: | 242 public: |
| 243 SK_DECLARE_INST_COUNT(TestResource); | 243 |
| 244 /** Property that distinctly categorizes the resource. | 244 /** Property that distinctly categorizes the resource. |
| 245 * For example, textures have width, height, ... */ | 245 * For example, textures have width, height, ... */ |
| 246 enum SimulatedProperty { kA_SimulatedProperty, kB_SimulatedProperty }; | 246 enum SimulatedProperty { kA_SimulatedProperty, kB_SimulatedProperty }; |
| 247 | 247 |
| 248 TestResource(GrGpu* gpu, size_t size, GrGpuResource::LifeCycle lifeCycle) | 248 TestResource(GrGpu* gpu, size_t size, GrGpuResource::LifeCycle lifeCycle) |
| 249 : INHERITED(gpu, lifeCycle) | 249 : INHERITED(gpu, lifeCycle) |
| 250 , fToDelete(NULL) | 250 , fToDelete(NULL) |
| 251 , fSize(size) | 251 , fSize(size) |
| 252 , fProperty(kA_SimulatedProperty) { | 252 , fProperty(kA_SimulatedProperty) { |
| 253 ++fNumAlive; | 253 ++fNumAlive; |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1270 test_scratch_key_consistency(reporter); | 1270 test_scratch_key_consistency(reporter); |
| 1271 test_purge_invalidated(reporter); | 1271 test_purge_invalidated(reporter); |
| 1272 test_cache_chained_purge(reporter); | 1272 test_cache_chained_purge(reporter); |
| 1273 test_resource_size_changed(reporter); | 1273 test_resource_size_changed(reporter); |
| 1274 test_timestamp_wrap(reporter); | 1274 test_timestamp_wrap(reporter); |
| 1275 test_flush(reporter); | 1275 test_flush(reporter); |
| 1276 test_large_resource_count(reporter); | 1276 test_large_resource_count(reporter); |
| 1277 } | 1277 } |
| 1278 | 1278 |
| 1279 #endif | 1279 #endif |
| OLD | NEW |