Bug 1867190 - Initialise the PHC allocate delay later r=glandium
[gecko.git] / dom / svg / SVGFEDistantLightElement.h
blob5eb98ed12ee1703b4cf70ab4395bbfde182d051e
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef DOM_SVG_SVGFEDISTANTLIGHTELEMENT_H_
8 #define DOM_SVG_SVGFEDISTANTLIGHTELEMENT_H_
10 #include "SVGAnimatedNumber.h"
11 #include "mozilla/dom/SVGFilters.h"
13 nsresult NS_NewSVGFEDistantLightElement(
14 nsIContent** aResult, already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo);
16 namespace mozilla::dom {
18 using SVGFEDistantLightElementBase = SVGFELightElement;
20 class SVGFEDistantLightElement final : public SVGFEDistantLightElementBase {
21 friend nsresult(::NS_NewSVGFEDistantLightElement(
22 nsIContent** aResult,
23 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo));
25 protected:
26 explicit SVGFEDistantLightElement(
27 already_AddRefed<mozilla::dom::NodeInfo>&& aNodeInfo)
28 : SVGFEDistantLightElementBase(std::move(aNodeInfo)) {}
29 JSObject* WrapNode(JSContext* aCx,
30 JS::Handle<JSObject*> aGivenProto) override;
32 public:
33 mozilla::gfx::LightType ComputeLightAttributes(
34 SVGFilterInstance* aInstance, nsTArray<float>& aFloatAttributes) override;
35 bool AttributeAffectsRendering(int32_t aNameSpaceID,
36 nsAtom* aAttribute) const override;
38 nsresult Clone(dom::NodeInfo*, nsINode** aResult) const override;
40 // WebIDL
41 already_AddRefed<DOMSVGAnimatedNumber> Azimuth();
42 already_AddRefed<DOMSVGAnimatedNumber> Elevation();
44 protected:
45 NumberAttributesInfo GetNumberInfo() override;
47 enum { AZIMUTH, ELEVATION };
48 SVGAnimatedNumber mNumberAttributes[2];
49 static NumberInfo sNumberInfo[2];
52 } // namespace mozilla::dom
54 #endif // DOM_SVG_SVGFEDISTANTLIGHTELEMENT_H_