blob: 420bbe83b3aa2394a8fc8b8bb315fc54a192cc5e [file] [log] [blame]
joshualitt96880d92016-02-16 10:36:53 -08001/*
2 * Copyright 2016 Google Inc.
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
Brian Osman11052242016-10-27 14:47:55 -04008#ifndef GrPathRenderingRenderTargetContext_DEFINED
9#define GrPathRenderingRenderTargetContext_DEFINED
joshualitt96880d92016-02-16 10:36:53 -080010
Hal Canary6b20a552017-02-07 14:09:38 -050011#include "text/GrStencilAndCoverTextContext.h"
joshualitt96880d92016-02-16 10:36:53 -080012
Brian Osman11052242016-10-27 14:47:55 -040013class GrPathRenderingRenderTargetContext : public GrRenderTargetContext {
joshualitt96880d92016-02-16 10:36:53 -080014public:
Brian Salomon6f1d36c2017-01-13 12:02:17 -050015 void drawText(const GrClip&, const SkPaint&, const SkMatrix& viewMatrix, const char text[],
16 size_t byteLength, SkScalar x, SkScalar y, const SkIRect& clipBounds) override;
17 void drawPosText(const GrClip&, const SkPaint&, const SkMatrix& viewMatrix, const char text[],
18 size_t byteLength, const SkScalar pos[], int scalarsPerPosition,
19 const SkPoint& offset, const SkIRect& clipBounds) override;
joshualitt96880d92016-02-16 10:36:53 -080020 void drawTextBlob(const GrClip&, const SkPaint&,
21 const SkMatrix& viewMatrix, const SkTextBlob*,
22 SkScalar x, SkScalar y,
23 SkDrawFilter*, const SkIRect& clipBounds) override;
24protected:
Brian Osman11052242016-10-27 14:47:55 -040025 GrPathRenderingRenderTargetContext(GrContext* ctx, GrDrawingManager* mgr,
Robert Phillipsc7635fa2016-10-28 13:25:24 -040026 sk_sp<GrRenderTargetProxy> rtp,
27 sk_sp<SkColorSpace> colorSpace,
Brian Osman11052242016-10-27 14:47:55 -040028 const SkSurfaceProps* surfaceProps, GrAuditTrail* at,
29 GrSingleOwner* so)
Robert Phillipsc7635fa2016-10-28 13:25:24 -040030 : INHERITED(ctx, mgr, std::move(rtp), std::move(colorSpace), surfaceProps, at, so) {}
joshualitt96880d92016-02-16 10:36:53 -080031
32private:
Ben Wagner145dbcd2016-11-03 14:40:50 -040033 std::unique_ptr<GrStencilAndCoverTextContext> fStencilAndCoverTextContext;
joshualitt96880d92016-02-16 10:36:53 -080034
35 friend class GrDrawingManager; // for ctor
36
Brian Osman11052242016-10-27 14:47:55 -040037 typedef GrRenderTargetContext INHERITED;
joshualitt96880d92016-02-16 10:36:53 -080038};
39
40#endif