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

Side by Side Diff: include/gpu/GrProcessorDataManager.h

Issue 1225363002: Move GrProcessorDataManager to GrMemoryPool (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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 | « include/gpu/GrPaint.h ('k') | src/gpu/GrPaint.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 2015 Google Inc. 2 * Copyright 2015 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 #ifndef GrProcessorDataManager_DEFINED 8 #ifndef GrProcessorDataManager_DEFINED
9 #define GrProcessorDataManager_DEFINED 9 #define GrProcessorDataManager_DEFINED
10 10
11 class GrProcessorDataManager {}; 11 #include "SkRefCnt.h"
12 #include "SkTArray.h"
13
14 class GrProcessorDataManager : public SkRefCnt {
15 public:
16 GrProcessorDataManager() {}
17 GrProcessorDataManager(const GrProcessorDataManager& procDataManager) {
18 fIndices = procDataManager.fIndices;
19 fStorage = procDataManager.fStorage;
20 }
21
22 void* operator new(size_t size);
23 void operator delete(void* target);
24
25 void* operator new(size_t size, void* placement) {
26 return ::operator new(size, placement);
27 }
28 void operator delete(void* target, void* placement) {
29 ::operator delete(target, placement);
30 }
31
32 private:
33 static const uint32_t kNumProcessor = 1;
34 static const uint32_t kDataIndicesPerProcessor = 1;
35 static const uint32_t kPreAllocDataPerProcessor = 1;
36
37 /*static const size_t kPreAllocStorage = kNumProcessor * kPreAllocDataPerPro cessor;
38 static const uint32_t kNumProcessor = 8;
39 static const uint32_t kDataIndicesPerProcessor = 4;
40 static const uint32_t kPreAllocDataPerProcessor = kDataIndicesPerProcessor *
41 sizeof(GrCoordTransform);* /
42 static const size_t kPreAllocIndices = kNumProcessor * kDataIndicesPerProces sor;
43 static const size_t kPreAllocStorage = kNumProcessor * kPreAllocDataPerProce ssor;
44 SkSTArray<kPreAllocIndices, uint32_t, true> fIndices;
45 SkSTArray<kPreAllocStorage, unsigned char, true> fStorage;
46
47 typedef SkRefCnt INHERITED;
48 };
12 49
13 #endif 50 #endif
OLDNEW
« no previous file with comments | « include/gpu/GrPaint.h ('k') | src/gpu/GrPaint.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698