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

Unified Diff: src/gpu/GrOptDrawState.cpp

Issue 742763002: scissor state on optstate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 years, 1 month 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/GrOptDrawState.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrOptDrawState.cpp
diff --git a/src/gpu/GrOptDrawState.cpp b/src/gpu/GrOptDrawState.cpp
index 4b20fa901c79628bd4456226af61125fec7b5fbe..2435e5fc33514ebfe321373249e061202304f2db 100644
--- a/src/gpu/GrOptDrawState.cpp
+++ b/src/gpu/GrOptDrawState.cpp
@@ -18,9 +18,11 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
GrBlendCoeff optSrcCoeff,
GrBlendCoeff optDstCoeff,
GrGpu* gpu,
+ const ScissorState& scissorState,
const GrDeviceCoordTexture* dstCopy,
GrGpu::DrawType drawType)
: fRenderTarget(drawState.fRenderTarget.get()) {
+ fScissorState = scissorState;
fViewMatrix = drawState.getViewMatrix();
fBlendConstant = drawState.getBlendConstant();
fFlagBits = drawState.getFlagBits();
@@ -91,6 +93,7 @@ GrOptDrawState::GrOptDrawState(const GrDrawState& drawState,
GrOptDrawState* GrOptDrawState::Create(const GrDrawState& drawState,
GrGpu* gpu,
+ const ScissorState& scissorState,
const GrDeviceCoordTexture* dstCopy,
GrGpu::DrawType drawType) {
GrBlendCoeff srcCoeff;
@@ -109,7 +112,7 @@ GrOptDrawState* GrOptDrawState::Create(const GrDrawState& drawState,
}
return SkNEW_ARGS(GrOptDrawState, (drawState, blendFlags, srcCoeff,
- dstCoeff, gpu, dstCopy, drawType));
+ dstCoeff, gpu, scissorState, dstCopy, drawType));
}
void GrOptDrawState::setOutputStateInfo(const GrDrawState& ds,
@@ -261,6 +264,7 @@ bool GrOptDrawState::operator== (const GrOptDrawState& that) const {
}
if (this->getRenderTarget() != that.getRenderTarget() ||
+ this->fScissorState != that.fScissorState ||
!this->fViewMatrix.cheapEqualTo(that.fViewMatrix) ||
this->fSrcBlend != that.fSrcBlend ||
this->fDstBlend != that.fDstBlend ||
« no previous file with comments | « src/gpu/GrOptDrawState.h ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698