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

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

Issue 23483042: Replace uses of GrNoncopyable by SkNoncopyable. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rm GrNoncopyable.h 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 | « include/gpu/GrTextureAccess.h ('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
2 /* 1 /*
3 * Copyright 2010 Google Inc. 2 * Copyright 2010 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
8 7
9
10
11 #ifndef GrAllocPool_DEFINED 8 #ifndef GrAllocPool_DEFINED
12 #define GrAllocPool_DEFINED 9 #define GrAllocPool_DEFINED
13 10
14 #include "GrNoncopyable.h" 11 #include "SkTypes.h"
15 12
16 class GrAllocPool : GrNoncopyable { 13 class GrAllocPool : public SkNoncopyable {
17 public: 14 public:
18 GrAllocPool(size_t blockSize = 0); 15 GrAllocPool(size_t blockSize = 0);
19 ~GrAllocPool(); 16 ~GrAllocPool();
20 17
21 /** 18 /**
22 * Frees all blocks that have been allocated with alloc(). 19 * Frees all blocks that have been allocated with alloc().
23 */ 20 */
24 void reset(); 21 void reset();
25 22
26 /** 23 /**
(...skipping 27 matching lines...) Expand all
54 GrTAllocPool(int count) : fPool(count * sizeof(T)) {} 51 GrTAllocPool(int count) : fPool(count * sizeof(T)) {}
55 52
56 void reset() { fPool.reset(); } 53 void reset() { fPool.reset(); }
57 T* alloc() { return (T*)fPool.alloc(sizeof(T)); } 54 T* alloc() { return (T*)fPool.alloc(sizeof(T)); }
58 55
59 private: 56 private:
60 GrAllocPool fPool; 57 GrAllocPool fPool;
61 }; 58 };
62 59
63 #endif 60 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrTextureAccess.h ('k') | src/gpu/GrAllocPool.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698