diff options
author | fmalita <fmalita@chromium.org> | 2016-05-12 10:53:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-12 10:53:49 -0700 |
commit | 1e2e33a74d707b918a0b1063047bbb25ee81ae67 (patch) | |
tree | 52d271e85cde45d60089cd80263c6fcd8939bdc3 /src/core | |
parent | b11cf50b4a07be00b80816c67f738588357330bd (diff) |
Remove SkPicture::hasText()
No longer used in Chromium.
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1978533002
Review-Url: https://codereview.chromium.org/1978533002
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/SkBigPicture.cpp | 6 | ||||
-rw-r--r-- | src/core/SkBigPicture.h | 2 | ||||
-rw-r--r-- | src/core/SkMiniRecorder.cpp | 2 | ||||
-rw-r--r-- | src/core/SkPictureCommon.h | 12 |
4 files changed, 1 insertions, 21 deletions
diff --git a/src/core/SkBigPicture.cpp b/src/core/SkBigPicture.cpp index da3d3a8418..cd9c5f70b5 100644 --- a/src/core/SkBigPicture.cpp +++ b/src/core/SkBigPicture.cpp @@ -63,7 +63,6 @@ const SkBigPicture::Analysis& SkBigPicture::analysis() const { } SkRect SkBigPicture::cullRect() const { return fCullRect; } -bool SkBigPicture::hasText() const { return this->analysis().fHasText; } bool SkBigPicture::willPlayBackBitmaps() const { return this->analysis().fWillPlaybackBitmaps; } int SkBigPicture::numSlowPaths() const { return this->analysis().fNumSlowPathsAndDashEffects; } int SkBigPicture::approximateOpCount() const { return fRecord->count(); } @@ -83,18 +82,15 @@ SkPicture const* const* SkBigPicture::drawablePicts() const { void SkBigPicture::Analysis::init(const SkRecord& record) { TRACE_EVENT0("disabled-by-default-skia", "SkBigPicture::Analysis::init()"); - SkTextHunter text; SkBitmapHunter bitmap; SkPathCounter path; - bool hasText = false, hasBitmap = false; + bool hasBitmap = false; for (int i = 0; i < record.count(); i++) { - hasText = hasText || record.visit(i, text); hasBitmap = hasBitmap || record.visit(i, bitmap); record.visit(i, path); } - fHasText = hasText; fWillPlaybackBitmaps = hasBitmap; fNumSlowPathsAndDashEffects = SkTMin<int>(path.fNumSlowPathsAndDashEffects, 255); } diff --git a/src/core/SkBigPicture.h b/src/core/SkBigPicture.h index f9997f705b..b081855751 100644 --- a/src/core/SkBigPicture.h +++ b/src/core/SkBigPicture.h @@ -47,7 +47,6 @@ public: // SkPicture overrides void playback(SkCanvas*, AbortCallback*) const override; SkRect cullRect() const override; - bool hasText() const override; bool willPlayBackBitmaps() const override; int approximateOpCount() const override; size_t approximateBytesUsed() const override; @@ -71,7 +70,6 @@ private: uint8_t fNumSlowPathsAndDashEffects; bool fWillPlaybackBitmaps : 1; - bool fHasText : 1; }; int numSlowPaths() const override; diff --git a/src/core/SkMiniRecorder.cpp b/src/core/SkMiniRecorder.cpp index 378f4304b3..ea1866e084 100644 --- a/src/core/SkMiniRecorder.cpp +++ b/src/core/SkMiniRecorder.cpp @@ -23,7 +23,6 @@ public: size_t approximateBytesUsed() const override { return sizeof(*this); } int approximateOpCount() const override { return 0; } SkRect cullRect() const override { return SkRect::MakeEmpty(); } - bool hasText() const override { return false; } int numSlowPaths() const override { return 0; } bool willPlayBackBitmaps() const override { return false; } }; @@ -42,7 +41,6 @@ public: size_t approximateBytesUsed() const override { return sizeof(*this); } int approximateOpCount() const override { return 1; } SkRect cullRect() const override { return fCull; } - bool hasText() const override { return SkTextHunter()(fOp); } bool willPlayBackBitmaps() const override { return SkBitmapHunter()(fOp); } int numSlowPaths() const override { SkPathCounter counter; diff --git a/src/core/SkPictureCommon.h b/src/core/SkPictureCommon.h index 6e95b296e0..16146be020 100644 --- a/src/core/SkPictureCommon.h +++ b/src/core/SkPictureCommon.h @@ -14,18 +14,6 @@ #include "SkRecords.h" #include "SkTLogic.h" -struct SkTextHunter { - // Most ops never have text. Some always do. Subpictures know themeselves. - bool operator()(const SkRecords::DrawPicture& op) { return op.picture->hasText(); } - bool operator()(const SkRecords::DrawDrawable&) { /*TODO*/ return false; } - - template <typename T> - SK_WHEN(T::kTags & SkRecords::kHasText_Tag, bool) operator()(const T&) { return true; } - template <typename T> - SK_WHEN(!(T::kTags & SkRecords::kHasText_Tag), bool) operator()(const T&) { return false; } -}; - - // N.B. This name is slightly historical: hunting season is now open for SkImages too. struct SkBitmapHunter { // Some ops have a paint, some have an optional paint. Either way, get back a pointer. |