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

Side by Side Diff: src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.cpp

Issue 576543005: Breaking out full program and frag only (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
(Empty)
1 /*
2 * Copyright 2014 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #include "GrGLFragmentOnlyProgramBuilder.h"
9 #include "../GrGpuGL.h"
10
11 GrGLFragmentOnlyProgramBuilder::GrGLFragmentOnlyProgramBuilder(GrGpuGL* gpu,
12 const GrGLProgram Desc& desc)
13 : INHERITED(gpu, desc) {
14 SkASSERT(!desc.getHeader().fRequiresVertexShader);
15 SkASSERT(gpu->glCaps().pathRenderingSupport());
16 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorIn put);
17 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverag eInput);
18 }
19
20 int GrGLFragmentOnlyProgramBuilder::addTexCoordSets(int count) {
21 int firstFreeCoordSet = fTexCoordSetCnt;
22 fTexCoordSetCnt += count;
23 SkASSERT(gpu()->glCaps().maxFixedFunctionTextureCoords() >= fTexCoordSetCnt) ;
24 return firstFreeCoordSet;
25 }
26
27 GrGLProgramEffects* GrGLFragmentOnlyProgramBuilder::createAndEmitEffects(
28 const GrEffectStage* effectStages[], int effectCnt,
29 const GrGLProgramDesc::EffectKeyProvider& keyProvider, GrGLSLExpr4* inOu tFSColor) {
30
31 GrGLPathTexGenProgramEffectsBuilder pathTexGenEffectsBuilder(this,
32 effectCnt);
33 this->INHERITED::createAndEmitEffects(&pathTexGenEffectsBuilder,
34 effectStages,
35 effectCnt,
36 keyProvider,
37 inOutFSColor);
38 return pathTexGenEffectsBuilder.finish();
39 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLFullProgramBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698