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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 | 66 |
67 // Attempts to install a series of coverage effects to implement the clip. R
eturn indicates | 67 // Attempts to install a series of coverage effects to implement the clip. R
eturn indicates |
68 // whether the element list was successfully converted to processors. *fp ma
y be nullptr even | 68 // whether the element list was successfully converted to processors. *fp ma
y be nullptr even |
69 // when the function succeeds because all the elements were ignored. TODO: M
ake clip reduction | 69 // when the function succeeds because all the elements were ignored. TODO: M
ake clip reduction |
70 // bounds-aware and stop checking bounds in this function. Similarly, we sho
uldn't need to pass | 70 // bounds-aware and stop checking bounds in this function. Similarly, we sho
uldn't need to pass |
71 // abortIfAA, but we don't yet know if all the AA elements will be eliminate
d. | 71 // abortIfAA, but we don't yet know if all the AA elements will be eliminate
d. |
72 bool getAnalyticClipProcessor(const GrReducedClip::ElementList&, | 72 bool getAnalyticClipProcessor(const GrReducedClip::ElementList&, |
73 bool abortIfAA, | 73 bool abortIfAA, |
74 SkVector& clipOffset, | 74 SkVector& clipOffset, |
75 const SkRect* devBounds, | 75 const SkRect* devBounds, |
76 const GrFragmentProcessor** fp); | 76 sk_sp<const GrFragmentProcessor>* fp); |
77 | 77 |
78 // Draws the clip into the stencil buffer | 78 // Draws the clip into the stencil buffer |
79 bool createStencilClipMask(GrRenderTarget*, | 79 bool createStencilClipMask(GrRenderTarget*, |
80 int32_t elementsGenID, | 80 int32_t elementsGenID, |
81 GrReducedClip::InitialState initialState, | 81 GrReducedClip::InitialState initialState, |
82 const GrReducedClip::ElementList& elements, | 82 const GrReducedClip::ElementList& elements, |
83 const SkIRect& clipSpaceIBounds, | 83 const SkIRect& clipSpaceIBounds, |
84 const SkIPoint& clipSpaceToStencilOffset); | 84 const SkIPoint& clipSpaceToStencilOffset); |
85 | 85 |
86 // Creates an alpha mask of the clip. The mask is a rasterization of element
s through the | 86 // Creates an alpha mask of the clip. The mask is a rasterization of element
s through the |
(...skipping 21 matching lines...) Expand all Loading... |
108 | 108 |
109 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b
ool renderTarget); | 109 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b
ool renderTarget); |
110 | 110 |
111 static const int kMaxAnalyticElements = 4; | 111 static const int kMaxAnalyticElements = 4; |
112 | 112 |
113 GrDrawTarget* fDrawTarget; // This is our owning draw target. | 113 GrDrawTarget* fDrawTarget; // This is our owning draw target. |
114 | 114 |
115 typedef SkNoncopyable INHERITED; | 115 typedef SkNoncopyable INHERITED; |
116 }; | 116 }; |
117 #endif // GrClipMaskManager_DEFINED | 117 #endif // GrClipMaskManager_DEFINED |
OLD | NEW |