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

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

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

Powered by Google App Engine
This is Rietveld 408576698