Add SkRuntimeEffect accessor to SkColorFilterBase.
This mirrors the SkRuntimeEffect accessor in SkShaderBase and SkBlenderBase, and will be used in a followup CL which will allow hooking up debug traces to runtime effects of any type. Change-Id: I4449333dac3f2af7b11868d9baf0a82b35ca5aaf Reviewed-on: https://skia-review.googlesource.com/c/skia/+/478960 Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: John Stiles <johnstiles@google.com>
This commit is contained in:
parent
ffe365eb4d
commit
9e17096adb
@ -18,6 +18,7 @@ class GrRecordingContext;
|
||||
class SkArenaAlloc;
|
||||
class SkBitmap;
|
||||
class SkColorSpace;
|
||||
class SkRuntimeEffect;
|
||||
struct SkStageRec;
|
||||
using GrFPResult = std::tuple<bool, std::unique_ptr<GrFragmentProcessor>>;
|
||||
|
||||
@ -55,6 +56,8 @@ public:
|
||||
|
||||
static void RegisterFlattenables();
|
||||
|
||||
virtual SkRuntimeEffect* asRuntimeEffect() const { return nullptr; }
|
||||
|
||||
static SkFlattenable::Type GetFlattenableType() {
|
||||
return kSkColorFilter_Type;
|
||||
}
|
||||
|
@ -929,6 +929,8 @@ public:
|
||||
write_child_effects(buffer, fChildren);
|
||||
}
|
||||
|
||||
SkRuntimeEffect* asRuntimeEffect() const override { return fEffect.get(); }
|
||||
|
||||
SK_FLATTENABLE_HOOKS(SkRuntimeColorFilter)
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user