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 #include "GrReducedClip.h" | 8 #include "GrReducedClip.h" |
9 | 9 |
10 #include "GrAppliedClip.h" | 10 #include "GrAppliedClip.h" |
11 #include "GrClip.h" | 11 #include "GrClip.h" |
12 #include "GrColor.h" | 12 #include "GrColor.h" |
13 #include "GrContextPriv.h" | 13 #include "GrContextPriv.h" |
14 #include "GrRenderTargetContext.h" | 14 #include "GrRenderTargetContext.h" |
15 #include "GrRenderTargetContextPriv.h" | 15 #include "GrRenderTargetContextPriv.h" |
16 #include "GrDrawingManager.h" | 16 #include "GrDrawingManager.h" |
17 #include "GrFixedClip.h" | 17 #include "GrFixedClip.h" |
18 #include "GrPathRenderer.h" | 18 #include "GrPathRenderer.h" |
| 19 #include "GrStencilSettings.h" |
19 #include "GrStyle.h" | 20 #include "GrStyle.h" |
20 #include "GrUserStencilSettings.h" | 21 #include "GrUserStencilSettings.h" |
21 | 22 |
22 typedef SkClipStack::Element Element; | 23 typedef SkClipStack::Element Element; |
23 | 24 |
24 /** | 25 /** |
25 * There are plenty of optimizations that could be added here. Maybe flips could
be folded into | 26 * There are plenty of optimizations that could be added here. Maybe flips could
be folded into |
26 * earlier operations. Or would inserting flips and reversing earlier ops ever b
e a win? Perhaps | 27 * earlier operations. Or would inserting flips and reversing earlier ops ever b
e a win? Perhaps |
27 * for the case where the bounds are kInsideOut_BoundsType. We could restrict ea
rlier operations | 28 * for the case where the bounds are kInsideOut_BoundsType. We could restrict ea
rlier operations |
28 * based on later intersect operations, and perhaps remove intersect-rects. We c
ould optionally | 29 * based on later intersect operations, and perhaps remove intersect-rects. We c
ould optionally |
(...skipping 809 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
838 } else { | 839 } else { |
839 // The view matrix is setup to do clip space -> stencil space tr
anslation, so | 840 // The view matrix is setup to do clip space -> stencil space tr
anslation, so |
840 // draw rect in clip space. | 841 // draw rect in clip space. |
841 renderTargetContext->priv().stencilRect(stencilClip, *pass, fals
e, viewMatrix, | 842 renderTargetContext->priv().stencilRect(stencilClip, *pass, fals
e, viewMatrix, |
842 SkRect::Make(fIBounds)); | 843 SkRect::Make(fIBounds)); |
843 } | 844 } |
844 } | 845 } |
845 } | 846 } |
846 return true; | 847 return true; |
847 } | 848 } |
OLD | NEW |