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

Unified Diff: src/gpu/GrDrawState.cpp

Issue 815553003: Move ViewMatrix off of drawstate (Closed) Base URL: https://skia.googlesource.com/skia.git@remove-fragment-stage
Patch Set: more cleaning 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/GrDrawState.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawState.cpp
diff --git a/src/gpu/GrDrawState.cpp b/src/gpu/GrDrawState.cpp
index 6694100cc21dae3ab6cd6ad62e76a76cd13fc81b..36042e19ab21fb1b224406481ee41635ffdecc02 100644
--- a/src/gpu/GrDrawState.cpp
+++ b/src/gpu/GrDrawState.cpp
@@ -18,7 +18,6 @@ bool GrDrawState::isEqual(const GrDrawState& that, bool explicitLocalCoords) con
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 @@ bool GrDrawState::isEqual(const GrDrawState& that, bool explicitLocalCoords) con
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 @@ GrDrawState& GrDrawState::operator=(const GrDrawState& that) {
return *this;
}
-void GrDrawState::onReset(const SkMatrix* initialViewMatrix) {
+void GrDrawState::onReset() {
SkASSERT(0 == fBlockEffectRemovalCnt || 0 == this->numFragmentStages());
fRenderTarget.reset(NULL);
@@ -78,11 +76,6 @@ void GrDrawState::onReset(const SkMatrix* initialViewMatrix) {
fColorStages.reset();
fCoverageStages.reset();
- if (NULL == initialViewMatrix) {
- fViewMatrix.reset();
- } else {
- fViewMatrix = *initialViewMatrix;
- }
fFlagBits = 0x0;
fStencilSettings.setDisabled();
fDrawFace = kBoth_DrawFace;
@@ -97,7 +90,7 @@ void GrDrawState::onReset(const SkMatrix* initialViewMatrix) {
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 @@ void GrDrawState::setFromPaint(const GrPaint& paint, const SkMatrix& vm, GrRende
this->setRenderTarget(rt);
- fViewMatrix = vm;
-
// These have no equivalent in GrPaint, set them to defaults
fDrawFace = kBoth_DrawFace;
fStencilSettings.setDisabled();
« no previous file with comments | « src/gpu/GrDrawState.h ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698