diff options
Diffstat (limited to 'gfx/skia/skia/include/core/SkOpenTypeSVGDecoder.h')
-rw-r--r-- | gfx/skia/skia/include/core/SkOpenTypeSVGDecoder.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gfx/skia/skia/include/core/SkOpenTypeSVGDecoder.h b/gfx/skia/skia/include/core/SkOpenTypeSVGDecoder.h new file mode 100644 index 0000000000..5a2e48a9df --- /dev/null +++ b/gfx/skia/skia/include/core/SkOpenTypeSVGDecoder.h @@ -0,0 +1,30 @@ +/* + * 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 SkOpenTypeSVGDecoder_DEFINED +#define SkOpenTypeSVGDecoder_DEFINED + +#include "include/core/SkColor.h" +#include "include/core/SkSpan.h" +#include "include/core/SkTypes.h" + +#include <memory> + +class SkCanvas; + +class SkOpenTypeSVGDecoder { +public: + /** Each instance probably owns an SVG DOM. + * The instance may be cached so needs to report how much memory it retains. + */ + virtual size_t approximateSize() = 0; + virtual bool render(SkCanvas&, int upem, SkGlyphID glyphId, + SkColor foregroundColor, SkSpan<SkColor> palette) = 0; + virtual ~SkOpenTypeSVGDecoder() = default; +}; + +#endif // SkOpenTypeSVGDecoder_DEFINED |