From 7ea5cb18389db11a94175de95c9db2b44972630c Mon Sep 17 00:00:00 2001 From: benjaminwagner Date: Wed, 24 Feb 2016 06:51:52 -0800 Subject: Cleanups related to SkFixed. Remove SK_FixedNaN. It does not seem to be supported or used anywhere in Skia, Chromium, Android, or Google3, (except accidentally by TwoPtRadial::kDontDrawT). I think supporting it would erase any benefit of SkFixed over float. Remove SkBitmapFilter::lookup. It does not appear to be used anywhere in Skia, Chromium, Android, or Google3. Fix a bug in SkPaint::breakText that limited it to ~5kB of text. Now it can handle more than 1GB. BUG=skia:4632 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1683743005 Review URL: https://codereview.chromium.org/1683743005 --- src/core/SkBitmapFilter.h | 12 ------------ 1 file changed, 12 deletions(-) (limited to 'src/core/SkBitmapFilter.h') diff --git a/src/core/SkBitmapFilter.h b/src/core/SkBitmapFilter.h index 6fa8edde34..ca3e0930f2 100644 --- a/src/core/SkBitmapFilter.h +++ b/src/core/SkBitmapFilter.h @@ -28,15 +28,6 @@ public: } virtual ~SkBitmapFilter() {} - SkFixed lookup(float x) const { - if (!fPrecomputed) { - precomputeTable(); - } - int filter_idx = int(sk_float_abs(x * fLookupMultiplier)); - SkASSERT(filter_idx < SKBITMAP_FILTER_TABLE_SIZE); - return fFilterTable[filter_idx]; - } - SkScalar lookupScalar(float x) const { if (!fPrecomputed) { precomputeTable(); @@ -67,19 +58,16 @@ protected: float fLookupMultiplier; mutable bool fPrecomputed; - mutable SkFixed fFilterTable[SKBITMAP_FILTER_TABLE_SIZE]; mutable SkScalar fFilterTableScalar[SKBITMAP_FILTER_TABLE_SIZE]; private: void precomputeTable() const { fPrecomputed = true; - SkFixed *ftp = fFilterTable; SkScalar *ftpScalar = fFilterTableScalar; for (int x = 0; x < SKBITMAP_FILTER_TABLE_SIZE; ++x) { float fx = ((float)x + .5f) * this->width() / SKBITMAP_FILTER_TABLE_SIZE; float filter_value = evaluate(fx); *ftpScalar++ = filter_value; - *ftp++ = SkFloatToFixed(filter_value); } } }; -- cgit v1.2.3