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

Side by Side Diff: src/gpu/batches/GrDrawPathBatch.cpp

Issue 1509023004: Fix compile error with GOOGLE3 define. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 5 years 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 | « no previous file | no next file » | 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 #include "GrDrawPathBatch.h" 8 #include "GrDrawPathBatch.h"
9 9
10 static void pre_translate_transform_values(const float* xforms, 10 static void pre_translate_transform_values(const float* xforms,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 const InstanceData& instances = *head.fInstanceData; 132 const InstanceData& instances = *head.fInstanceData;
133 state->gpu()->pathRendering()->drawPaths(args, fPathRange.get(), instanc es.indices(), 133 state->gpu()->pathRendering()->drawPaths(args, fPathRange.get(), instanc es.indices(),
134 GrPathRange::kU16_PathIndexType , 134 GrPathRange::kU16_PathIndexType ,
135 instances.transformValues(), 135 instances.transformValues(),
136 instances.transformType(), 136 instances.transformType(),
137 instances.count()); 137 instances.count());
138 } else { 138 } else {
139 int floatsPerTransform = GrPathRendering::PathTransformSize(this->transf ormType()); 139 int floatsPerTransform = GrPathRendering::PathTransformSize(this->transf ormType());
140 #if defined(GOOGLE3) 140 #if defined(GOOGLE3)
141 //Stack frame size is limited in GOOGLE3. 141 //Stack frame size is limited in GOOGLE3.
142 SkAutoSTMalloc<512, float> transformStorage(transformSize * fTotalPathCo unt); 142 SkAutoSTMalloc<512, float> transformStorage(floatsPerTransform * fTotalP athCount);
143 SkAutoSTMalloc<256, uint16_t> indexStorage(fTotalPathCount); 143 SkAutoSTMalloc<256, uint16_t> indexStorage(fTotalPathCount);
144 #else 144 #else
145 SkAutoSTMalloc<4096, float> transformStorage(floatsPerTransform * fTotal PathCount); 145 SkAutoSTMalloc<4096, float> transformStorage(floatsPerTransform * fTotal PathCount);
146 SkAutoSTMalloc<2048, uint16_t> indexStorage(fTotalPathCount); 146 SkAutoSTMalloc<2048, uint16_t> indexStorage(fTotalPathCount);
147 #endif 147 #endif
148 int idx = 0; 148 int idx = 0;
149 for (DrawList::Iter iter(fDraws); iter.get(); iter.next()) { 149 for (DrawList::Iter iter(fDraws); iter.get(); iter.next()) {
150 const Draw& draw = *iter.get(); 150 const Draw& draw = *iter.get();
151 const InstanceData& instances = *draw.fInstanceData; 151 const InstanceData& instances = *draw.fInstanceData;
152 memcpy(&indexStorage[idx], instances.indices(), instances.count() * sizeof(uint16_t)); 152 memcpy(&indexStorage[idx], instances.indices(), instances.count() * sizeof(uint16_t));
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 dst[i + 3] = xforms[i + 3]; 204 dst[i + 3] = xforms[i + 3];
205 dst[i + 4] = xforms[i + 4]; 205 dst[i + 4] = xforms[i + 4];
206 dst[i + 5] = xforms[i + 3] * x + xforms[i + 4] * y + xforms[i + 5]; 206 dst[i + 5] = xforms[i + 3] * x + xforms[i + 4] * y + xforms[i + 5];
207 } 207 }
208 break; 208 break;
209 default: 209 default:
210 SkFAIL("Unknown transform type."); 210 SkFAIL("Unknown transform type.");
211 break; 211 break;
212 } 212 }
213 } 213 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698