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

Side by Side Diff: src/gpu/GrAllocPool.h

Issue 23137022: Replace uses of GR_DEBUG by SK_DEBUG. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: not GR_RELEASE Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrAllocPool.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 /* 2 /*
3 * Copyright 2010 Google Inc. 3 * Copyright 2010 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 10
(...skipping 23 matching lines...) Expand all
34 * Releases the most recently allocated bytes back to allocpool. 34 * Releases the most recently allocated bytes back to allocpool.
35 */ 35 */
36 void release(size_t bytes); 36 void release(size_t bytes);
37 37
38 private: 38 private:
39 struct Block; 39 struct Block;
40 40
41 Block* fBlock; 41 Block* fBlock;
42 size_t fMinBlockSize; 42 size_t fMinBlockSize;
43 43
44 #if GR_DEBUG 44 #ifdef SK_DEBUG
45 int fBlocksAllocated; 45 int fBlocksAllocated;
46 void validate() const; 46 void validate() const;
47 #else 47 #else
48 void validate() const {} 48 void validate() const {}
49 #endif 49 #endif
50 }; 50 };
51 51
52 template <typename T> class GrTAllocPool { 52 template <typename T> class GrTAllocPool {
53 public: 53 public:
54 GrTAllocPool(int count) : fPool(count * sizeof(T)) {} 54 GrTAllocPool(int count) : fPool(count * sizeof(T)) {}
55 55
56 void reset() { fPool.reset(); } 56 void reset() { fPool.reset(); }
57 T* alloc() { return (T*)fPool.alloc(sizeof(T)); } 57 T* alloc() { return (T*)fPool.alloc(sizeof(T)); }
58 58
59 private: 59 private:
60 GrAllocPool fPool; 60 GrAllocPool fPool;
61 }; 61 };
62 62
63 #endif 63 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrAARectRenderer.cpp ('k') | src/gpu/GrAllocPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698