| OLD | NEW |
| 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 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 void operator delete(void* target); | 23 void operator delete(void* target); |
| 24 | 24 |
| 25 void* operator new(size_t size, void* placement) { | 25 void* operator new(size_t size, void* placement) { |
| 26 return ::operator new(size, placement); | 26 return ::operator new(size, placement); |
| 27 } | 27 } |
| 28 void operator delete(void* target, void* placement) { | 28 void operator delete(void* target, void* placement) { |
| 29 ::operator delete(target, placement); | 29 ::operator delete(target, placement); |
| 30 } | 30 } |
| 31 | 31 |
| 32 private: | 32 private: |
| 33 uint32_t currentSaveMarker() const { return 0; } |
| 34 void restoreToSaveMarker(/*uint32_t marker*/) {} |
| 35 |
| 36 // For GrPipelineBuilder::AutoRestoreProcessorDataManager |
| 37 friend class GrPipelineBuilder; |
| 33 static const uint32_t kNumProcessor = 1; | 38 static const uint32_t kNumProcessor = 1; |
| 34 static const uint32_t kDataIndicesPerProcessor = 1; | 39 static const uint32_t kDataIndicesPerProcessor = 1; |
| 35 static const uint32_t kPreAllocDataPerProcessor = 1; | 40 static const uint32_t kPreAllocDataPerProcessor = 1; |
| 36 | 41 |
| 37 /*static const size_t kPreAllocStorage = kNumProcessor * kPreAllocDataPerPro
cessor; | 42 /*static const size_t kPreAllocStorage = kNumProcessor * kPreAllocDataPerPro
cessor; |
| 38 static const uint32_t kNumProcessor = 8; | 43 static const uint32_t kNumProcessor = 8; |
| 39 static const uint32_t kDataIndicesPerProcessor = 4; | 44 static const uint32_t kDataIndicesPerProcessor = 4; |
| 40 static const uint32_t kPreAllocDataPerProcessor = kDataIndicesPerProcessor * | 45 static const uint32_t kPreAllocDataPerProcessor = kDataIndicesPerProcessor * |
| 41 sizeof(GrCoordTransform);*
/ | 46 sizeof(GrCoordTransform);*
/ |
| 42 static const size_t kPreAllocIndices = kNumProcessor * kDataIndicesPerProces
sor; | 47 static const size_t kPreAllocIndices = kNumProcessor * kDataIndicesPerProces
sor; |
| 43 static const size_t kPreAllocStorage = kNumProcessor * kPreAllocDataPerProce
ssor; | 48 static const size_t kPreAllocStorage = kNumProcessor * kPreAllocDataPerProce
ssor; |
| 44 SkSTArray<kPreAllocIndices, uint32_t, true> fIndices; | 49 SkSTArray<kPreAllocIndices, uint32_t, true> fIndices; |
| 45 SkSTArray<kPreAllocStorage, unsigned char, true> fStorage; | 50 SkSTArray<kPreAllocStorage, unsigned char, true> fStorage; |
| 46 | 51 |
| 47 typedef SkRefCnt INHERITED; | 52 typedef SkRefCnt INHERITED; |
| 48 }; | 53 }; |
| 49 | 54 |
| 50 #endif | 55 #endif |
| OLD | NEW |