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

Unified Diff: src/core/SkBitmapProcState.cpp

Issue 1611183002: remove dead code around SK_SUPPORT_LEGACY_TRANSLATEROUNDHACK (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 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 | no next file » | 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 2c4f14506cea20787bf594ba1acde0b3a72dd78b..3c3f3a54b79de82b297bd5158a11b88a7f17a484 100644
--- a/src/core/SkBitmapProcState.cpp
+++ b/src/core/SkBitmapProcState.cpp
@@ -136,11 +136,9 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
const int origW = fProvider.info().width();
const int origH = fProvider.info().height();
bool allow_ignore_fractional_translate = true; // historical default
-#ifndef SK_SUPPORT_LEGACY_TRANSLATEROUNDHACK
if (kMedium_SkFilterQuality == fFilterLevel) {
allow_ignore_fractional_translate = false;
}
-#endif
SkDefaultBitmapController controller;
fBMState = controller.requestBitmap(fProvider, inv, paint.getFilterQuality(),
@@ -183,13 +181,7 @@ bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) {
if ((clampClamp && allow_ignore_fractional_translate)
? just_trans_clamp(forward, fPixmap)
: just_trans_general(forward)) {
-#ifdef SK_SUPPORT_LEGACY_TRANSLATEROUNDHACK
- SkScalar tx = -SkScalarRoundToScalar(forward.getTranslateX());
- SkScalar ty = -SkScalarRoundToScalar(forward.getTranslateY());
- fInvMatrix.setTranslate(tx, ty);
-#else
fInvMatrix.setTranslate(-forward.getTranslateX(), -forward.getTranslateY());
-#endif
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698