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

Unified Diff: src/gpu/GrGeometryProcessor.cpp

Issue 815643005: Move program descriptor and primitive processor off of optstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bug fix Created 5 years, 11 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/GrGeometryProcessor.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGeometryProcessor.cpp
diff --git a/src/gpu/GrGeometryProcessor.cpp b/src/gpu/GrGeometryProcessor.cpp
index 662f28f38694eaee2556a0eff6b15016b8569469..7214220ba29d0636b29ec02613cfd210361c9f94 100644
--- a/src/gpu/GrGeometryProcessor.cpp
+++ b/src/gpu/GrGeometryProcessor.cpp
@@ -241,7 +241,7 @@ void GrGLGeometryProcessor::emitTransforms(GrGLGPBuilder* pb,
void
-GrGLGeometryProcessor::setTransformData(const GrPrimitiveProcessor* primProc,
+GrGLGeometryProcessor::setTransformData(const GrPrimitiveProcessor& primProc,
const GrGLProgramDataManager& pdman,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms) {
@@ -249,7 +249,7 @@ GrGLGeometryProcessor::setTransformData(const GrPrimitiveProcessor* primProc,
int numTransforms = transforms.count();
for (int t = 0; t < numTransforms; ++t) {
SkASSERT(procTransforms[t].fHandle.isValid());
- const SkMatrix& transform = GetTransformMatrix(primProc->localMatrix(), *transforms[t]);
+ const SkMatrix& transform = GetTransformMatrix(primProc.localMatrix(), *transforms[t]);
if (!procTransforms[t].fCurrentValue.cheapEqualTo(transform)) {
pdman.setSkMatrix(procTransforms[t].fHandle.convertToUniformHandle(), transform);
procTransforms[t].fCurrentValue = transform;
@@ -377,7 +377,7 @@ public:
}
}
- void setTransformData(const GrPrimitiveProcessor* primProc,
+ void setTransformData(const GrPrimitiveProcessor& primProc,
int index,
const SkTArray<const GrCoordTransform*, true>& transforms,
GrGLPathRendering* glpr,
@@ -386,7 +386,7 @@ public:
// effect
int texCoordIndex = fInstalledTransforms[index][0].fHandle.handle();
for (int t = 0; t < transforms.count(); ++t) {
- const SkMatrix& transform = GetTransformMatrix(primProc->localMatrix(), *transforms[t]);
+ const SkMatrix& transform = GetTransformMatrix(primProc.localMatrix(), *transforms[t]);
GrGLPathRendering::PathTexGenComponents components =
GrGLPathRendering::kST_PathTexGenComponents;
if (transform.hasPerspective()) {
@@ -455,7 +455,7 @@ public:
}
}
- void setTransformData(const GrPrimitiveProcessor* primProc,
+ void setTransformData(const GrPrimitiveProcessor& primProc,
int index,
const SkTArray<const GrCoordTransform*, true>& coordTransforms,
GrGLPathRendering* glpr,
@@ -464,7 +464,7 @@ public:
int numTransforms = transforms.count();
for (int t = 0; t < numTransforms; ++t) {
SkASSERT(transforms[t].fHandle.isValid());
- const SkMatrix& transform = GetTransformMatrix(primProc->localMatrix(),
+ const SkMatrix& transform = GetTransformMatrix(primProc.localMatrix(),
*coordTransforms[t]);
if (transforms[t].fCurrentValue.cheapEqualTo(transform)) {
continue;
« no previous file with comments | « src/gpu/GrGeometryProcessor.h ('k') | src/gpu/GrGpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698