skia2/modules/sksg/include/SkSGEffectNode.h
Florin Malita 1f43a4359d [skottie] Add drop shadow support
Introduce the machinery required for general image filters in SkSG +
a concrete drop shadow image filter effect.

Wire it all up with Skottie to support drop-shadow layer effects.

Change-Id: I98e9669852f58ba6481439a7fda4a56ec6c59b8a
Reviewed-on: https://skia-review.googlesource.com/c/190426
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Florin Malita <fmalita@chromium.org>
2019-02-09 13:35:57 +00:00

41 lines
878 B
C++

/*
* Copyright 2017 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#ifndef SkSGEffectNode_DEFINED
#define SkSGEffectNode_DEFINED
#include "SkSGRenderNode.h"
namespace sksg {
/**
* Base class for nodes which apply some transformation when rendering
* their descendants.
*
* This includes transforms, clipping, filters, etc.
*/
class EffectNode : public RenderNode {
protected:
explicit EffectNode(sk_sp<RenderNode>);
~EffectNode() override;
void onRender(SkCanvas*, const RenderContext*) const override;
SkRect onRevalidate(InvalidationController*, const SkMatrix&) override;
const sk_sp<RenderNode>& getChild() const { return fChild; }
private:
sk_sp<RenderNode> fChild;
typedef RenderNode INHERITED;
};
} // namespace sksg
#endif // SkSGEffectNode_DEFINED