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

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

Issue 628633003: gl programs rewrite (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: build fix Created 6 years, 2 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 | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | tests/GLProgramsTest.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 2011 Google Inc. 2 * Copyright 2011 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 "GrGpuGL.h" 8 #include "GrGpuGL.h"
9 9
10 #include "builders/GrGLProgramBuilder.h" 10 #include "builders/GrGLProgramBuilder.h"
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if (kZero_GrBlendCoeff == srcCoeff && kOne_GrBlendCoeff == dstCoeff && 235 if (kZero_GrBlendCoeff == srcCoeff && kOne_GrBlendCoeff == dstCoeff &&
236 !optState->getStencil().doesWrite()) { 236 !optState->getStencil().doesWrite()) {
237 return false; 237 return false;
238 } 238 }
239 239
240 const GrGeometryStage* geometryProcessor = NULL; 240 const GrGeometryStage* geometryProcessor = NULL;
241 SkSTArray<8, const GrFragmentStage*, true> colorStages; 241 SkSTArray<8, const GrFragmentStage*, true> colorStages;
242 SkSTArray<8, const GrFragmentStage*, true> coverageStages; 242 SkSTArray<8, const GrFragmentStage*, true> coverageStages;
243 GrGLProgramDesc desc; 243 GrGLProgramDesc desc;
244 if (!GrGLProgramDesc::Build(*optState.get(), 244 if (!GrGLProgramDesc::Build(*optState.get(),
245 type, 245 type,
246 srcCoeff, 246 srcCoeff,
247 dstCoeff, 247 dstCoeff,
248 this, 248 this,
249 dstCopy, 249 dstCopy,
250 &geometryProcessor, 250 &geometryProcessor,
251 &colorStages, 251 &colorStages,
252 &coverageStages, 252 &coverageStages,
253 &desc)) { 253 &desc)) {
254 SkDEBUGFAIL("Failed to generate GL program descriptor"); 254 SkDEBUGFAIL("Failed to generate GL program descriptor");
255 return false; 255 return false;
256 } 256 }
257 257
258 fCurrentProgram.reset(fProgramCache->getProgram(*optState.get(), 258 fCurrentProgram.reset(fProgramCache->getProgram(*optState.get(),
259 desc, 259 desc,
260 type, 260 type,
261 geometryProcessor, 261 geometryProcessor,
262 colorStages.begin(), 262 colorStages.begin(),
263 coverageStages.begin())) ; 263 coverageStages.begin())) ;
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 GrGLAttribTypeToLayout(attribType).fCount, 380 GrGLAttribTypeToLayout(attribType).fCount,
381 GrGLAttribTypeToLayout(attribType).fType, 381 GrGLAttribTypeToLayout(attribType).fType,
382 GrGLAttribTypeToLayout(attribType).fNormalized, 382 GrGLAttribTypeToLayout(attribType).fNormalized,
383 stride, 383 stride,
384 reinterpret_cast<GrGLvoid*>( 384 reinterpret_cast<GrGLvoid*>(
385 vertexOffsetInBytes + vertexAttrib->fOffset)); 385 vertexOffsetInBytes + vertexAttrib->fOffset));
386 } 386 }
387 attribState->disableUnusedArrays(this, usedAttribArraysMask); 387 attribState->disableUnusedArrays(this, usedAttribArraysMask);
388 } 388 }
389 } 389 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698