Debian Codegraph @

src/core/SkGlyphRunPainter.h

raw
1 /*
2 * Copyright 2018 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8 #ifndef skcpu_GlyphRunPainter_DEFINED
9 #define skcpu_GlyphRunPainter_DEFINED
10
11 #include "include/core/SkSurfaceProps.h"
12
13 #include <cstdint>
14
15 class SkCanvas;
16 class SkColorSpace;
17 class SkMatrix;
18 class SkPaint;
19 enum SkColorType : int;
20 enum class SkScalerContextFlags : uint32_t;
21 namespace sktext {
22 class GlyphRunList;
23 }
24
25 namespace skcpu {
26
27 class BitmapDevicePainter;
28
29 class GlyphRunListPainter {
30 public:
31 GlyphRunListPainter(const SkSurfaceProps& props, SkColorType colorType, SkColorSpace* cs);
32
33 void drawForBitmapDevice(
34 SkCanvas* canvas, const BitmapDevicePainter* bitmapDevice,
35 const sktext::GlyphRunList& glyphRunList, const SkPaint& paint,
36 const SkMatrix& drawMatrix);
37 private:
38 // The props as on the actual device.
39 const SkSurfaceProps fDeviceProps;
40
41 // The props for when the bitmap device can't draw LCD text.
42 const SkSurfaceProps fBitmapFallbackProps;
43 const SkColorType fColorType;
44 const SkScalerContextFlags fScalerContextFlags;
45 };
46
47 } // namespace skcpu
48
49 #endif // skcpu_GlyphRunPainter_DEFINED