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

Side by Side Diff: src/gpu/gl/GrGLPathProcessor.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/GrGLPathProcessor.h ('k') | src/gpu/gl/GrGLPathProgram.h » ('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 2013 Google Inc. 2 * Copyright 2013 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 "GrGLPathProcessor.h" 8 #include "GrGLPathProcessor.h"
9 9
10 #include "GrPathProcessor.h" 10 #include "GrPathProcessor.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 fInstalledTransforms[i][t].fType = varyingType; 77 fInstalledTransforms[i][t].fType = varyingType;
78 78
79 SkNEW_APPEND_TO_TARRAY(&(*tout)[i], GrGLProcessor::TransformedCoords , 79 SkNEW_APPEND_TO_TARRAY(&(*tout)[i], GrGLProcessor::TransformedCoords ,
80 (SkString(v.fsIn()), varyingType)); 80 (SkString(v.fsIn()), varyingType));
81 } 81 }
82 } 82 }
83 } 83 }
84 84
85 void GrGLPathProcessor::setTransformData( 85 void GrGLPathProcessor::setTransformData(
86 const GrPrimitiveProcessor& primProc, 86 const GrPrimitiveProcessor& primProc,
87 const GrGLPathProgramDataManager& pdman, 87 const GrGLProgramDataManager& pdman,
88 int index, 88 int index,
89 const SkTArray<const GrCoordTransform*, true>& coordTransforms) { 89 const SkTArray<const GrCoordTransform*, true>& coordTransforms) {
90 const GrPathProcessor& pathProc = primProc.cast<GrPathProcessor>(); 90 const GrPathProcessor& pathProc = primProc.cast<GrPathProcessor>();
91 SkSTArray<2, Transform, true>& transforms = fInstalledTransforms[index]; 91 SkSTArray<2, Transform, true>& transforms = fInstalledTransforms[index];
92 int numTransforms = transforms.count(); 92 int numTransforms = transforms.count();
93 for (int t = 0; t < numTransforms; ++t) { 93 for (int t = 0; t < numTransforms; ++t) {
94 SkASSERT(transforms[t].fHandle.isValid()); 94 SkASSERT(transforms[t].fHandle.isValid());
95 const SkMatrix& transform = GetTransformMatrix(pathProc.localMatrix(), 95 const SkMatrix& transform = GetTransformMatrix(pathProc.localMatrix(),
96 *coordTransforms[t]); 96 *coordTransforms[t]);
97 if (transforms[t].fCurrentValue.cheapEqualTo(transform)) { 97 if (transforms[t].fCurrentValue.cheapEqualTo(transform)) {
98 continue; 98 continue;
99 } 99 }
100 transforms[t].fCurrentValue = transform; 100 transforms[t].fCurrentValue = transform;
101 101
102 SkASSERT(transforms[t].fType == kVec2f_GrSLType || 102 SkASSERT(transforms[t].fType == kVec2f_GrSLType ||
103 transforms[t].fType == kVec3f_GrSLType); 103 transforms[t].fType == kVec3f_GrSLType);
104 unsigned components = transforms[t].fType == kVec2f_GrSLType ? 2 : 3; 104 unsigned components = transforms[t].fType == kVec2f_GrSLType ? 2 : 3;
105 pdman.setPathFragmentInputTransform(transforms[t].fHandle, components, t ransform); 105 pdman.setPathFragmentInputTransform(transforms[t].fHandle, components, t ransform);
106 } 106 }
107 } 107 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLPathProcessor.h ('k') | src/gpu/gl/GrGLPathProgram.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698