| Index: src/core/SkRecordPattern.h
|
| diff --git a/src/core/SkRecordPattern.h b/src/core/SkRecordPattern.h
|
| index ecc61b3aaa1cabeab38889fad5989635ce5de74b..d9568b360a97c8925f77802c6a0eef4ef66f9e84 100644
|
| --- a/src/core/SkRecordPattern.h
|
| +++ b/src/core/SkRecordPattern.h
|
| @@ -41,7 +41,6 @@ private:
|
|
|
| // Matches any command that draws, and stores its paint.
|
| class IsDraw {
|
| - SK_CREATE_MEMBER_DETECTOR(paint);
|
| public:
|
| IsDraw() : fPaint(nullptr) {}
|
|
|
| @@ -49,19 +48,19 @@ public:
|
| type* get() { return fPaint; }
|
|
|
| template <typename T>
|
| - SK_WHEN(HasMember_paint<T>, bool) operator()(T* draw) {
|
| + SK_WHEN(T::kTags & kDraw_Tag, bool) operator()(T* draw) {
|
| fPaint = AsPtr(draw->paint);
|
| return true;
|
| }
|
|
|
| - template <typename T>
|
| - SK_WHEN(!HasMember_paint<T>, bool) operator()(T*) {
|
| + bool operator()(DrawDrawable*) {
|
| + static_assert(DrawDrawable::kTags & kDraw_Tag, "");
|
| fPaint = nullptr;
|
| - return false;
|
| + return true;
|
| }
|
|
|
| - // SaveLayer has an SkPaint named paint, but it's not a draw.
|
| - bool operator()(SaveLayer*) {
|
| + template <typename T>
|
| + SK_WHEN(!(T::kTags & kDraw_Tag), bool) operator()(T* draw) {
|
| fPaint = nullptr;
|
| return false;
|
| }
|
|
|