Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: src/gpu/GrClipMaskManager.h

Issue 23926019: Stateful PathRenderer implementation (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: clean up Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2012 Google Inc. 3 * Copyright 2012 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 #ifndef GrClipMaskManager_DEFINED 9 #ifndef GrClipMaskManager_DEFINED
10 #define GrClipMaskManager_DEFINED 10 #define GrClipMaskManager_DEFINED
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 121
122 // Gets a texture to use for the clip mask. If true is returned then a cache d mask was found 122 // Gets a texture to use for the clip mask. If true is returned then a cache d mask was found
123 // that already contains the rasterization of the clip stack, otherwise an u ninitialized texture 123 // that already contains the rasterization of the clip stack, otherwise an u ninitialized texture
124 // is returned. 124 // is returned.
125 bool getMaskTexture(int32_t clipStackGenID, 125 bool getMaskTexture(int32_t clipStackGenID,
126 const SkIRect& clipSpaceIBounds, 126 const SkIRect& clipSpaceIBounds,
127 GrTexture** result); 127 GrTexture** result);
128 128
129 bool useSWOnlyPath(const GrReducedClip::ElementList& elements); 129 bool useSWOnlyPath(const GrReducedClip::ElementList& elements);
130 130
131 // Draws a filled clip path into the target alpha mask
132 bool drawFilledPath(GrTexture* target, GrPathRenderer* pathRenderer, bool is AA);
133
131 // Draws a clip element into the target alpha mask. The caller should have a lready setup the 134 // Draws a clip element into the target alpha mask. The caller should have a lready setup the
132 // desired blend operation. Optionally if the caller already selected a path renderer it can 135 // desired blend operation.
133 // be passed. Otherwise the function will select one if the element is a pat h. 136 bool drawElement(GrTexture* target, const SkClipStack::Element* element);
134 bool drawElement(GrTexture* target, const SkClipStack::Element*, GrPathRende rer* = NULL);
135 137
136 // Determines whether it is possible to draw the element to both the stencil buffer and the 138 // 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 139 // alpha mask simultaneously. If so and the element is a path a compatible p ath renderer is
138 // also returned. 140 // also returned.
139 bool canStencilAndDrawElement(GrTexture* target, const SkClipStack::Element* , GrPathRenderer**); 141 bool canStencilAndDrawElement(GrTexture* target, const SkClipStack::Element* ,
142 GrPathRenderer** pr);
140 143
141 void mergeMask(GrTexture* dstMask, 144 void mergeMask(GrTexture* dstMask,
142 GrTexture* srcMask, 145 GrTexture* srcMask,
143 SkRegion::Op op, 146 SkRegion::Op op,
144 const SkIRect& dstBound, 147 const SkIRect& dstBound,
145 const SkIRect& srcBound); 148 const SkIRect& srcBound);
146 149
147 void getTemp(int width, int height, GrAutoScratchTexture* temp); 150 void getTemp(int width, int height, GrAutoScratchTexture* temp);
148 151
149 void setupCache(const SkClipStack& clip, 152 void setupCache(const SkClipStack& clip,
(...skipping 11 matching lines...) Expand all
161 * clipping. 164 * clipping.
162 */ 165 */
163 void adjustStencilParams(GrStencilSettings* settings, 166 void adjustStencilParams(GrStencilSettings* settings,
164 StencilClipMode mode, 167 StencilClipMode mode,
165 int stencilBitCnt); 168 int stencilBitCnt);
166 169
167 typedef GrNoncopyable INHERITED; 170 typedef GrNoncopyable INHERITED;
168 }; 171 };
169 172
170 #endif // GrClipMaskManager_DEFINED 173 #endif // GrClipMaskManager_DEFINED
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698