/external/skia/modules/skottie/src/effects/ |
D | Effects.h | 17 namespace sksg { 28 sk_sp<sksg::RenderNode> attachEffects(const skjson::ArrayValue&, 29 sk_sp<sksg::RenderNode>) const; 31 sk_sp<sksg::RenderNode> attachStyles(const skjson::ArrayValue&, 32 sk_sp<sksg::RenderNode>) const; 41 using EffectBuilderT = sk_sp<sksg::RenderNode>(EffectBuilder::*)(const skjson::ArrayValue&, 42 sk_sp<sksg::RenderNode>) const; 44 sk_sp<sksg::RenderNode> attachBlackAndWhiteEffect (const skjson::ArrayValue&, 45 sk_sp<sksg::RenderNode>) const; 46 sk_sp<sksg::RenderNode> attachBrightnessContrastEffect(const skjson::ArrayValue&, [all …]
|
D | GradientEffect.cpp | 23 sk_sp<sksg::RenderNode> layer, in Make() 30 sk_sp<sksg::RenderNode> node() const { return fShaderEffect; } in node() 34 sk_sp<sksg::RenderNode> layer, in GradientRampEffectAdapter() 36 : fShaderEffect(sksg::ShaderEffect::Make(std::move(layer))) { in GradientRampEffectAdapter() 75 ? sk_sp<sksg::Gradient>(sksg::LinearGradient::Make()) in onSync() 76 : sk_sp<sksg::Gradient>(sksg::RadialGradient::Make()); in onSync() 98 auto* lg = static_cast<sksg::LinearGradient*>(fGradient.get()); in onSync() 104 auto* rg = static_cast<sksg::RadialGradient*>(fGradient.get()); in onSync() 113 const sk_sp<sksg::ShaderEffect> fShaderEffect; 114 sk_sp<sksg::Gradient> fGradient; [all …]
|
D | CCTonerEffect.cpp | 24 sksg::GradientColorFilter> { 27 sk_sp<sksg::RenderNode> layer, in CCTonerAdapter() 29 std::vector<sk_sp<sksg::Color>> colorNodes) in CCTonerAdapter() 30 : INHERITED(sksg::GradientColorFilter::Make(std::move(layer), colorNodes)) in CCTonerAdapter() 98 const std::vector<sk_sp<sksg::Color>> fColorNodes; 108 using INHERITED = DiscardableAdapterBase<CCTonerAdapter, sksg::GradientColorFilter>; 113 sk_sp<sksg::RenderNode> EffectBuilder::attachCCTonerEffect(const skjson::ArrayValue& jprops, in attachCCTonerEffect() 114 sk_sp<sksg::RenderNode> layer) const { in attachCCTonerEffect() 115 std::vector<sk_sp<sksg::Color>> colorNodes = { in attachCCTonerEffect() 116 sksg::Color::Make(SK_ColorRED), in attachCCTonerEffect() [all …]
|
D | DropShadowEffect.cpp | 23 sk_sp<sksg::RenderNode> layer, in Make() 47 const sk_sp<sksg::RenderNode>& node() const { return fImageFilterEffect; } in node() 50 explicit DropShadowAdapter(sk_sp<sksg::RenderNode> layer) in DropShadowAdapter() 51 : fDropShadow(sksg::DropShadowImageFilter::Make()) in DropShadowAdapter() 52 , fImageFilterEffect(sksg::ImageFilterEffect::Make(std::move(layer), fDropShadow)) {} in DropShadowAdapter() 68 ? sksg::DropShadowImageFilter::Mode::kShadowOnly in onSync() 69 : sksg::DropShadowImageFilter::Mode::kShadowAndForeground); in onSync() 72 const sk_sp<sksg::DropShadowImageFilter> fDropShadow; 73 const sk_sp<sksg::RenderNode> fImageFilterEffect; 85 sk_sp<sksg::RenderNode> EffectBuilder::attachDropShadowEffect(const skjson::ArrayValue& jprops, in attachDropShadowEffect() [all …]
|
D | TritoneEffect.cpp | 24 sk_sp<sksg::RenderNode> layer, in Make() 33 sk_sp<sksg::RenderNode> layer, in TritoneAdapter() 35 : fLoColorNode(sksg::Color::Make(SK_ColorBLACK)) in TritoneAdapter() 36 , fMiColorNode(sksg::Color::Make(SK_ColorBLACK)) in TritoneAdapter() 37 , fHiColorNode(sksg::Color::Make(SK_ColorBLACK)) in TritoneAdapter() 38 , fCF(sksg::GradientColorFilter::Make(std::move(layer), in TritoneAdapter() 63 const sk_sp<sksg::Color> fLoColorNode, 66 const sk_sp<sksg::GradientColorFilter> fCF; 76 sk_sp<sksg::RenderNode> EffectBuilder::attachTritoneEffect(const skjson::ArrayValue& jprops, in attachTritoneEffect() 77 sk_sp<sksg::RenderNode> layer) const { in attachTritoneEffect()
|
D | TintEffect.cpp | 23 sk_sp<sksg::RenderNode> layer, in Make() 32 sk_sp<sksg::RenderNode> layer, in TintAdapter() 34 : fColorNode0(sksg::Color::Make(SK_ColorBLACK)) in TintAdapter() 35 , fColorNode1(sksg::Color::Make(SK_ColorBLACK)) in TintAdapter() 36 , fFilterNode(sksg::GradientColorFilter::Make(std::move(layer), fColorNode0, fColorNode1)) { in TintAdapter() 60 const sk_sp<sksg::Color> fColorNode0, 62 const sk_sp<sksg::GradientColorFilter> fFilterNode; 71 sk_sp<sksg::RenderNode> EffectBuilder::attachTintEffect(const skjson::ArrayValue& jprops, in attachTintEffect() 72 sk_sp<sksg::RenderNode> layer) const { in attachTintEffect()
|
D | GaussianBlurEffect.cpp | 23 sk_sp<sksg::RenderNode> layer, in Make() 30 const sk_sp<sksg::RenderNode>& node() const { return fImageFilterEffect; } in node() 34 sk_sp<sksg::RenderNode> layer, in GaussianBlurEffectAdapter() 36 : fBlur(sksg::BlurImageFilter::Make()) in GaussianBlurEffectAdapter() 37 , fImageFilterEffect(sksg::ImageFilterEffect::Make(std::move(layer), fBlur)) { in GaussianBlurEffectAdapter() 75 const sk_sp<sksg::BlurImageFilter> fBlur; 76 const sk_sp<sksg::RenderNode> fImageFilterEffect; 85 sk_sp<sksg::RenderNode> EffectBuilder::attachGaussianBlurEffect( in attachGaussianBlurEffect() 87 sk_sp<sksg::RenderNode> layer) const { in attachGaussianBlurEffect()
|
D | FillEffect.cpp | 25 sk_sp<sksg::RenderNode> layer, in Make() 34 sk_sp<sksg::RenderNode> layer, in FillAdapter() 36 : fColorNode(sksg::Color::Make(SK_ColorBLACK)) in FillAdapter() 37 , fFilterNode(sksg::ModeColorFilter::Make(std::move(layer), in FillAdapter() 64 const sk_sp<sksg::Color> fColorNode; 65 const sk_sp<sksg::ModeColorFilter> fFilterNode; 73 sk_sp<sksg::RenderNode> EffectBuilder::attachFillEffect(const skjson::ArrayValue& jprops, in attachFillEffect() 74 sk_sp<sksg::RenderNode> layer) const { in attachFillEffect()
|
/external/skia/modules/sksg/ |
D | sksg.gni | 4 # The source of truth is //modules/sksg/src/BUILD.bazel 10 # Generated by Bazel rule //modules/sksg/src:srcs 12 "$_modules/sksg/src/SkSGClipEffect.cpp", 13 "$_modules/sksg/src/SkSGColorFilter.cpp", 14 "$_modules/sksg/src/SkSGDraw.cpp", 15 "$_modules/sksg/src/SkSGEffectNode.cpp", 16 "$_modules/sksg/src/SkSGGeometryEffect.cpp", 17 "$_modules/sksg/src/SkSGGeometryNode.cpp", 18 "$_modules/sksg/src/SkSGGradient.cpp", 19 "$_modules/sksg/src/SkSGGroup.cpp", [all …]
|
/external/skia/modules/skottie/src/layers/shapelayer/ |
D | ShapeLayer.h | 23 namespace sksg { 39 static sk_sp<sksg::Merge> MergeGeometry(std::vector<sk_sp<sksg::GeometryNode>>&&, 40 sksg::Merge::Mode); 42 static sk_sp<sksg::GeometryNode> AttachPathGeometry(const skjson::ObjectValue&, 44 static sk_sp<sksg::GeometryNode> AttachRRectGeometry(const skjson::ObjectValue&, 46 static sk_sp<sksg::GeometryNode> AttachEllipseGeometry(const skjson::ObjectValue&, 48 static sk_sp<sksg::GeometryNode> AttachPolystarGeometry(const skjson::ObjectValue&, 51 static sk_sp<sksg::PaintNode> AttachColorFill(const skjson::ObjectValue&, 53 static sk_sp<sksg::PaintNode> AttachColorStroke(const skjson::ObjectValue&, 55 static sk_sp<sksg::PaintNode> AttachGradientFill(const skjson::ObjectValue&, [all …]
|
D | MergePaths.cpp | 17 sk_sp<sksg::Merge> ShapeBuilder::MergeGeometry(std::vector<sk_sp<sksg::GeometryNode>>&& geos, in MergeGeometry() 18 sksg::Merge::Mode mode) { in MergeGeometry() 19 std::vector<sksg::Merge::Rec> merge_recs; in MergeGeometry() 24 {std::move(geo), merge_recs.empty() ? sksg::Merge::Mode::kMerge : mode}); in MergeGeometry() 27 return sksg::Merge::Make(std::move(merge_recs)); in MergeGeometry() 30 std::vector<sk_sp<sksg::GeometryNode>> ShapeBuilder::AttachMergeGeometryEffect( in AttachMergeGeometryEffect() 32 std::vector<sk_sp<sksg::GeometryNode>>&& geos) { in AttachMergeGeometryEffect() 33 static constexpr sksg::Merge::Mode gModes[] = { in AttachMergeGeometryEffect() 34 sksg::Merge::Mode::kMerge, // "mm": 1 in AttachMergeGeometryEffect() 35 sksg::Merge::Mode::kUnion, // "mm": 2 in AttachMergeGeometryEffect() [all …]
|
D | FillStroke.cpp | 21 class FillStrokeAdapter final : public DiscardableAdapterBase<FillStrokeAdapter, sksg::PaintNode> { 27 sk_sp<sksg::PaintNode> paint_node, in FillStrokeAdapter() 75 auto* color_node = static_cast<sksg::Color*>(this->node().get()); in onSync() 88 using INHERITED = DiscardableAdapterBase<FillStrokeAdapter, sksg::PaintNode>; 91 class DashAdapter final : public DiscardableAdapterBase<DashAdapter, sksg::DashEffect> { 95 sk_sp<sksg::GeometryNode> geo) in DashAdapter() 96 : INHERITED(sksg::DashEffect::Make(std::move(geo))) { in DashAdapter() 123 using INHERITED = DiscardableAdapterBase<DashAdapter, sksg::DashEffect>; 128 sk_sp<sksg::PaintNode> ShapeBuilder::AttachFill(const skjson::ObjectValue& jpaint, in AttachFill() 130 sk_sp<sksg::PaintNode> paint_node, in AttachFill() [all …]
|
D | Gradient.cpp | 37 ? sk_sp<sksg::Gradient>(sksg::LinearGradient::Make()) in Make() 38 : sk_sp<sksg::Gradient>(sksg::RadialGradient::Make()); in Make() 46 const sk_sp<sksg::Gradient>& node() const { return fGradient; } in node() 51 GradientAdapter(sk_sp<sksg::Gradient> gradient, in GradientAdapter() 71 auto* grad = static_cast<sksg::LinearGradient*>(fGradient.get()); in onSync() 78 auto* grad = static_cast<sksg::RadialGradient*>(fGradient.get()); in onSync() 123 sksg::Gradient::ColorStop current_stop = { in onSync() 131 std::vector<sksg::Gradient::ColorStop> stops; in onSync() 196 const sk_sp<sksg::Gradient> fGradient; 207 sk_sp<sksg::PaintNode> ShapeBuilder::AttachGradientFill(const skjson::ObjectValue& jgrad, in AttachGradientFill() [all …]
|
D | ShapeLayer.cpp | 33 using GeometryAttacherT = sk_sp<sksg::GeometryNode> (*)(const skjson::ObjectValue&, 43 std::vector<sk_sp<sksg::GeometryNode>> (*)(const skjson::ObjectValue&, 45 std::vector<sk_sp<sksg::GeometryNode>>&&); 54 using PaintAttacherT = sk_sp<sksg::PaintNode> (*)(const skjson::ObjectValue&, 73 std::vector<sk_sp<sksg::RenderNode>> (*)(const skjson::ObjectValue&, 75 std::vector<sk_sp<sksg::RenderNode>>&&); 146 sk_sp<sksg::GeometryNode> ShapeBuilder::AttachPathGeometry(const skjson::ObjectValue& jpath, in AttachPathGeometry() 152 AttachShapeContext(std::vector<sk_sp<sksg::GeometryNode>>* geos, in AttachShapeContext() 159 std::vector<sk_sp<sksg::GeometryNode>>* fGeometryStack; 164 sk_sp<sksg::RenderNode> AnimationBuilder::attachShape(const skjson::ArrayValue* jshape, in attachShape() [all …]
|
D | TrimPaths.cpp | 23 class TrimEffectAdapter final : public DiscardableAdapterBase<TrimEffectAdapter, sksg::TrimEffect> { 27 sk_sp<sksg::GeometryNode> child) in TrimEffectAdapter() 28 : INHERITED(sksg::TrimEffect::Make(std::move(child))) { in TrimEffectAdapter() 68 using INHERITED = DiscardableAdapterBase<TrimEffectAdapter, sksg::TrimEffect>; 73 std::vector<sk_sp<sksg::GeometryNode>> ShapeBuilder::AttachTrimGeometryEffect( in AttachTrimGeometryEffect() 76 std::vector<sk_sp<sksg::GeometryNode>>&& geos) { in AttachTrimGeometryEffect() 86 std::vector<sk_sp<sksg::GeometryNode>> inputs; in AttachTrimGeometryEffect() 88 inputs.push_back(ShapeBuilder::MergeGeometry(std::move(geos), sksg::Merge::Mode::kMerge)); in AttachTrimGeometryEffect() 93 std::vector<sk_sp<sksg::GeometryNode>> trimmed; in AttachTrimGeometryEffect()
|
D | RoundCorners.cpp | 21 sksg::RoundEffect> { 25 sk_sp<sksg::GeometryNode> child) in RoundCornersAdapter() 26 : INHERITED(sksg::RoundEffect::Make(std::move(child))) { in RoundCornersAdapter() 37 using INHERITED = DiscardableAdapterBase<RoundCornersAdapter, sksg::RoundEffect>; 42 std::vector<sk_sp<sksg::GeometryNode>> ShapeBuilder::AttachRoundGeometryEffect( in AttachRoundGeometryEffect() 44 std::vector<sk_sp<sksg::GeometryNode>>&& geos) { in AttachRoundGeometryEffect() 45 std::vector<sk_sp<sksg::GeometryNode>> rounded; in AttachRoundGeometryEffect()
|
D | OffsetPaths.cpp | 21 sksg::OffsetEffect> { 25 sk_sp<sksg::GeometryNode> child) in OffsetPathsAdapter() 26 : INHERITED(sksg::OffsetEffect::Make(std::move(child))) { in OffsetPathsAdapter() 49 using INHERITED = DiscardableAdapterBase<OffsetPathsAdapter, sksg::OffsetEffect>; 54 std::vector<sk_sp<sksg::GeometryNode>> ShapeBuilder::AttachOffsetGeometryEffect( in AttachOffsetGeometryEffect() 56 std::vector<sk_sp<sksg::GeometryNode>>&& geos) { in AttachOffsetGeometryEffect() 57 std::vector<sk_sp<sksg::GeometryNode>> offsetted; in AttachOffsetGeometryEffect()
|
/external/skia/tools/viewer/ |
D | SGSlide.cpp | 22 sksg::Draw* fDraw; 25 sksg::GeometryNode* fGeo; 26 sksg::PaintNode* fPaint; 32 sk_sp<sksg::Group> fGroup; 33 std::unique_ptr<sksg::Scene> fScene; 35 PerNodeInfo* findInfo(sksg::Draw* key) { in findInfo() 44 void appendNode(sk_sp<sksg::Draw> d, sk_sp<sksg::GeometryNode> g, sk_sp<sksg::PaintNode> p) { in appendNode() 54 fGroup = sksg::Group::Make(); in SGSlide() 56 fScene = sksg::Scene::Make(fGroup); in SGSlide() 58 auto r = sksg::Rect::Make({20, 20, 400, 300}); in SGSlide() [all …]
|
D | SlideDir.cpp | 56 class SlideAdapter final : public sksg::RenderNode { 83 SkRect onRevalidate(sksg::InvalidationController* ic, const SkMatrix& ctm) override { in onRevalidate() 106 using INHERITED = sksg::RenderNode; 119 sk_sp<sksg::RenderNode> fSlideRoot; 120 sk_sp<sksg::Matrix<SkMatrix>> fMatrix; 132 fShadePaint = sksg::Color::Make(kFocusShade); in FocusController() 133 fShade = sksg::Draw::Make(sksg::Plane::Make(), fShadePaint); in FocusController() 252 sk_sp<sksg::RenderNode> fShade; 253 sk_sp<sksg::PaintNode> fShadePaint; 271 static sk_sp<sksg::RenderNode> MakeLabel(const SkString& txt, in MakeLabel() [all …]
|
/external/skia/modules/sksg/tests/ |
D | SGTest.cpp | 27 static void check_inval(skiatest::Reporter* reporter, const sk_sp<sksg::Node>& root, in check_inval() 31 sksg::InvalidationController ic; in check_inval() 61 sk_sp<sksg::RenderNode> node; 64 static void check_hittest(skiatest::Reporter* reporter, const sk_sp<sksg::RenderNode>& root, in check_hittest() 77 auto color = sksg::Color::Make(0xff000000); in inval_test1() 78 auto r1 = sksg::Rect::Make(SkRect::MakeWH(100, 100)), in inval_test1() 79 r2 = sksg::Rect::Make(SkRect::MakeWH(100, 100)); in inval_test1() 80 auto grp = sksg::Group::Make(); in inval_test1() 81 auto matrix = sksg::Matrix<SkMatrix>::Make(SkMatrix::I()); in inval_test1() 82 auto root = sksg::TransformEffect::Make(grp, matrix); in inval_test1() [all …]
|
/external/skia/modules/skottie/src/ |
D | Layer.cpp | 34 sksg::Merge::Mode fMergeMode; // used when clipping 40 { SkBlendMode::kSrcOver , sksg::Merge::Mode::kUnion , false }; in GetMaskInfo() 42 { SkBlendMode::kSrcIn , sksg::Merge::Mode::kIntersect , false }; in GetMaskInfo() 44 { SkBlendMode::kDstOut , sksg::Merge::Mode::kDifference, true }; in GetMaskInfo() 46 { SkBlendMode::kXor , sksg::Merge::Mode::kXOR , false }; in GetMaskInfo() 62 : fMaskPaint(sksg::Color::Make(SK_ColorBLACK)) in MaskAdapter() 74 fMaskFilter = sksg::BlurImageFilter::Make(); in MaskAdapter() 86 sk_sp<sksg::RenderNode> makeMask(sk_sp<sksg::Path> mask_path) const { in makeMask() 87 sk_sp<sksg::RenderNode> mask = sksg::Draw::Make(std::move(mask_path), fMaskPaint); in makeMask() 90 mask = sksg::ImageFilterEffect::Make(std::move(mask), fMaskFilter); in makeMask() [all …]
|
D | SkottiePriv.h | 33 namespace sksg { 61 std::unique_ptr<sksg::Scene> fScene; 81 sk_sp<sksg::Transform> attachMatrix2D(const skjson::ObjectValue&, sk_sp<sksg::Transform>, 83 sk_sp<sksg::Transform> attachMatrix3D(const skjson::ObjectValue&, sk_sp<sksg::Transform>, 86 sk_sp<sksg::Transform> attachCamera(const skjson::ObjectValue& jlayer, 88 sk_sp<sksg::Transform>, 91 sk_sp<sksg::RenderNode> attachOpacity(const skjson::ObjectValue&, 92 sk_sp<sksg::RenderNode>) const; 93 sk_sp<sksg::Path> attachPath(const skjson::Value&) const; 174 bool dispatchColorProperty(const sk_sp<sksg::Color>&) const; [all …]
|
D | Layer.h | 29 sk_sp<sksg::Transform> buildTransform(const AnimationBuilder&, CompositionBuilder*); 32 sk_sp<sksg::RenderNode> buildRenderTree(const AnimationBuilder&, CompositionBuilder*, 35 const sk_sp<sksg::RenderNode>& contentTree() const { return fContentTree; } in contentTree() 58 sk_sp<sksg::Transform> getTransform(const AnimationBuilder&, CompositionBuilder*, 61 sk_sp<sksg::Transform> getParentTransform(const AnimationBuilder&, CompositionBuilder*, 64 sk_sp<sksg::Transform> doAttachTransform(const AnimationBuilder&, CompositionBuilder*, 74 sk_sp<sksg::Transform> fLayerTransform; // this layer's transform node. 75 sk_sp<sksg::Transform> fTransformCache[2]; // cached 2D/3D chain for the local node 76 sk_sp<sksg::RenderNode> fContentTree; // render tree for layer content,
|
/external/skia/modules/sksg/slides/ |
D | SVGPongSlide.cpp | 69 void update_pos(const sk_sp<sksg::RRect>& rr, const SkPoint& pos) { in update_pos() 118 auto bg_path = sksg::Path::Make(bgPath.detach()); in load() 119 auto bg_paint = sksg::Color::Make(SK_ColorBLACK); in load() 123 auto ball_paint = sksg::Color::Make(SK_ColorGREEN), in load() 124 paddle0_paint = sksg::Color::Make(SK_ColorBLUE), in load() 125 paddle1_paint = sksg::Color::Make(SK_ColorRED), in load() 126 shadow_paint = sksg::Color::Make(SK_ColorBLACK); in load() 134 auto group = sksg::Group::Make(); in load() 135 group->addChild(sksg::Draw::Make(std::move(bg_path), std::move(bg_paint))); in load() 136 group->addChild(sksg::Draw::Make(fPaddle0.shadowNode, shadow_paint)); in load() [all …]
|
/external/skia/modules/skottie/src/layers/ |
D | FootageLayer.cpp | 33 sk_sp<sksg::Image> image_node, in FootageAnimator() 34 sk_sp<sksg::Matrix<SkMatrix>> image_transform_node, in FootageAnimator() 68 const sk_sp<sksg::Image> fImageNode; 69 const sk_sp<sksg::Matrix<SkMatrix>> fImageTransformNode; 104 sk_sp<sksg::RenderNode> AnimationBuilder::attachFootageAsset(const skjson::ObjectValue& jimage, in attachFootageAsset() 112 auto image_node = sksg::Image::Make(nullptr); in attachFootageAsset() 115 sk_sp<sksg::Matrix<SkMatrix>> image_transform; in attachFootageAsset() 122 image_transform = sksg::Matrix<SkMatrix>::Make(SkMatrix::I()); in attachFootageAsset() 139 image_transform = sksg::Matrix<SkMatrix>::Make(m); in attachFootageAsset() 154 return sksg::TransformEffect::Make(std::move(image_node), std::move(image_transform)); in attachFootageAsset() [all …]
|