Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(112)

Side by Side Diff: tests/ResourceCacheTest.cpp

Issue 1217573002: remove SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/RefDictTest.cpp ('k') | tests/UtilsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tests/RefDictTest.cpp ('k') | tests/UtilsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698