OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrDrawContext_DEFINED | 8 #ifndef GrDrawContext_DEFINED |
9 #define GrDrawContext_DEFINED | 9 #define GrDrawContext_DEFINED |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 struct SkRSXform; | 40 struct SkRSXform; |
41 class SkTextBlob; | 41 class SkTextBlob; |
42 | 42 |
43 /* | 43 /* |
44 * A helper object to orchestrate draws | 44 * A helper object to orchestrate draws |
45 */ | 45 */ |
46 class SK_API GrDrawContext : public SkRefCnt { | 46 class SK_API GrDrawContext : public SkRefCnt { |
47 public: | 47 public: |
48 ~GrDrawContext() override; | 48 ~GrDrawContext() override; |
49 | 49 |
50 bool copySurface(GrSurface* src, const SkIRect& srcRect, const SkIPoint& dst
Point); | 50 void copySurface(GrSurface* src, const SkIRect& srcRect, const SkIPoint& dst
Point); |
51 | 51 |
52 // TODO: it is odd that we need both the SkPaint in the following 3 methods. | 52 // TODO: it is odd that we need both the SkPaint in the following 3 methods. |
53 // We should extract the text parameters from SkPaint and pass them separate
ly | 53 // We should extract the text parameters from SkPaint and pass them separate
ly |
54 // akin to GrStrokeInfo (GrTextInfo?) | 54 // akin to GrStrokeInfo (GrTextInfo?) |
55 void drawText(const GrClip&, const GrPaint&, const SkPaint&, | 55 void drawText(const GrClip&, const GrPaint&, const SkPaint&, |
56 const SkMatrix& viewMatrix, const char text[], size_t byteLeng
th, | 56 const SkMatrix& viewMatrix, const char text[], size_t byteLeng
th, |
57 SkScalar x, SkScalar y, const SkIRect& clipBounds); | 57 SkScalar x, SkScalar y, const SkIRect& clipBounds); |
58 void drawPosText(const GrClip&, const GrPaint&, const SkPaint&, | 58 void drawPosText(const GrClip&, const GrPaint&, const SkPaint&, |
59 const SkMatrix& viewMatrix, const char text[], size_t byteL
ength, | 59 const SkMatrix& viewMatrix, const char text[], size_t byteL
ength, |
60 const SkScalar pos[], int scalarsPerPosition, | 60 const SkScalar pos[], int scalarsPerPosition, |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger | 313 GrTextContext* fTextContext; // lazily gotten from GrContext::DrawingMana
ger |
314 | 314 |
315 SkSurfaceProps fSurfaceProps; | 315 SkSurfaceProps fSurfaceProps; |
316 GrAuditTrail* fAuditTrail; | 316 GrAuditTrail* fAuditTrail; |
317 | 317 |
318 // In debug builds we guard against improper thread handling | 318 // In debug builds we guard against improper thread handling |
319 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) | 319 SkDEBUGCODE(mutable GrSingleOwner* fSingleOwner;) |
320 }; | 320 }; |
321 | 321 |
322 #endif | 322 #endif |
OLD | NEW |