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

Unified Diff: src/gpu/gl/builders/GrGLProgramBuilder.cpp

Issue 739673002: Create GrOptDrawState before recording draw in GrInOrderDrawBuffer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove unused function in pendingprogramelement Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/builders/GrGLProgramBuilder.cpp
diff --git a/src/gpu/gl/builders/GrGLProgramBuilder.cpp b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
index f628db9289fe44bb8641d5b5163ae5914c6c7196..e56a83d2f1edf6562c58ea986bd66e10b1c2eebe 100644
--- a/src/gpu/gl/builders/GrGLProgramBuilder.cpp
+++ b/src/gpu/gl/builders/GrGLProgramBuilder.cpp
@@ -266,8 +266,8 @@ void GrGLProgramBuilder::emitAndInstallFragProcs(int procOffset, int numProcs, G
GrGLProgramDescBuilder::kProcessorKeyOffsetsAndLengthOffset);
for (int e = procOffset; e < numProcs; ++e) {
GrGLSLExpr4 output;
- const GrFragmentStage& stage = fOptState.getFragmentStage(e);
- this->emitAndInstallProc<GrFragmentStage>(stage, e, keyProvider, *inOut, &output);
+ const GrPendingFragmentStage& stage = fOptState.getFragmentStage(e);
+ this->emitAndInstallProc<GrPendingFragmentStage>(stage, e, keyProvider, *inOut, &output);
*inOut = output;
}
}
@@ -305,7 +305,7 @@ void GrGLProgramBuilder::emitAndInstallProc(const Proc& proc,
fFS.codeAppend("}");
}
-void GrGLProgramBuilder::emitAndInstallProc(const GrFragmentStage& fs,
+void GrGLProgramBuilder::emitAndInstallProc(const GrPendingFragmentStage& fs,
const GrProcessorKey& key,
const char* outColor,
const char* inColor) {
@@ -358,20 +358,17 @@ void GrGLProgramBuilder::verify(const GrFragmentProcessor& fp) {
SkASSERT(fFS.hasReadDstColor() == fp.willReadDstColor());
}
-void GrGLProgramBuilder::emitTransforms(const GrFragmentStage& effectStage,
+void GrGLProgramBuilder::emitTransforms(const GrPendingFragmentStage& stage,
GrGLProcessor::TransformedCoordsArray* outCoords,
GrGLInstalledFragProc* ifp) {
- const GrFragmentProcessor* effect = effectStage.getProcessor();
- int numTransforms = effect->numTransforms();
+ const GrFragmentProcessor* processor = stage.getProcessor();
+ int numTransforms = processor->numTransforms();
ifp->fTransforms.push_back_n(numTransforms);
for (int t = 0; t < numTransforms; t++) {
const char* uniName = "StageMatrix";
- GrSLType varyingType =
- effectStage.isPerspectiveCoordTransform(t, fVS.hasLocalCoords()) ?
- kVec3f_GrSLType :
- kVec2f_GrSLType;
-
+ GrSLType varyingType = stage.isPerspectiveCoordTransform(t) ? kVec3f_GrSLType :
+ kVec2f_GrSLType;
SkString suffixedUniName;
if (0 != t) {
suffixedUniName.append(uniName);
@@ -390,7 +387,7 @@ void GrGLProgramBuilder::emitTransforms(const GrFragmentStage& effectStage,
suffixedVaryingName.appendf("_%i", t);
varyingName = suffixedVaryingName.c_str();
}
- const char* coords = kPosition_GrCoordSet == effect->coordTransform(t).sourceCoords() ?
+ const char* coords = kPosition_GrCoordSet == processor->coordTransform(t).sourceCoords() ?
fVS.positionAttribute().c_str() :
fVS.localCoordsAttribute().c_str();
GrGLVertToFrag v(varyingType);
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698