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

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

Issue 367013003: Remove the AA requirement for selecting GrEffect-based clipping. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove bogus assert Created 6 years, 5 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
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 */ 99 */
100 enum ClipMaskType { 100 enum ClipMaskType {
101 kNone_ClipMaskType, 101 kNone_ClipMaskType,
102 kStencil_ClipMaskType, 102 kStencil_ClipMaskType,
103 kAlpha_ClipMaskType, 103 kAlpha_ClipMaskType,
104 } fCurrClipMaskType; 104 } fCurrClipMaskType;
105 105
106 GrClipMaskCache fAACache; // cache for the AA path 106 GrClipMaskCache fAACache; // cache for the AA path
107 107
108 // Attempts to install a series of coverage effects to implement the clip. R eturn indicates 108 // Attempts to install a series of coverage effects to implement the clip. R eturn indicates
109 // whether the element list was successfully converted to effects. 109 // whether the element list was successfully converted to effects. One of th e elements may
110 // be selected to use the scissor. If so scissorRect will be updated to a va lid rectangle
111 // that the caller should set as the scissor rect. If not, scissorRect won't be modified.
110 bool installClipEffects(const GrReducedClip::ElementList&, 112 bool installClipEffects(const GrReducedClip::ElementList&,
111 GrDrawState::AutoRestoreEffects*, 113 GrDrawState::AutoRestoreEffects*,
112 const SkVector& clipOffset, 114 const SkVector& clipOffset,
113 const SkRect* devBounds); 115 const SkRect* devBounds,
116 SkIRect* scissorRect);
114 117
115 // Draws the clip into the stencil buffer 118 // Draws the clip into the stencil buffer
116 bool createStencilClipMask(int32_t elementsGenID, 119 bool createStencilClipMask(int32_t elementsGenID,
117 GrReducedClip::InitialState initialState, 120 GrReducedClip::InitialState initialState,
118 const GrReducedClip::ElementList& elements, 121 const GrReducedClip::ElementList& elements,
119 const SkIRect& clipSpaceIBounds, 122 const SkIRect& clipSpaceIBounds,
120 const SkIPoint& clipSpaceToStencilOffset); 123 const SkIPoint& clipSpaceToStencilOffset);
121 // Creates an alpha mask of the clip. The mask is a rasterization of element s through the 124 // Creates an alpha mask of the clip. The mask is a rasterization of element s through the
122 // rect specified by clipSpaceIBounds. 125 // rect specified by clipSpaceIBounds.
123 GrTexture* createAlphaClipMask(int32_t elementsGenID, 126 GrTexture* createAlphaClipMask(int32_t elementsGenID,
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 * clipping. 179 * clipping.
177 */ 180 */
178 void adjustStencilParams(GrStencilSettings* settings, 181 void adjustStencilParams(GrStencilSettings* settings,
179 StencilClipMode mode, 182 StencilClipMode mode,
180 int stencilBitCnt); 183 int stencilBitCnt);
181 184
182 typedef SkNoncopyable INHERITED; 185 typedef SkNoncopyable INHERITED;
183 }; 186 };
184 187
185 #endif // GrClipMaskManager_DEFINED 188 #endif // GrClipMaskManager_DEFINED
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698