| 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 "GrPathRendering.h" |
| 12 | 13 |
| 13 class GrFixedClip; | 14 class GrFixedClip; |
| 15 class GrPath; |
| 14 struct GrUserStencilSettings; | 16 struct GrUserStencilSettings; |
| 15 | 17 |
| 16 /** Class that adds methods to GrDrawContext that are only intended for use inte
rnal to Skia. | 18 /** Class that adds methods to GrDrawContext that are only intended for use inte
rnal to Skia. |
| 17 This class is purely a privileged window into GrDrawContext. It should never
have additional | 19 This class is purely a privileged window into GrDrawContext. It should never
have additional |
| 18 data members or virtual methods. */ | 20 data members or virtual methods. */ |
| 19 class GrDrawContextPriv { | 21 class GrDrawContextPriv { |
| 20 public: | 22 public: |
| 23 void clearStencilClip(const SkIRect& rect, bool insideClip); |
| 24 |
| 25 void stencilRect(const GrFixedClip& clip, |
| 26 const GrUserStencilSettings* ss, |
| 27 bool doAA, |
| 28 const SkMatrix& viewMatrix, |
| 29 const SkRect& rect); |
| 30 |
| 31 void stencilPath(const GrPipelineBuilder&, |
| 32 const GrClip&, |
| 33 const SkMatrix& viewMatrix, |
| 34 const GrPath*, |
| 35 GrPathRendering::FillType); |
| 36 |
| 21 bool drawAndStencilRect(const GrFixedClip&, | 37 bool drawAndStencilRect(const GrFixedClip&, |
| 22 const GrUserStencilSettings*, | 38 const GrUserStencilSettings*, |
| 23 SkRegion::Op op, | 39 SkRegion::Op op, |
| 24 bool invert, | 40 bool invert, |
| 25 bool doAA, | 41 bool doAA, |
| 26 const SkMatrix& viewMatrix, | 42 const SkMatrix& viewMatrix, |
| 27 const SkRect&); | 43 const SkRect&); |
| 28 | 44 |
| 29 bool drawAndStencilPath(const GrFixedClip&, | 45 bool drawAndStencilPath(const GrFixedClip&, |
| 30 const GrUserStencilSettings*, | 46 const GrUserStencilSettings*, |
| (...skipping 21 matching lines...) Expand all Loading... |
| 52 friend class GrDrawContext; // to construct/copy this type. | 68 friend class GrDrawContext; // to construct/copy this type. |
| 53 }; | 69 }; |
| 54 | 70 |
| 55 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext
Priv(this); } | 71 inline GrDrawContextPriv GrDrawContext::drawContextPriv() { return GrDrawContext
Priv(this); } |
| 56 | 72 |
| 57 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { | 73 inline const GrDrawContextPriv GrDrawContext::drawContextPriv () const { |
| 58 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); | 74 return GrDrawContextPriv(const_cast<GrDrawContext*>(this)); |
| 59 } | 75 } |
| 60 | 76 |
| 61 #endif | 77 #endif |
| OLD | NEW |