aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkGlyphRun.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkGlyphRun.h')
-rw-r--r--src/core/SkGlyphRun.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/core/SkGlyphRun.h b/src/core/SkGlyphRun.h
index 26590c1251..6bdc633091 100644
--- a/src/core/SkGlyphRun.h
+++ b/src/core/SkGlyphRun.h
@@ -21,7 +21,10 @@
#include "SkTemplates.h"
#include "SkTextBlobPriv.h"
#include "SkTypes.h"
-
+#if SK_SUPPORT_GPU
+class GrColorSpaceInfo;
+class GrRenderTargetContext;
+#endif
class SkBaseDevice;
class SkGlyphRunList;
class SkRasterClip;
@@ -109,18 +112,26 @@ public:
SkGlyphRunListDrawer(
const SkSurfaceProps& props, SkColorType colorType, SkScalerContextFlags flags);
- using PerMask = std::function<void(const SkMask&)>;
+ #if SK_SUPPORT_GPU
+ SkGlyphRunListDrawer(const SkSurfaceProps&, const GrColorSpaceInfo&);
+ explicit SkGlyphRunListDrawer(const GrRenderTargetContext& renderTargetContext);
+ #endif
+
+ using PerMask = std::function<void(const SkMask&, const SkGlyph&, SkPoint)>;
using PerMaskCreator = std::function<PerMask(const SkPaint&, SkArenaAlloc* alloc)>;
using PerPath = std::function<void(const SkPath&, const SkMatrix&)>;
using PerPathCreator = std::function<PerPath(const SkPaint&, SkArenaAlloc* alloc)>;
- void drawForBitmap(
+ void drawForBitmapDevice(
const SkGlyphRunList& glyphRunList, const SkMatrix& deviceMatrix,
PerMaskCreator perMaskCreator, PerPathCreator perPathCreator);
+ void drawUsingMasks(
+ SkGlyphCache* cache, const SkGlyphRun& glyphRun, SkPoint origin,
+ const SkMatrix& deviceMatrix, PerMask perMask);
private:
static bool ShouldDrawAsPath(const SkPaint& paint, const SkMatrix& matrix);
bool ensureBitmapBuffers(size_t runSize);
- void drawGlyphRunAsPaths(
+ void drawUsingPaths(
const SkGlyphRun& glyphRun, SkPoint origin,
const SkSurfaceProps& props, PerPath perPath) const;
void drawGlyphRunAsSubpixelMask(