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

Side by Side Diff: src/gpu/gl/GrGLProgramDesc.cpp

Issue 582963002: Solo gp (Closed) Base URL: https://skia.googlesource.com/skia.git@no_peb
Patch Set: feddback inc Created 6 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
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 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 "gl/builders/GrGLProgramBuilder.h" 8 #include "gl/builders/GrGLProgramBuilder.h"
9 #include "GrGLProgramDesc.h" 9 #include "GrGLProgramDesc.h"
10 #include "GrBackendEffectFactory.h" 10 #include "GrBackendProcessorFactory.h"
11 #include "GrEffect.h" 11 #include "GrProcessor.h"
12 #include "GrGpuGL.h" 12 #include "GrGpuGL.h"
13 #include "GrOptDrawState.h" 13 #include "GrOptDrawState.h"
14 14
15 #include "SkChecksum.h" 15 #include "SkChecksum.h"
16 16
17 /** 17 /**
18 * The key for an individual coord transform is made up of a matrix type and a b it that 18 * The key for an individual coord transform is made up of a matrix type and a b it that
19 * indicates the source of the input coords. 19 * indicates the source of the input coords.
20 */ 20 */
21 enum { 21 enum {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 } 53 }
54 if (kRGB_GrColorComponentFlags & swizzleComponentMask) { 54 if (kRGB_GrColorComponentFlags & swizzleComponentMask) {
55 // The 'r', 'g', and/or 'b's must be mapped to 'a' according to our semantics that 55 // The 'r', 'g', and/or 'b's must be mapped to 'a' according to our semantics that
56 // alpha-only textures smear alpha across all four channels when rea d. 56 // alpha-only textures smear alpha across all four channels when rea d.
57 return true; 57 return true;
58 } 58 }
59 } 59 }
60 return false; 60 return false;
61 } 61 }
62 62
63 static uint32_t gen_attrib_key(const GrEffect* effect) { 63 static uint32_t gen_attrib_key(const GrGeometryProcessor* effect) {
64 uint32_t key = 0; 64 uint32_t key = 0;
65 65
66 const GrEffect::VertexAttribArray& vars = effect->getVertexAttribs(); 66 const GrGeometryProcessor::VertexAttribArray& vars = effect->getVertexAttrib s();
67 int numAttributes = vars.count(); 67 int numAttributes = vars.count();
68 SkASSERT(numAttributes <= 2); 68 SkASSERT(numAttributes <= 2);
69 for (int a = 0; a < numAttributes; ++a) { 69 for (int a = 0; a < numAttributes; ++a) {
70 uint32_t value = 1 << a; 70 uint32_t value = 1 << a;
71 key |= value; 71 key |= value;
72 } 72 }
73 return key; 73 return key;
74 } 74 }
75 75
76 static uint32_t gen_transform_key(const GrEffectStage& effectStage, 76 static uint32_t gen_transform_key(const GrProcessorStage& effectStage,
77 bool useExplicitLocalCoords) { 77 bool useExplicitLocalCoords) {
78 uint32_t totalKey = 0; 78 uint32_t totalKey = 0;
79 int numTransforms = effectStage.getEffect()->numTransforms(); 79 int numTransforms = effectStage.getProcessor()->numTransforms();
80 for (int t = 0; t < numTransforms; ++t) { 80 for (int t = 0; t < numTransforms; ++t) {
81 uint32_t key = 0; 81 uint32_t key = 0;
82 if (effectStage.isPerspectiveCoordTransform(t, useExplicitLocalCoords)) { 82 if (effectStage.isPerspectiveCoordTransform(t, useExplicitLocalCoords)) {
83 key |= kGeneral_MatrixType; 83 key |= kGeneral_MatrixType;
84 } else { 84 } else {
85 key |= kNoPersp_MatrixType; 85 key |= kNoPersp_MatrixType;
86 } 86 }
87 87
88 const GrCoordTransform& coordTransform = effectStage.getEffect()->coordT ransform(t); 88 const GrCoordTransform& coordTransform = effectStage.getProcessor()->coo rdTransform(t);
89 if (kLocal_GrCoordSet != coordTransform.sourceCoords() && useExplicitLoc alCoords) { 89 if (kLocal_GrCoordSet != coordTransform.sourceCoords() && useExplicitLoc alCoords) {
90 key |= kPositionCoords_Flag; 90 key |= kPositionCoords_Flag;
91 } 91 }
92 key <<= kTransformKeyBits * t; 92 key <<= kTransformKeyBits * t;
93 SkASSERT(0 == (totalKey & key)); // keys for each transform ought not to overlap 93 SkASSERT(0 == (totalKey & key)); // keys for each transform ought not to overlap
94 totalKey |= key; 94 totalKey |= key;
95 } 95 }
96 return totalKey; 96 return totalKey;
97 } 97 }
98 98
99 static uint32_t gen_texture_key(const GrEffect* effect, const GrGLCaps& caps) { 99 static uint32_t gen_texture_key(const GrProcessor* effect, const GrGLCaps& caps) {
100 uint32_t key = 0; 100 uint32_t key = 0;
101 int numTextures = effect->numTextures(); 101 int numTextures = effect->numTextures();
102 for (int t = 0; t < numTextures; ++t) { 102 for (int t = 0; t < numTextures; ++t) {
103 const GrTextureAccess& access = effect->textureAccess(t); 103 const GrTextureAccess& access = effect->textureAccess(t);
104 uint32_t configComponentMask = GrPixelConfigComponentMask(access.getText ure()->config()); 104 uint32_t configComponentMask = GrPixelConfigComponentMask(access.getText ure()->config());
105 if (swizzle_requires_alpha_remapping(caps, configComponentMask, access.s wizzleMask())) { 105 if (swizzle_requires_alpha_remapping(caps, configComponentMask, access.s wizzleMask())) {
106 key |= 1 << t; 106 key |= 1 << t;
107 } 107 }
108 } 108 }
109 return key; 109 return key;
110 } 110 }
111 111
112 /** 112 /**
113 * A function which emits a meta key into the key builder. This is required bec ause shader code may 113 * A function which emits a meta key into the key builder. This is required bec ause shader code may
114 * be dependent on properties of the effect that the effect itself doesn't use 114 * be dependent on properties of the effect that the effect itself doesn't use
115 * in its key (e.g. the pixel format of textures used). So we create a meta-key for 115 * in its key (e.g. the pixel format of textures used). So we create a meta-key for
116 * every effect using this function. It is also responsible for inserting the ef fect's class ID 116 * every effect using this function. It is also responsible for inserting the ef fect's class ID
117 * which must be different for every GrEffect subclass. It can fail if an effect uses too many 117 * which must be different for every GrProcessor subclass. It can fail if an eff ect uses too many
118 * textures, attributes, etc for the space allotted in the meta-key. 118 * textures, transforms, etc, for the space allotted in the meta-key.
119 */ 119 */
120 120
121 static bool gen_effect_meta_key(const GrEffectStage& effectStage, 121 static uint32_t* get_processor_meta_key(const GrProcessorStage& processorStage,
122 bool useExplicitLocalCoords, 122 bool useExplicitLocalCoords,
123 const GrGLCaps& caps, 123 const GrGLCaps& caps,
124 GrEffectKeyBuilder* b) { 124 GrProcessorKeyBuilder* b) {
125 125
126 uint32_t textureKey = gen_texture_key(effectStage.getEffect(), caps); 126 uint32_t textureKey = gen_texture_key(processorStage.getProcessor(), caps);
127 uint32_t transformKey = gen_transform_key(effectStage,useExplicitLocalCoords ); 127 uint32_t transformKey = gen_transform_key(processorStage,useExplicitLocalCoo rds);
128 uint32_t attribKey = gen_attrib_key(effectStage.getEffect()); 128 uint32_t classID = processorStage.getProcessor()->getFactory().effectClassID ();
129 uint32_t classID = effectStage.getEffect()->getFactory().effectClassID();
130 129
131 // Currently we allow 16 bits for each of the above portions of the meta-key . Fail if they 130 // Currently we allow 16 bits for each of the above portions of the meta-key . Fail if they
132 // don't fit. 131 // don't fit.
133 static const uint32_t kMetaKeyInvalidMask = ~((uint32_t) SK_MaxU16); 132 static const uint32_t kMetaKeyInvalidMask = ~((uint32_t) SK_MaxU16);
134 if ((textureKey | transformKey | attribKey | classID) & kMetaKeyInvalidMask) { 133 if ((textureKey | transformKey | classID) & kMetaKeyInvalidMask) {
135 return false; 134 return NULL;
136 } 135 }
137 136
138 uint32_t* key = b->add32n(2); 137 uint32_t* key = b->add32n(2);
139 key[0] = (textureKey << 16 | transformKey); 138 key[0] = (textureKey << 16 | transformKey);
140 key[1] = (classID << 16 | attribKey); 139 key[1] = (classID << 16);
141 return true; 140 return key;
142 } 141 }
143 142
144 bool GrGLProgramDesc::GetEffectKey(const GrEffectStage& stage, const GrGLCaps& c aps, 143 bool GrGLProgramDesc::GetProcessorKey(const GrProcessorStage& stage,
145 bool useExplicitLocalCoords, GrEffectKeyBuild er* b, 144 const GrGLCaps& caps,
146 uint16_t* effectKeySize) { 145 bool useExplicitLocalCoords,
147 const GrBackendEffectFactory& factory = stage.getEffect()->getFactory(); 146 GrProcessorKeyBuilder* b,
148 const GrEffect& effect = *stage.getEffect(); 147 uint16_t* processorKeySize) {
149 factory.getGLEffectKey(effect, caps, b); 148 const GrProcessor& effect = *stage.getProcessor();
149 const GrBackendProcessorFactory& factory = effect.getFactory();
150 factory.getGLProcessorKey(effect, caps, b);
150 size_t size = b->size(); 151 size_t size = b->size();
151 if (size > SK_MaxU16) { 152 if (size > SK_MaxU16) {
152 *effectKeySize = 0; // suppresses a warning. 153 *processorKeySize = 0; // suppresses a warning.
153 return false; 154 return false;
154 } 155 }
155 *effectKeySize = SkToU16(size); 156 *processorKeySize = SkToU16(size);
156 if (!gen_effect_meta_key(stage, useExplicitLocalCoords, caps, b)) { 157 if (NULL == get_processor_meta_key(stage, useExplicitLocalCoords, caps, b)) {
157 return false; 158 return false;
158 } 159 }
159 return true; 160 return true;
160 } 161 }
161 162
163 bool GrGLProgramDesc::GetGeometryProcessorKey(const GrGeometryStage& stage,
164 const GrGLCaps& caps,
165 bool useExplicitLocalCoords,
166 GrProcessorKeyBuilder* b,
167 uint16_t* processorKeySize) {
168 const GrProcessor& effect = *stage.getProcessor();
169 const GrBackendProcessorFactory& factory = effect.getFactory();
170 factory.getGLProcessorKey(effect, caps, b);
171 size_t size = b->size();
172 if (size > SK_MaxU16) {
173 *processorKeySize = 0; // suppresses a warning.
174 return false;
175 }
176 *processorKeySize = SkToU16(size);
177 uint32_t* key = get_processor_meta_key(stage, useExplicitLocalCoords, caps, b);
178 if (NULL == key) {
179 return false;
180 }
181 uint32_t attribKey = gen_attrib_key(stage.getGeometryProcessor());
182
183 // Currently we allow 16 bits for each of the above portions of the meta-key . Fail if they
184 // don't fit.
185 static const uint32_t kMetaKeyInvalidMask = ~((uint32_t) SK_MaxU16);
186 if ((attribKey) & kMetaKeyInvalidMask) {
187 return false;
188 }
189
190 key[1] |= attribKey;
191 return true;
192 }
193
194
162 bool GrGLProgramDesc::Build(const GrOptDrawState& optState, 195 bool GrGLProgramDesc::Build(const GrOptDrawState& optState,
163 GrGpu::DrawType drawType, 196 GrGpu::DrawType drawType,
164 GrBlendCoeff srcCoeff, 197 GrBlendCoeff srcCoeff,
165 GrBlendCoeff dstCoeff, 198 GrBlendCoeff dstCoeff,
166 const GrGpuGL* gpu, 199 const GrGpuGL* gpu,
167 const GrDeviceCoordTexture* dstCopy, 200 const GrDeviceCoordTexture* dstCopy,
168 const GrEffectStage** geometryProcessor, 201 const GrGeometryStage** geometryProcessor,
169 SkTArray<const GrEffectStage*, true>* colorStages, 202 SkTArray<const GrFragmentStage*, true>* colorStages,
170 SkTArray<const GrEffectStage*, true>* coverageStages , 203 SkTArray<const GrFragmentStage*, true>* coverageStag es,
171 GrGLProgramDesc* desc) { 204 GrGLProgramDesc* desc) {
172 colorStages->reset(); 205 colorStages->reset();
173 coverageStages->reset(); 206 coverageStages->reset();
174 207
175 bool inputColorIsUsed = optState.inputColorIsUsed(); 208 bool inputColorIsUsed = optState.inputColorIsUsed();
176 bool inputCoverageIsUsed = optState.inputColorIsUsed(); 209 bool inputCoverageIsUsed = optState.inputColorIsUsed();
177 210
178 // The descriptor is used as a cache key. Thus when a field of the 211 // The descriptor is used as a cache key. Thus when a field of the
179 // descriptor will not affect program generation (because of the attribute 212 // descriptor will not affect program generation (because of the attribute
180 // bindings in use or other descriptor field settings) it should be set 213 // bindings in use or other descriptor field settings) it should be set
181 // to a canonical value to avoid duplicate programs with different keys. 214 // to a canonical value to avoid duplicate programs with different keys.
182 215
183 bool requiresColorAttrib = optState.hasColorVertexAttribute(); 216 bool requiresColorAttrib = optState.hasColorVertexAttribute();
184 bool requiresCoverageAttrib = optState.hasCoverageVertexAttribute(); 217 bool requiresCoverageAttrib = optState.hasCoverageVertexAttribute();
185 bool requiresLocalCoordAttrib = optState.requiresLocalCoordAttrib(); 218 bool requiresLocalCoordAttrib = optState.requiresLocalCoordAttrib();
186 219
187 int numStages = optState.numTotalStages(); 220 int numStages = optState.numTotalStages();
188 221
189 GR_STATIC_ASSERT(0 == kEffectKeyOffsetsAndLengthOffset % sizeof(uint32_t)); 222 GR_STATIC_ASSERT(0 == kEffectKeyOffsetsAndLengthOffset % sizeof(uint32_t));
190 // Make room for everything up to and including the array of offsets to effe ct keys. 223 // Make room for everything up to and including the array of offsets to effe ct keys.
191 desc->fKey.reset(); 224 desc->fKey.reset();
192 desc->fKey.push_back_n(kEffectKeyOffsetsAndLengthOffset + 2 * sizeof(uint16_ t) * numStages); 225 desc->fKey.push_back_n(kEffectKeyOffsetsAndLengthOffset + 2 * sizeof(uint16_ t) * numStages);
193 226
194 int offsetAndSizeIndex = 0; 227 int offsetAndSizeIndex = 0;
195 bool effectKeySuccess = true;
196 228
197 KeyHeader* header = desc->header(); 229 KeyHeader* header = desc->header();
198 // make sure any padding in the header is zeroed. 230 // make sure any padding in the header is zeroed.
199 memset(desc->header(), 0, kHeaderSize); 231 memset(desc->header(), 0, kHeaderSize);
200 232
201 // We can only have one effect which touches the vertex shader 233 // We can only have one effect which touches the vertex shader
202 if (optState.hasGeometryProcessor()) { 234 if (optState.hasGeometryProcessor()) {
203 uint16_t* offsetAndSize = 235 uint16_t* offsetAndSize =
204 reinterpret_cast<uint16_t*>(desc->fKey.begin() + kEffectKeyOffse tsAndLengthOffset + 236 reinterpret_cast<uint16_t*>(desc->fKey.begin() + kEffectKeyOffse tsAndLengthOffset +
205 offsetAndSizeIndex * 2 * sizeof(uint 16_t)); 237 offsetAndSizeIndex * 2 * sizeof(uint 16_t));
206 238
207 GrEffectKeyBuilder b(&desc->fKey); 239 GrProcessorKeyBuilder b(&desc->fKey);
208 uint16_t effectKeySize; 240 uint16_t processorKeySize;
209 uint32_t effectOffset = desc->fKey.count(); 241 uint32_t processorOffset = desc->fKey.count();
210 effectKeySuccess |= GetEffectKey(*optState.getGeometryProcessor(), g pu->glCaps(), 242 const GrGeometryStage& gpStage = *optState.getGeometryProcessor();
211 requiresLocalCoordAttrib, &b, &effe ctKeySize); 243 if (processorOffset > SK_MaxU16 ||
212 effectKeySuccess |= (effectOffset <= SK_MaxU16); 244 !GetGeometryProcessorKey(gpStage, gpu->glCaps(), requiresLocalCo ordAttrib, &b,
245 &processorKeySize)) {
246 desc->fKey.reset();
247 return false;
248 }
213 249
214 offsetAndSize[0] = SkToU16(effectOffset); 250 offsetAndSize[0] = SkToU16(processorOffset);
215 offsetAndSize[1] = effectKeySize; 251 offsetAndSize[1] = processorKeySize;
216 ++offsetAndSizeIndex; 252 ++offsetAndSizeIndex;
217 *geometryProcessor = optState.getGeometryProcessor(); 253 *geometryProcessor = &gpStage;
218 header->fHasGeometryProcessor = true; 254 header->fHasGeometryProcessor = true;
219 } 255 }
220 256
221 for (int s = 0; s < optState.numColorStages(); ++s) { 257 for (int s = 0; s < optState.numColorStages(); ++s) {
222 uint16_t* offsetAndSize = 258 uint16_t* offsetAndSize =
223 reinterpret_cast<uint16_t*>(desc->fKey.begin() + kEffectKeyOffsetsAn dLengthOffset + 259 reinterpret_cast<uint16_t*>(desc->fKey.begin() + kEffectKeyOffsetsAn dLengthOffset +
224 offsetAndSizeIndex * 2 * sizeof(uint16_t )); 260 offsetAndSizeIndex * 2 * sizeof(uint16_t ));
225 261
226 GrEffectKeyBuilder b(&desc->fKey); 262 GrProcessorKeyBuilder b(&desc->fKey);
227 uint16_t effectKeySize; 263 uint16_t processorKeySize;
228 uint32_t effectOffset = desc->fKey.count(); 264 uint32_t processorOffset = desc->fKey.count();
229 effectKeySuccess |= GetEffectKey(optState.getColorStage(s), gpu->glCaps( ), 265 if (processorOffset > SK_MaxU16 ||
230 requiresLocalCoordAttrib, &b, &effectKe ySize); 266 !GetProcessorKey(optState.getColorStage(s), gpu->glCaps(),
231 effectKeySuccess |= (effectOffset <= SK_MaxU16); 267 requiresLocalCoordAttrib, &b, &processorKeySize )) {
268 desc->fKey.reset();
269 return false;
270 }
232 271
233 offsetAndSize[0] = SkToU16(effectOffset); 272 offsetAndSize[0] = SkToU16(processorOffset);
234 offsetAndSize[1] = effectKeySize; 273 offsetAndSize[1] = processorKeySize;
235 ++offsetAndSizeIndex; 274 ++offsetAndSizeIndex;
236 } 275 }
237 276
238 for (int s = 0; s < optState.numCoverageStages(); ++s) { 277 for (int s = 0; s < optState.numCoverageStages(); ++s) {
239 uint16_t* offsetAndSize = 278 uint16_t* offsetAndSize =
240 reinterpret_cast<uint16_t*>(desc->fKey.begin() + kEffectKeyOffsetsAn dLengthOffset + 279 reinterpret_cast<uint16_t*>(desc->fKey.begin() + kEffectKeyOffsetsAn dLengthOffset +
241 offsetAndSizeIndex * 2 * sizeof(uint16_t )); 280 offsetAndSizeIndex * 2 * sizeof(uint16_t ));
242 281
243 GrEffectKeyBuilder b(&desc->fKey); 282 GrProcessorKeyBuilder b(&desc->fKey);
244 uint16_t effectKeySize; 283 uint16_t processorKeySize;
245 uint32_t effectOffset = desc->fKey.count(); 284 uint32_t processorOffset = desc->fKey.count();
246 effectKeySuccess |= GetEffectKey(optState.getCoverageStage(s), gpu->glCa ps(), 285 if (processorOffset > SK_MaxU16 ||
247 requiresLocalCoordAttrib, &b, &effectKe ySize); 286 !GetProcessorKey(optState.getCoverageStage(s), gpu->glCaps(),
248 effectKeySuccess |= (effectOffset <= SK_MaxU16); 287 requiresLocalCoordAttrib, &b, &processorKeySize )) {
288 desc->fKey.reset();
289 return false;
290 }
249 291
250 offsetAndSize[0] = SkToU16(effectOffset); 292 offsetAndSize[0] = SkToU16(processorOffset);
251 offsetAndSize[1] = effectKeySize; 293 offsetAndSize[1] = processorKeySize;
252 ++offsetAndSizeIndex; 294 ++offsetAndSizeIndex;
253 } 295 }
254 296
255 if (!effectKeySuccess) {
256 desc->fKey.reset();
257 return false;
258 }
259
260 // Because header is a pointer into the dynamic array, we can't push any new data into the key 297 // Because header is a pointer into the dynamic array, we can't push any new data into the key
261 // below here. 298 // below here.
262 299
263 // We will only require a vertex shader if we have more than just the positi on VA attrib. 300 // We will only require a vertex shader if we have more than just the positi on VA attrib.
264 // If we have a geom processor we must us a vertex shader and we should not have a geometry 301 // If we have a geom processor we must us a vertex shader and we should not have a geometry
265 // processor if we are doing path rendering. 302 // processor if we are doing path rendering.
266 SkASSERT(!GrGpu::IsPathRenderingDrawType(drawType) || !optState.requiresVert exShader()); 303 SkASSERT(!GrGpu::IsPathRenderingDrawType(drawType) || !optState.requiresVert exShader());
267 header->fRequiresVertexShader = optState.requiresVertexShader() || 304 header->fRequiresVertexShader = optState.requiresVertexShader() ||
268 !GrGpu::IsPathRenderingDrawType(drawType); 305 !GrGpu::IsPathRenderingDrawType(drawType);
269 header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType; 306 header->fEmitsPointSize = GrGpu::kDrawPoints_DrawType == drawType;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 kOne_GrBlendCoeff == srcCoeff && 411 kOne_GrBlendCoeff == srcCoeff &&
375 kZero_GrBlendCoeff == dstCoeff) { 412 kZero_GrBlendCoeff == dstCoeff) {
376 header->fCoverageOutput = kCombineWithDst_CoverageOutput; 413 header->fCoverageOutput = kCombineWithDst_CoverageOutput;
377 separateCoverageFromColor = true; 414 separateCoverageFromColor = true;
378 } 415 }
379 } 416 }
380 417
381 for (int s = 0; s < optState.numColorStages(); ++s) { 418 for (int s = 0; s < optState.numColorStages(); ++s) {
382 colorStages->push_back(&optState.getColorStage(s)); 419 colorStages->push_back(&optState.getColorStage(s));
383 } 420 }
384 SkTArray<const GrEffectStage*, true>* array; 421 SkTArray<const GrFragmentStage*, true>* array;
385 if (separateCoverageFromColor) { 422 if (separateCoverageFromColor) {
386 array = coverageStages; 423 array = coverageStages;
387 } else { 424 } else {
388 array = colorStages; 425 array = colorStages;
389 } 426 }
390 for (int s = 0; s < optState.numCoverageStages(); ++s) { 427 for (int s = 0; s < optState.numCoverageStages(); ++s) {
391 array->push_back(&optState.getCoverageStage(s)); 428 array->push_back(&optState.getCoverageStage(s));
392 } 429 }
393 430
394 header->fColorEffectCnt = colorStages->count(); 431 header->fColorEffectCnt = colorStages->count();
(...skipping 12 matching lines...) Expand all
407 *checksum = 0; 444 *checksum = 0;
408 *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), k eyLength); 445 *checksum = SkChecksum::Compute(reinterpret_cast<uint32_t*>(fKey.begin()), k eyLength);
409 } 446 }
410 447
411 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) { 448 GrGLProgramDesc& GrGLProgramDesc::operator= (const GrGLProgramDesc& other) {
412 size_t keyLength = other.keyLength(); 449 size_t keyLength = other.keyLength();
413 fKey.reset(keyLength); 450 fKey.reset(keyLength);
414 memcpy(fKey.begin(), other.fKey.begin(), keyLength); 451 memcpy(fKey.begin(), other.fKey.begin(), keyLength);
415 return *this; 452 return *this;
416 } 453 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698