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

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

Issue 1336763003: remove path specific program building classes (Closed) Base URL: https://skia.googlesource.com/skia.git@pathgp
Patch Set: a few more tidys Created 5 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
« no previous file with comments | « src/gpu/gl/GrGLPathProgramDataManager.h ('k') | src/gpu/gl/GrGLPrimitiveProcessor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/GrGLPathProgramDataManager.h"
9 #include "gl/GrGLPathRendering.h"
10 #include "gl/GrGLGpu.h"
11 #include "SkMatrix.h"
12
13 GrGLPathProgramDataManager::GrGLPathProgramDataManager(
14 GrGLGpu* gpu, GrGLuint programID, const SeparableVaryingInfoArray& separable Varyings)
15 : fGpu(gpu)
16 , fProgramID(programID) {
17 int count = separableVaryings.count();
18 fSeparableVaryings.push_back_n(count);
19 for (int i = 0; i < count; i++) {
20 SeparableVarying& separableVarying = fSeparableVaryings[i];
21 const SeparableVaryingInfo& builderSeparableVarying = separableVaryings[ i];
22 SkASSERT(GrGLShaderVar::kNonArray == builderSeparableVarying.fVariable.g etArrayCount() ||
23 builderSeparableVarying.fVariable.getArrayCount() > 0);
24 SkDEBUGCODE(
25 separableVarying.fArrayCount = builderSeparableVarying.fVariable.get ArrayCount();
26 separableVarying.fType = builderSeparableVarying.fVariable.getType() ;
27 );
28 separableVarying.fLocation = builderSeparableVarying.fLocation;
29 }
30 }
31
32 void GrGLPathProgramDataManager::setPathFragmentInputTransform(SeparableVaryingH andle u,
33 int components,
34 const SkMatrix& m atrix) const {
35 const SeparableVarying& fragmentInput = fSeparableVaryings[u.toIndex()];
36
37 SkASSERT((components == 2 && fragmentInput.fType == kVec2f_GrSLType) ||
38 (components == 3 && fragmentInput.fType == kVec3f_GrSLType));
39
40 fGpu->glPathRendering()->setProgramPathFragmentInputTransform(fProgramID,
41 fragmentInput. fLocation,
42 GR_GL_OBJECT_L INEAR,
43 components,
44 matrix);
45 }
46
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathProgramDataManager.h ('k') | src/gpu/gl/GrGLPrimitiveProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698