OLD | NEW |
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 GrDrawContextPriv_DEFINED | 8 #ifndef GrDrawContextPriv_DEFINED |
9 #define GrDrawContextPriv_DEFINED | 9 #define GrDrawContextPriv_DEFINED |
10 | 10 |
11 #include "GrDrawContext.h" | 11 #include "GrDrawContext.h" |
12 #include "GrDrawTarget.h" | 12 #include "GrDrawTarget.h" |
13 #include "GrPathRendering.h" | 13 #include "GrPathRendering.h" |
14 | 14 |
15 class GrFixedClip; | 15 class GrFixedClip; |
16 class GrPath; | 16 class GrPath; |
17 struct GrUserStencilSettings; | 17 struct GrUserStencilSettings; |
18 | 18 |
19 /** Class that adds methods to GrDrawContext that are only intended for use inte
rnal to Skia. | 19 /** Class that adds methods to GrDrawContext that are only intended for use inte
rnal to Skia. |
20 This class is purely a privileged window into GrDrawContext. It should never
have additional | 20 This class is purely a privileged window into GrDrawContext. It should never
have additional |
21 data members or virtual methods. */ | 21 data members or virtual methods. */ |
22 class GrDrawContextPriv { | 22 class GrDrawContextPriv { |
23 public: | 23 public: |
24 gr_instanced::InstancedRendering* accessInstancedRendering() const { | 24 gr_instanced::InstancedRendering* accessInstancedRendering() const { |
25 return fDrawContext->getDrawTarget()->instancedRendering(); | 25 return fDrawContext->getDrawTarget()->instancedRendering(); |
26 } | 26 } |
27 | 27 |
28 void clearStencilClip(const SkIRect& rect, bool insideClip); | 28 void clear(const GrFixedClip&, const GrColor, bool canIgnoreClip); |
29 | 29 |
30 void stencilRect(const GrFixedClip& clip, | 30 void clearStencilClip(const GrFixedClip&, bool insideStencilMask); |
| 31 |
| 32 void stencilRect(const GrClip& clip, |
31 const GrUserStencilSettings* ss, | 33 const GrUserStencilSettings* ss, |
32 bool useHWAA, | 34 bool useHWAA, |
33 const SkMatrix& viewMatrix, | 35 const SkMatrix& viewMatrix, |
34 const SkRect& rect); | 36 const SkRect& rect); |
35 | 37 |
36 void stencilPath(const GrClip&, | 38 void stencilPath(const GrClip&, |
37 bool useHWAA, | 39 bool useHWAA, |
38 const SkMatrix& viewMatrix, | 40 const SkMatrix& viewMatrix, |
39 const GrPath*); | 41 const GrPath*); |
40 | 42 |
41 bool drawAndStencilRect(const GrFixedClip&, | 43 bool drawAndStencilRect(const GrClip&, |
42 const GrUserStencilSettings*, | 44 const GrUserStencilSettings*, |
43 SkRegion::Op op, | 45 SkRegion::Op op, |
44 bool invert, | 46 bool invert, |
45 bool doAA, | 47 bool doAA, |
46 const SkMatrix& viewMatrix, | 48 const SkMatrix& viewMatrix, |
47 const SkRect&); | 49 const SkRect&); |
48 | 50 |
49 bool drawAndStencilPath(const GrFixedClip&, | 51 bool drawAndStencilPath(const GrClip&, |
50 const GrUserStencilSettings*, | 52 const GrUserStencilSettings*, |
51 SkRegion::Op op, | 53 SkRegion::Op op, |
52 bool invert, | 54 bool invert, |
53 bool doAA, | 55 bool doAA, |
54 const SkMatrix& viewMatrix, | 56 const SkMatrix& viewMatrix, |
55 const SkPath&); | 57 const SkPath&); |
56 | 58 |
57 SkBudgeted isBudgeted() const; | 59 SkBudgeted isBudgeted() const; |
58 | 60 |
59 void testingOnly_drawBatch(const GrPaint&, | 61 void testingOnly_drawBatch(const GrPaint&, |
(...skipping 15 matching lines...) Expand all Loading... |
75 friend class GrDrawContext; // to construct/copy this type. | 77 friend class GrDrawContext; // to construct/copy this type. |
76 }; | 78 }; |
77 | 79 |
78 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext
Priv(this); } | 80 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext
Priv(this); } |
79 | 81 |
80 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { | 82 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { |
81 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); | 83 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); |
82 } | 84 } |
83 | 85 |
84 #endif | 86 #endif |
OLD | NEW |