/* * Copyright 2022 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkSVGOpenTypeSVGDecoder_DEFINED #define SkSVGOpenTypeSVGDecoder_DEFINED #include "include/core/SkColor.h" #include "include/core/SkOpenTypeSVGDecoder.h" #include "include/core/SkRefCnt.h" #include "include/core/SkSpan.h" #include "include/core/SkTypes.h" #include #include #include class SkCanvas; class SkSVGDOM; class SkSVGOpenTypeSVGDecoder : public SkOpenTypeSVGDecoder { public: static std::unique_ptr Make(const uint8_t* svg, size_t svgLength); size_t approximateSize() override; bool render(SkCanvas&, int upem, SkGlyphID glyphId, SkColor foregroundColor, SkSpan palette) override; ~SkSVGOpenTypeSVGDecoder() override; private: SkSVGOpenTypeSVGDecoder(sk_sp skSvg, size_t approximateSize); sk_sp fSkSvg; size_t fApproximateSize; }; #endif // SkSVGOpenTypeSVGDecoder_DEFINED