| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 #ifndef GrClipMaskManager_DEFINED | 7 #ifndef GrClipMaskManager_DEFINED |
| 8 #define GrClipMaskManager_DEFINED | 8 #define GrClipMaskManager_DEFINED |
| 9 | 9 |
| 10 #include "GrPipelineBuilder.h" | 10 #include "GrPipelineBuilder.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 // Draws a clip element into the target alpha mask. The caller should have a
lready setup the | 127 // Draws a clip element into the target alpha mask. The caller should have a
lready setup the |
| 128 // desired blend operation. Optionally if the caller already selected a path
renderer it can | 128 // desired blend operation. Optionally if the caller already selected a path
renderer it can |
| 129 // be passed. Otherwise the function will select one if the element is a pat
h. | 129 // be passed. Otherwise the function will select one if the element is a pat
h. |
| 130 bool drawElement(GrPipelineBuilder*, | 130 bool drawElement(GrPipelineBuilder*, |
| 131 const SkMatrix& viewMatrix, | 131 const SkMatrix& viewMatrix, |
| 132 GrTexture* target, | 132 GrTexture* target, |
| 133 const SkClipStack::Element*, | 133 const SkClipStack::Element*, |
| 134 GrPathRenderer* pr = nullptr); | 134 GrPathRenderer* pr = nullptr); |
| 135 | 135 |
| 136 // Determines whether it is possible to draw the element to both the stencil
buffer and the |
| 137 // alpha mask simultaneously. If so and the element is a path a compatible p
ath renderer is |
| 138 // also returned. |
| 139 bool canStencilAndDrawElement(GrPipelineBuilder*, |
| 140 GrTexture* target, |
| 141 GrPathRenderer**, |
| 142 const SkClipStack::Element*); |
| 143 |
| 136 void mergeMask(GrPipelineBuilder*, | 144 void mergeMask(GrPipelineBuilder*, |
| 137 GrTexture* dstMask, | 145 GrTexture* dstMask, |
| 138 GrTexture* srcMask, | 146 GrTexture* srcMask, |
| 139 SkRegion::Op op, | 147 SkRegion::Op op, |
| 140 const SkIRect& dstBound, | 148 const SkIRect& dstBound, |
| 141 const SkIRect& srcBound); | 149 const SkIRect& srcBound); |
| 142 | 150 |
| 143 GrTexture* createTempMask(int width, int height); | 151 GrTexture* createTempMask(int width, int height); |
| 144 | 152 |
| 145 /** | 153 /** |
| (...skipping 14 matching lines...) Expand all Loading... |
| 160 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b
ool renderTarget); | 168 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b
ool renderTarget); |
| 161 | 169 |
| 162 static const int kMaxAnalyticElements = 4; | 170 static const int kMaxAnalyticElements = 4; |
| 163 | 171 |
| 164 GrDrawTarget* fDrawTarget; // This is our owning draw target. | 172 GrDrawTarget* fDrawTarget; // This is our owning draw target. |
| 165 StencilClipMode fClipMode; | 173 StencilClipMode fClipMode; |
| 166 | 174 |
| 167 typedef SkNoncopyable INHERITED; | 175 typedef SkNoncopyable INHERITED; |
| 168 }; | 176 }; |
| 169 #endif // GrClipMaskManager_DEFINED | 177 #endif // GrClipMaskManager_DEFINED |
| OLD | NEW |