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

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

Issue 53133002: Make not-reusing-scratch-textures only apply to texture uploads (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: clean up Created 7 years, 1 month 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
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 7
8 #ifndef GrClipMaskManager_DEFINED 8 #ifndef GrClipMaskManager_DEFINED
9 #define GrClipMaskManager_DEFINED 9 #define GrClipMaskManager_DEFINED
10 10
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 const GrReducedClip::ElementList& elements, 114 const GrReducedClip::ElementList& elements,
115 const SkIRect& clipSpaceIBounds); 115 const SkIRect& clipSpaceIBounds);
116 // Similar to createAlphaClipMask but it rasterizes in SW and uploads to the result texture. 116 // Similar to createAlphaClipMask but it rasterizes in SW and uploads to the result texture.
117 GrTexture* createSoftwareClipMask(int32_t clipStackGenID, 117 GrTexture* createSoftwareClipMask(int32_t clipStackGenID,
118 GrReducedClip::InitialState initialState, 118 GrReducedClip::InitialState initialState,
119 const GrReducedClip::ElementList& elements , 119 const GrReducedClip::ElementList& elements ,
120 const SkIRect& clipSpaceIBounds); 120 const SkIRect& clipSpaceIBounds);
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. 'willUpload' is set when the alpha mask needs to be uploaded from the CPU.
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 bool willUpload);
128 129
129 bool useSWOnlyPath(const GrReducedClip::ElementList& elements); 130 bool useSWOnlyPath(const GrReducedClip::ElementList& elements);
130 131
131 // Draws a clip element into the target alpha mask. The caller should have a lready setup the 132 // 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 133 // desired blend operation. Optionally if the caller already selected a path renderer it can
133 // be passed. Otherwise the function will select one if the element is a pat h. 134 // be passed. Otherwise the function will select one if the element is a pat h.
134 bool drawElement(GrTexture* target, const SkClipStack::Element*, GrPathRende rer* = NULL); 135 bool drawElement(GrTexture* target, const SkClipStack::Element*, GrPathRende rer* = NULL);
135 136
136 // Determines whether it is possible to draw the element to both the stencil buffer and the 137 // 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 // alpha mask simultaneously. If so and the element is a path a compatible p ath renderer is
(...skipping 23 matching lines...) Expand all
161 * clipping. 162 * clipping.
162 */ 163 */
163 void adjustStencilParams(GrStencilSettings* settings, 164 void adjustStencilParams(GrStencilSettings* settings,
164 StencilClipMode mode, 165 StencilClipMode mode,
165 int stencilBitCnt); 166 int stencilBitCnt);
166 167
167 typedef SkNoncopyable INHERITED; 168 typedef SkNoncopyable INHERITED;
168 }; 169 };
169 170
170 #endif // GrClipMaskManager_DEFINED 171 #endif // GrClipMaskManager_DEFINED
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698