Move ViewMatrix off of drawstate
BUG=skia:
Review URL: https://codereview.chromium.org/815553003
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 6694100..36042e1 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -18,7 +18,6 @@
if (this->getRenderTarget() != that.getRenderTarget() ||
this->fColorStages.count() != that.fColorStages.count() ||
this->fCoverageStages.count() != that.fCoverageStages.count() ||
- !this->fViewMatrix.cheapEqualTo(that.fViewMatrix) ||
this->fFlagBits != that.fFlagBits ||
this->fStencilSettings != that.fStencilSettings ||
this->fDrawFace != that.fDrawFace) {
@@ -47,7 +46,6 @@
GrDrawState& GrDrawState::operator=(const GrDrawState& that) {
fRenderTarget.reset(SkSafeRef(that.fRenderTarget.get()));
- fViewMatrix = that.fViewMatrix;
fFlagBits = that.fFlagBits;
fStencilSettings = that.fStencilSettings;
fDrawFace = that.fDrawFace;
@@ -70,7 +68,7 @@
return *this;
}
-void GrDrawState::onReset(const SkMatrix* initialViewMatrix) {
+void GrDrawState::onReset() {
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numFragmentStages());
fRenderTarget.reset(NULL);
@@ -78,11 +76,6 @@
fColorStages.reset();
fCoverageStages.reset();
- if (NULL == initialViewMatrix) {
- fViewMatrix.reset();
- } else {
- fViewMatrix = *initialViewMatrix;
- }
fFlagBits = 0x0;
fStencilSettings.setDisabled();
fDrawFace = kBoth_DrawFace;
@@ -97,7 +90,7 @@
fCoveragePrimProc = NULL;
}
-void GrDrawState::setFromPaint(const GrPaint& paint, const SkMatrix& vm, GrRenderTarget* rt) {
+void GrDrawState::setFromPaint(const GrPaint& paint, GrRenderTarget* rt) {
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numFragmentStages());
fColorStages.reset();
@@ -115,8 +108,6 @@
this->setRenderTarget(rt);
- fViewMatrix = vm;
-
// These have no equivalent in GrPaint, set them to defaults
fDrawFace = kBoth_DrawFace;
fStencilSettings.setDisabled();