Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: src/gpu/GrPathRenderingDrawContext.h

Issue 1918003003: Bring sk_sp to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrPathRenderingDrawContext_DEFINED 8 #ifndef GrPathRenderingDrawContext_DEFINED
9 #define GrPathRenderingDrawContext_DEFINED 9 #define GrPathRenderingDrawContext_DEFINED
10 10
11 #include "GrDrawContext.h" 11 #include "GrDrawContext.h"
12 12
13 class GrStencilAndCoverTextContext; 13 class GrStencilAndCoverTextContext;
14 14
15 class GrPathRenderingDrawContext : public GrDrawContext { 15 class GrPathRenderingDrawContext : public GrDrawContext {
16 public: 16 public:
17 void drawText(const GrClip&, const GrPaint&, const SkPaint&, 17 void drawText(const GrClip&, const GrPaint&, const SkPaint&,
18 const SkMatrix& viewMatrix, const char text[], size_t byteLeng th, 18 const SkMatrix& viewMatrix, const char text[], size_t byteLeng th,
19 SkScalar x, SkScalar y, const SkIRect& clipBounds) override; 19 SkScalar x, SkScalar y, const SkIRect& clipBounds) override;
20 void drawPosText(const GrClip&, const GrPaint&, const SkPaint&, 20 void drawPosText(const GrClip&, const GrPaint&, const SkPaint&,
21 const SkMatrix& viewMatrix, const char text[], size_t byteL ength, 21 const SkMatrix& viewMatrix, const char text[], size_t byteL ength,
22 const SkScalar pos[], int scalarsPerPosition, 22 const SkScalar pos[], int scalarsPerPosition,
23 const SkPoint& offset, const SkIRect& clipBounds) override; 23 const SkPoint& offset, const SkIRect& clipBounds) override;
24 void drawTextBlob(const GrClip&, const SkPaint&, 24 void drawTextBlob(const GrClip&, const SkPaint&,
25 const SkMatrix& viewMatrix, const SkTextBlob*, 25 const SkMatrix& viewMatrix, const SkTextBlob*,
26 SkScalar x, SkScalar y, 26 SkScalar x, SkScalar y,
27 SkDrawFilter*, const SkIRect& clipBounds) override; 27 SkDrawFilter*, const SkIRect& clipBounds) override;
28 protected: 28 protected:
29 GrPathRenderingDrawContext(GrContext* ctx, GrDrawingManager* mgr, GrRenderTa rget* rt, 29 GrPathRenderingDrawContext(GrContext* ctx, GrDrawingManager* mgr, sk_sp<GrRe nderTarget> rt,
30 const SkSurfaceProps* surfaceProps, GrAuditTrail* at, 30 const SkSurfaceProps* surfaceProps, GrAuditTrail* at,
31 GrSingleOwner* so) 31 GrSingleOwner* so)
32 : INHERITED(ctx, mgr, rt, surfaceProps, at, so) {} 32 : INHERITED(ctx, mgr, std::move(rt), surfaceProps, at, so) {}
33 33
34 private: 34 private:
35 SkAutoTDelete<GrStencilAndCoverTextContext> fStencilAndCoverTextContext; 35 SkAutoTDelete<GrStencilAndCoverTextContext> fStencilAndCoverTextContext;
36 36
37 friend class GrDrawingManager; // for ctor 37 friend class GrDrawingManager; // for ctor
38 38
39 typedef GrDrawContext INHERITED; 39 typedef GrDrawContext INHERITED;
40 }; 40 };
41 41
42 #endif 42 #endif
OLDNEW
« gm/beziereffects.cpp ('K') | « src/gpu/GrLayerCache.cpp ('k') | src/gpu/GrRenderTarget.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698