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

Side by Side Diff: tests/GrMemoryPoolTest.cpp

Issue 841263004: Simplify SkInstCnt (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: T:: Created 5 years, 11 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 | « src/gpu/gl/GrGLGpuProgramCache.cpp ('k') | tests/LListTest.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 2011 Google Inc. 2 * Copyright 2011 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 "Test.h" 8 #include "Test.h"
9 // This is a GPU-backend specific test 9 // This is a GPU-backend specific test
10 #if SK_SUPPORT_GPU 10 #if SK_SUPPORT_GPU
(...skipping 26 matching lines...) Expand all
37 } 37 }
38 38
39 void operator delete(void* p) { 39 void operator delete(void* p) {
40 if (!gPool.get()) { 40 if (!gPool.get()) {
41 ::operator delete(p); 41 ::operator delete(p);
42 } else { 42 } else {
43 return gPool->release(p); 43 return gPool->release(p);
44 } 44 }
45 } 45 }
46 46
47 SK_DECLARE_INST_COUNT_ROOT(A); 47 SK_DECLARE_INST_COUNT(A);
48 48
49 static A* Create(SkRandom* r); 49 static A* Create(SkRandom* r);
50 50
51 static void SetAllocator(size_t preallocSize, size_t minAllocSize) { 51 static void SetAllocator(size_t preallocSize, size_t minAllocSize) {
52 #if SK_ENABLE_INST_COUNT 52 #if SK_ENABLE_INST_COUNT
53 SkASSERT(0 == GetInstanceCount()); 53 SkASSERT(0 == GetInstanceCount());
54 #endif 54 #endif
55 GrMemoryPool* pool = new GrMemoryPool(preallocSize, minAllocSize); 55 GrMemoryPool* pool = new GrMemoryPool(preallocSize, minAllocSize);
56 gPool.reset(pool); 56 gPool.reset(pool);
57 } 57 }
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 delete rec.fInstance; 233 delete rec.fInstance;
234 } 234 }
235 #if SK_ENABLE_INST_COUNT 235 #if SK_ENABLE_INST_COUNT
236 REPORTER_ASSERT(reporter, !A::GetInstanceCount()); 236 REPORTER_ASSERT(reporter, !A::GetInstanceCount());
237 #endif 237 #endif
238 } 238 }
239 } 239 }
240 } 240 }
241 241
242 #endif 242 #endif
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLGpuProgramCache.cpp ('k') | tests/LListTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698