diff options
author | 2014-12-30 09:04:15 -0800 | |
---|---|---|
committer | 2014-12-30 09:04:16 -0800 | |
commit | ee2af95db72152dfa61c841875df0594ca93437d (patch) | |
tree | 21f811f95923d1c916e57d1742c2dc4751d067fd /src/gpu/GrDefaultGeoProcFactory.cpp | |
parent | 78aea9f75248dbfeac8d653fbd0bc37d568ec2f2 (diff) |
ViewMatrix uniform upload moved to GeometryProcessor
BUG=skia:
Review URL: https://codereview.chromium.org/827973002
Diffstat (limited to 'src/gpu/GrDefaultGeoProcFactory.cpp')
-rw-r--r-- | src/gpu/GrDefaultGeoProcFactory.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gpu/GrDefaultGeoProcFactory.cpp b/src/gpu/GrDefaultGeoProcFactory.cpp index 2c5117be9b..b64c456b5f 100644 --- a/src/gpu/GrDefaultGeoProcFactory.cpp +++ b/src/gpu/GrDefaultGeoProcFactory.cpp @@ -103,8 +103,11 @@ public: vs->codeAppendf("%s = %s;", vs->localCoords(), gp.inPosition()->fName); } + // setup uniform viewMatrix + this->addUniformViewMatrix(pb); + // setup position varying - vs->codeAppendf("%s = %s * vec3(%s, 1);", vs->glPosition(), vs->uViewM(), + vs->codeAppendf("%s = %s * vec3(%s, 1);", vs->glPosition(), this->uViewM(), gp.inPosition()->fName); // Setup coverage as pass through @@ -141,6 +144,8 @@ public: virtual void setData(const GrGLProgramDataManager& pdman, const GrPrimitiveProcessor& gp, const GrBatchTracker& bt) SK_OVERRIDE { + this->setUniformViewMatrix(pdman, gp.viewMatrix()); + const BatchTracker& local = bt.cast<BatchTracker>(); if (kUniform_GrGPInput == local.fInputColorType && local.fColor != fColor) { GrGLfloat c[4]; |