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

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

Issue 1462123003: Create GrGLSLVaryingHandler class for program building (Closed) Base URL: https://skia.googlesource.com/skia.git@putCapsOnArgs
Patch Set: add files Created 5 years, 1 month 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 2015 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 "gl/GrGLVaryingHandler.h"
9
10 #include "gl/GrGLGpu.h"
11 #include "gl/builders/GrGLProgramBuilder.h"
12
13
14 GrGLSLVaryingHandler::SeparableVaryingHandle GrGLVaryingHandler::addSeparableVar ying(
15 const cha r* name,
16 GrGLSLVer tToFrag* v,
17 GrSLPreci sion fsPrecision) {
18 GrGLProgramBuilder* glPB = (GrGLProgramBuilder*) fProgramBuilder;
19 // This call is not used for non-NVPR backends.
20 SkASSERT(glPB->gpu()->glCaps().shaderCaps()->pathRenderingSupport() &&
21 glPB->fArgs.fPrimitiveProcessor->isPathRendering() &&
22 !glPB->fArgs.fPrimitiveProcessor->willUseGeoShader() &&
23 glPB->fArgs.fPrimitiveProcessor->numAttribs() == 0);
24 this->addVarying(name, v, fsPrecision);
25 SeparableVaryingInfo& varyingInfo = fSeparableVaryingInfos.push_back();
26 varyingInfo.fVariable = fFragInputs.back();
27 varyingInfo.fLocation = fSeparableVaryingInfos.count() - 1;
28 return SeparableVaryingHandle(varyingInfo.fLocation);
29 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698