OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "GrProcessor.h" | 8 #include "GrProcessor.h" |
9 #include "GrBackendProcessorFactory.h" | 9 #include "GrBackendProcessorFactory.h" |
10 #include "GrContext.h" | 10 #include "GrContext.h" |
11 #include "GrCoordTransform.h" | 11 #include "GrCoordTransform.h" |
| 12 #include "GrGeometryData.h" |
12 #include "GrInvariantOutput.h" | 13 #include "GrInvariantOutput.h" |
13 #include "GrMemoryPool.h" | 14 #include "GrMemoryPool.h" |
14 #include "SkTLS.h" | 15 #include "SkTLS.h" |
15 | 16 |
16 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS | 17 #if SK_ALLOW_STATIC_GLOBAL_INITIALIZERS |
17 | 18 |
18 /* | 19 /* |
19 * Originally these were both in the processor unit test header, but then it see
med to cause linker | 20 * Originally these were both in the processor unit test header, but then it see
med to cause linker |
20 * problems on android. | 21 * problems on android. |
21 */ | 22 */ |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 return false; | 146 return false; |
146 } | 147 } |
147 int count = fCoordTransforms.count(); | 148 int count = fCoordTransforms.count(); |
148 for (int i = 0; i < count; ++i) { | 149 for (int i = 0; i < count; ++i) { |
149 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { | 150 if (*fCoordTransforms[i] != *that.fCoordTransforms[i]) { |
150 return false; | 151 return false; |
151 } | 152 } |
152 } | 153 } |
153 return true; | 154 return true; |
154 } | 155 } |
| 156 |
| 157 ////////////////////////////////////////////////////////////////////////////////
/////////////////// |
| 158 |
| 159 /* |
| 160 * GrGeometryData shares the same pool so it lives in this file too |
| 161 */ |
| 162 void* GrGeometryData::operator new(size_t size) { |
| 163 return GrProcessor_Globals::GetTLS()->allocate(size); |
| 164 } |
| 165 |
| 166 void GrGeometryData::operator delete(void* target) { |
| 167 GrProcessor_Globals::GetTLS()->release(target); |
| 168 } |
| 169 |
OLD | NEW |