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

Unified Diff: src/gpu/gl/GrGLPathProcessor.cpp

Issue 1110553003: Remove legacy NVPR support (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comments Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/GrGLPathProcessor.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLPathProcessor.cpp
diff --git a/src/gpu/gl/GrGLPathProcessor.cpp b/src/gpu/gl/GrGLPathProcessor.cpp
index 3f3e5d9be79cac0386c8f702aa1f8e457b31c5ff..75bd0d631cc35bc2b86dd4792bf48525172e165a 100644
--- a/src/gpu/gl/GrGLPathProcessor.cpp
+++ b/src/gpu/gl/GrGLPathProcessor.cpp
@@ -59,59 +59,8 @@ void GrGLPathProcessor::setData(const GrGLProgramDataManager& pdman,
}
}
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-void GrGLLegacyPathProcessor::emitTransforms(GrGLGPBuilder*, const TransformsIn& tin,
- TransformsOut* tout) {
- tout->push_back_n(tin.count());
- fInstalledTransforms.push_back_n(tin.count());
- for (int i = 0; i < tin.count(); i++) {
- const ProcCoords& coordTransforms = tin[i];
- int texCoordIndex = this->addTexCoordSets(coordTransforms.count());
-
- // Use the first uniform location as the texcoord index.
- fInstalledTransforms[i].push_back_n(1);
- fInstalledTransforms[i][0].fHandle = ShaderVarHandle(texCoordIndex);
-
- SkString name;
- for (int t = 0; t < coordTransforms.count(); ++t) {
- GrSLType type = coordTransforms[t]->getMatrix().hasPerspective() ? kVec3f_GrSLType :
- kVec2f_GrSLType;
-
- name.printf("%s(gl_TexCoord[%i])", GrGLSLTypeString(type), texCoordIndex++);
- SkNEW_APPEND_TO_TARRAY(&(*tout)[i], GrGLProcessor::TransformedCoords, (name, type));
- }
- }
-}
-
-void GrGLLegacyPathProcessor::setTransformData(
- const GrPrimitiveProcessor& primProc,
- int index,
- const SkTArray<const GrCoordTransform*, true>& transforms,
- GrGLPathRendering* glpr,
- GrGLuint) {
- // We've hidden the texcoord index in the first entry of the transforms array for each
- // effect
- int texCoordIndex = fInstalledTransforms[index][0].fHandle.handle();
- for (int t = 0; t < transforms.count(); ++t) {
- const SkMatrix& transform = GetTransformMatrix(primProc.localMatrix(), *transforms[t]);
- GrGLPathRendering::PathTexGenComponents components =
- GrGLPathRendering::kST_PathTexGenComponents;
- if (transform.hasPerspective()) {
- components = GrGLPathRendering::kSTR_PathTexGenComponents;
- }
- glpr->enablePathTexGen(texCoordIndex++, components, transform);
- }
-}
-
-void GrGLLegacyPathProcessor::didSetData(GrGLPathRendering* glpr) {
- glpr->flushPathTexGenSettings(fTexCoordSetCnt);
-}
-
-///////////////////////////////////////////////////////////////////////////////////////////////////
-
-void GrGLNormalPathProcessor::emitTransforms(GrGLGPBuilder* pb, const TransformsIn& tin,
- TransformsOut* tout) {
+void GrGLPathProcessor::emitTransforms(GrGLGPBuilder* pb, const TransformsIn& tin,
+ TransformsOut* tout) {
tout->push_back_n(tin.count());
fInstalledTransforms.push_back_n(tin.count());
for (int i = 0; i < tin.count(); i++) {
@@ -140,7 +89,7 @@ void GrGLNormalPathProcessor::emitTransforms(GrGLGPBuilder* pb, const Transforms
}
}
-void GrGLNormalPathProcessor::resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {
+void GrGLPathProcessor::resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint programId) {
int count = fSeparableVaryingInfos.count();
for (int i = 0; i < count; ++i) {
GrGLint location;
@@ -153,7 +102,7 @@ void GrGLNormalPathProcessor::resolveSeparableVaryings(GrGLGpu* gpu, GrGLuint pr
}
}
-void GrGLNormalPathProcessor::setTransformData(
+void GrGLPathProcessor::setTransformData(
const GrPrimitiveProcessor& primProc,
int index,
const SkTArray<const GrCoordTransform*, true>& coordTransforms,
« no previous file with comments | « src/gpu/gl/GrGLPathProcessor.h ('k') | src/gpu/gl/GrGLPathRendering.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698