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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 857193003: remove legacy flags for old image filtering (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
« no previous file with comments | « no previous file | src/core/SkMipMap.cpp » ('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 208f9b153277bd94fe14cffbb52bda569d0cf5fd..b2c008326180b2f54a7a2875c8994e4329bf9222 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -482,30 +482,6 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
fInvMatrix = inv;
fFilterLevel = paint.getFilterLevel();
-#ifdef SK_SUPPORT_LEGACY_HQ_SCALING
- // possiblyScaleImage will look to see if it can rescale the image as a
- // preprocess; either by scaling up to the target size, or by selecting
- // a nearby mipmap level. If it does, it will adjust the working
- // matrix as well as the working bitmap. It may also adjust the filter
- // quality to avoid re-filtering an already perfectly scaled image.
- if (!this->possiblyScaleImage()) {
- if (!this->lockBaseBitmap()) {
- return false;
- }
- }
- // 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;
- }
-
- // If we are "still" kMedium_FilterLevel, then the request was not fulfilled by possiblyScale,
- // so we downgrade to kLow (so the rest of the sniffing code can assume that)
- if (SkPaint::kMedium_FilterLevel == fFilterLevel) {
- fFilterLevel = SkPaint::kLow_FilterLevel;
- }
-#else
if (SkPaint::kHigh_FilterLevel == fFilterLevel) {
this->processHQRequest();
}
@@ -522,7 +498,6 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
}
}
SkASSERT(fBitmap);
-#endif
bool trivialMatrix = (fInvMatrix.getType() & ~SkMatrix::kTranslate_Mask) == 0;
bool clampClamp = SkShader::kClamp_TileMode == fTileModeX &&
« no previous file with comments | « no previous file | src/core/SkMipMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698