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

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

Issue 864853002: remove drawType from optState (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: src/gpu/gl/GrGLProgram.cpp
diff --git a/src/gpu/gl/GrGLProgram.cpp b/src/gpu/gl/GrGLProgram.cpp
index bd36e598967170c9d88b865a0798806c1b807527..c9e6d393f6c512eff8c431891e25ba0b6281cb57 100644
--- a/src/gpu/gl/GrGLProgram.cpp
+++ b/src/gpu/gl/GrGLProgram.cpp
@@ -104,7 +104,7 @@ void GrGLProgram::bindTextures(const Proc* ip, const GrProcessor& processor) {
///////////////////////////////////////////////////////////////////////////////
void GrGLProgram::setData(const GrPrimitiveProcessor& primProc, const GrOptDrawState& optState,
- const GrBatchTracker& batchTracker) {
+ const GrBatchTracker& batchTracker, GrGpu::DrawType drawtype) {
this->setRenderTargetState(primProc, optState);
const GrDeviceCoordTexture* dstCopy = optState.getDstCopy();
@@ -142,7 +142,7 @@ void GrGLProgram::setData(const GrPrimitiveProcessor& primProc, const GrOptDrawS
this->setFragmentData(primProc, optState);
// Some of GrGLProgram subclasses need to update state here
- this->didSetData(optState.drawType());
+ this->didSetData(drawtype);
}
void GrGLProgram::setFragmentData(const GrPrimitiveProcessor& primProc,
@@ -234,8 +234,7 @@ void GrGLNvprProgram::setTransformData(const GrPrimitiveProcessor& primProc,
void GrGLNvprProgram::onSetRenderTargetState(const GrPrimitiveProcessor& primProc,
const GrOptDrawState& optState) {
- SkASSERT(GrGpu::IsPathRenderingDrawType(optState.drawType()) &&
- !primProc.willUseGeoShader() && primProc.numAttribs() == 0);
+ SkASSERT(!primProc.willUseGeoShader() && primProc.numAttribs() == 0);
const GrRenderTarget* rt = optState.getRenderTarget();
SkISize size;
size.set(rt->width(), rt->height());

Powered by Google App Engine
This is Rietveld 408576698