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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 249643002: Revert of Extract most of the mutable state of SkShader into a separate Context object. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 8 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
« no previous file with comments | « src/core/SkBitmapProcState.h ('k') | src/core/SkBlitter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState.cpp
diff --git a/src/core/SkBitmapProcState.cpp b/src/core/SkBitmapProcState.cpp
index eecfbbcc483c67e42e99c3dfd85bd8b9e2855b7b..be87d832fdb3fbc30b593a960f0212b714e6ca58 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -360,6 +360,17 @@
return true;
}
+void SkBitmapProcState::endContext() {
+ SkDELETE(fBitmapFilter);
+ fBitmapFilter = NULL;
+ fScaledBitmap.reset();
+
+ if (fScaledCacheID) {
+ SkScaledImageCache::Unlock(fScaledCacheID);
+ fScaledCacheID = NULL;
+ }
+}
+
SkBitmapProcState::~SkBitmapProcState() {
if (fScaledCacheID) {
SkScaledImageCache::Unlock(fScaledCacheID);
@@ -388,7 +399,6 @@
}
// The above logic should have always assigned fBitmap, but in case it
// didn't, we check for that now...
- // TODO(dominikg): Ask humper@ if we can just use an SkASSERT(fBitmap)?
if (NULL == fBitmap) {
return false;
}
@@ -477,7 +487,6 @@
// shader will perform.
fMatrixProc = this->chooseMatrixProc(trivialMatrix);
- // TODO(dominikg): SkASSERT(fMatrixProc) instead? chooseMatrixProc never returns NULL.
if (NULL == fMatrixProc) {
return false;
}
@@ -519,7 +528,6 @@
fPaintPMColor = SkPreMultiplyColor(paint.getColor());
break;
default:
- // TODO(dominikg): Should we ever get here? SkASSERT(false) instead?
return false;
}
« no previous file with comments | « src/core/SkBitmapProcState.h ('k') | src/core/SkBlitter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698