blob: d26f08ecdbd5dc532375747103dcc882b68206a8 [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
Brian Osman11052242016-10-27 14:47:55 -040011#include "GrRenderTargetContext.h"
joshualitt96880d92016-02-16 10:36:53 -080012
13class GrStencilAndCoverTextContext;
14
Brian Osman11052242016-10-27 14:47:55 -040015class GrPathRenderingRenderTargetContext : public GrRenderTargetContext {
joshualitt96880d92016-02-16 10:36:53 -080016public:
Brian Salomon6f1d36c2017-01-13 12:02:17 -050017 void drawText(const GrClip&, const SkPaint&, const SkMatrix& viewMatrix, const char text[],
18 size_t byteLength, SkScalar x, SkScalar y, const SkIRect& clipBounds) override;
19 void drawPosText(const GrClip&, const SkPaint&, const SkMatrix& viewMatrix, const char text[],
20 size_t byteLength, const SkScalar pos[], int scalarsPerPosition,
21 const SkPoint& offset, const SkIRect& clipBounds) override;
joshualitt96880d92016-02-16 10:36:53 -080022 void drawTextBlob(const GrClip&, const SkPaint&,
23 const SkMatrix& viewMatrix, const SkTextBlob*,
24 SkScalar x, SkScalar y,
25 SkDrawFilter*, const SkIRect& clipBounds) override;
26protected:
Brian Osman11052242016-10-27 14:47:55 -040027 GrPathRenderingRenderTargetContext(GrContext* ctx, GrDrawingManager* mgr,
Robert Phillipsc7635fa2016-10-28 13:25:24 -040028 sk_sp<GrRenderTargetProxy> rtp,
29 sk_sp<SkColorSpace> colorSpace,
Brian Osman11052242016-10-27 14:47:55 -040030 const SkSurfaceProps* surfaceProps, GrAuditTrail* at,
31 GrSingleOwner* so)
Robert Phillipsc7635fa2016-10-28 13:25:24 -040032 : INHERITED(ctx, mgr, std::move(rtp), std::move(colorSpace), surfaceProps, at, so) {}
joshualitt96880d92016-02-16 10:36:53 -080033
34private:
Ben Wagner145dbcd2016-11-03 14:40:50 -040035 std::unique_ptr<GrStencilAndCoverTextContext> fStencilAndCoverTextContext;
joshualitt96880d92016-02-16 10:36:53 -080036
37 friend class GrDrawingManager; // for ctor
38
Brian Osman11052242016-10-27 14:47:55 -040039 typedef GrRenderTargetContext INHERITED;
joshualitt96880d92016-02-16 10:36:53 -080040};
41
42#endif