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

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

Issue 827973002: ViewMatrix uniform upload moved to GeometryProcessor (Closed) Base URL: https://skia.googlesource.com/skia.git@vm-on-gp
Patch Set: more cleanup Created 6 years 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
Index: src/gpu/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 60d97a296976985ff5149a2d01dffbca2df7a85e..9820b2592b7c587a908472d96e31f65387f978b7 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -222,18 +222,10 @@ void GrGLProgram::onSetMatrixAndRenderTargetHeight(const GrOptDrawState& optStat
SkISize size;
size.set(rt->width(), rt->height());
if (fMatrixState.fRenderTargetOrigin != rt->origin() ||
- fMatrixState.fRenderTargetSize != size ||
- !fMatrixState.fViewMatrix.cheapEqualTo(optState.getViewMatrix())) {
- SkASSERT(fBuiltinUniformHandles.fViewMatrixUni.isValid());
-
- fMatrixState.fViewMatrix = optState.getViewMatrix();
+ fMatrixState.fRenderTargetSize != size) {
fMatrixState.fRenderTargetSize = size;
fMatrixState.fRenderTargetOrigin = rt->origin();
- GrGLfloat viewMatrix[3 * 3];
- fMatrixState.getGLMatrix<3>(viewMatrix);
- fProgramDataManager.setMatrix3f(fBuiltinUniformHandles.fViewMatrixUni, viewMatrix);
-
GrGLfloat rtAdjustmentVec[4];
fMatrixState.getRTAdjustmentVec(rtAdjustmentVec);
fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, rtAdjustmentVec);
@@ -259,7 +251,8 @@ void GrGLNvprProgramBase::onSetMatrixAndRenderTargetHeight(const GrOptDrawState&
const GrRenderTarget* rt = optState.getRenderTarget();
SkISize size;
size.set(rt->width(), rt->height());
- fGpu->glPathRendering()->setProjectionMatrix(optState.getViewMatrix(), size, rt->origin());
+ fGpu->glPathRendering()->setProjectionMatrix(optState.getPrimitiveProcessor()->viewMatrix(),
+ size, rt->origin());
}
/////////////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698