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

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: 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
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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 GrBlendCoeff srcCoeff = optState->getSrcBlendCoeff(); 221 GrBlendCoeff srcCoeff = optState->getSrcBlendCoeff();
222 GrBlendCoeff dstCoeff = optState->getDstBlendCoeff(); 222 GrBlendCoeff dstCoeff = optState->getDstBlendCoeff();
223 223
224 // In these blend coeff's we end up drawing nothing so we can skip draw all together 224 // In these blend coeff's we end up drawing nothing so we can skip draw all together
225 if (kZero_GrBlendCoeff == srcCoeff && kOne_GrBlendCoeff == dstCoeff && 225 if (kZero_GrBlendCoeff == srcCoeff && kOne_GrBlendCoeff == dstCoeff &&
226 !optState->getStencil().doesWrite()) { 226 !optState->getStencil().doesWrite()) {
227 return false; 227 return false;
228 } 228 }
229 229
230 const GrGeometryStage* geometryProcessor = NULL; 230 const GrGeometryStage* geometryProcessor = NULL;
egdaniel 2014/10/06 14:19:02 extra spaces?
231 SkSTArray<8, const GrFragmentStage*, true> colorStages; 231 SkSTArray<8, const GrFragmentStage*, true> colorStages;
232 SkSTArray<8, const GrFragmentStage*, true> coverageStages; 232 SkSTArray<8, const GrFragmentStage*, true> coverageStages;
233 GrGLProgramDesc desc; 233 GrGLProgramDesc desc;
234 if (!GrGLProgramDesc::Build(*optState.get(), 234 if (!GrGLProgramDesc::Build(*optState.get(),
235 type, 235 type,
236 srcCoeff, 236 srcCoeff,
237 dstCoeff, 237 dstCoeff,
238 this, 238 this,
239 dstCopy, 239 dstCopy,
240 &geometryProcessor, 240 &geometryProcessor,
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 GrGLAttribTypeToLayout(attribType).fCount, 362 GrGLAttribTypeToLayout(attribType).fCount,
363 GrGLAttribTypeToLayout(attribType).fType, 363 GrGLAttribTypeToLayout(attribType).fType,
364 GrGLAttribTypeToLayout(attribType).fNormalized, 364 GrGLAttribTypeToLayout(attribType).fNormalized,
365 stride, 365 stride,
366 reinterpret_cast<GrGLvoid*>( 366 reinterpret_cast<GrGLvoid*>(
367 vertexOffsetInBytes + vertexAttrib->fOffset)); 367 vertexOffsetInBytes + vertexAttrib->fOffset));
368 } 368 }
369 attribState->disableUnusedArrays(this, usedAttribArraysMask); 369 attribState->disableUnusedArrays(this, usedAttribArraysMask);
370 } 370 }
371 } 371 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698