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

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

Issue 776243005: Revert of move program descriptor generation to flush (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/gpu/gl/GrGLProgram.h ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index 3b04edb8c8802f77342a97eccc31211040b26574..63cb9da20b489c7e47fb18f0d6cb66d93bb622a7 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -123,13 +123,13 @@
///////////////////////////////////////////////////////////////////////////////
-void GrGLProgram::setData(const GrOptDrawState& optState) {
+void GrGLProgram::setData(const GrOptDrawState& optState, GrGpu::DrawType drawType) {
GrColor color = optState.getColor();
uint8_t coverage = optState.getCoverage();
this->setColor(optState, color);
this->setCoverage(optState, coverage);
- this->setMatrixAndRenderTargetHeight(optState);
+ this->setMatrixAndRenderTargetHeight(drawType, optState);
const GrDeviceCoordTexture* dstCopy = optState.getDstCopy();
if (dstCopy) {
@@ -164,7 +164,7 @@
this->setFragmentData(optState);
// Some of GrGLProgram subclasses need to update state here
- this->didSetData(optState.drawType());
+ this->didSetData(drawType);
}
void GrGLProgram::setFragmentData(const GrOptDrawState& optState) {
@@ -241,7 +241,8 @@
}
}
-void GrGLProgram::setMatrixAndRenderTargetHeight(const GrOptDrawState& optState) {
+void GrGLProgram::setMatrixAndRenderTargetHeight(GrGpu::DrawType drawType,
+ const GrOptDrawState& optState) {
// Load the RT height uniform if it is needed to y-flip gl_FragCoord.
if (fBuiltinUniformHandles.fRTHeightUni.isValid() &&
fMatrixState.fRenderTargetSize.fHeight != optState.getRenderTarget()->height()) {
@@ -250,10 +251,11 @@
}
// call subclasses to set the actual view matrix
- this->onSetMatrixAndRenderTargetHeight(optState);
-}
-
-void GrGLProgram::onSetMatrixAndRenderTargetHeight(const GrOptDrawState& optState) {
+ this->onSetMatrixAndRenderTargetHeight(drawType, optState);
+}
+
+void GrGLProgram::onSetMatrixAndRenderTargetHeight(GrGpu::DrawType drawType,
+ const GrOptDrawState& optState) {
const GrRenderTarget* rt = optState.getRenderTarget();
SkISize size;
size.set(rt->width(), rt->height());
@@ -287,8 +289,9 @@
: INHERITED(gpu, desc, builtinUniforms, programID, uniforms, NULL, fragmentProcessors) {
}
-void GrGLNvprProgramBase::onSetMatrixAndRenderTargetHeight(const GrOptDrawState& optState) {
- SkASSERT(GrGpu::IsPathRenderingDrawType(optState.drawType()));
+void GrGLNvprProgramBase::onSetMatrixAndRenderTargetHeight(GrGpu::DrawType drawType,
+ const GrOptDrawState& optState) {
+ SkASSERT(GrGpu::IsPathRenderingDrawType(drawType));
const GrRenderTarget* rt = optState.getRenderTarget();
SkISize size;
size.set(rt->width(), rt->height());
« no previous file with comments | « src/gpu/gl/GrGLProgram.h ('k') | src/gpu/gl/GrGLProgramDesc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698