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

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

Issue 956363003: Cleanup in GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 10 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 | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('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 #ifndef GrClipMaskManager_DEFINED 7 #ifndef GrClipMaskManager_DEFINED
8 #define GrClipMaskManager_DEFINED 8 #define GrClipMaskManager_DEFINED
9 9
10 #include "GrClipMaskCache.h" 10 #include "GrClipMaskCache.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 /** 44 /**
45 * Creates a clip mask if necessary as a stencil buffer or alpha texture 45 * Creates a clip mask if necessary as a stencil buffer or alpha texture
46 * and sets the GrGpu's scissor and stencil state. If the return is false 46 * and sets the GrGpu's scissor and stencil state. If the return is false
47 * then the draw can be skipped. The AutoRestoreEffects is initialized by 47 * then the draw can be skipped. The AutoRestoreEffects is initialized by
48 * the manager when it must install additional effects to implement the 48 * the manager when it must install additional effects to implement the
49 * clip. devBounds is optional but can help optimize clipping. 49 * clip. devBounds is optional but can help optimize clipping.
50 */ 50 */
51 bool setupClipping(GrPipelineBuilder*, 51 bool setupClipping(GrPipelineBuilder*,
52 GrPipelineBuilder::AutoRestoreEffects*, 52 GrPipelineBuilder::AutoRestoreFragmentProcessors*,
53 GrPipelineBuilder::AutoRestoreStencil*, 53 GrPipelineBuilder::AutoRestoreStencil*,
54 GrScissorState*, 54 GrScissorState*,
55 const SkRect* devBounds); 55 const SkRect* devBounds);
56 56
57 /** 57 /**
58 * Purge resources to free up memory. TODO: This class shouldn't hold any lo ng lived refs 58 * Purge resources to free up memory. TODO: This class shouldn't hold any lo ng lived refs
59 * which will allow Resourcecache to automatically purge anything this class has created. 59 * which will allow Resourcecache to automatically purge anything this class has created.
60 */ 60 */
61 void purgeResources(); 61 void purgeResources();
62 62
(...skipping 24 matching lines...) Expand all
87 // Clip against the existing representation of the clip in the high bit 87 // Clip against the existing representation of the clip in the high bit
88 // of the stencil buffer. 88 // of the stencil buffer.
89 kRespectClip_StencilClipMode, 89 kRespectClip_StencilClipMode,
90 // Neither writing to nor clipping against the clip bit. 90 // Neither writing to nor clipping against the clip bit.
91 kIgnoreClip_StencilClipMode, 91 kIgnoreClip_StencilClipMode,
92 }; 92 };
93 93
94 // Attempts to install a series of coverage effects to implement the clip. R eturn indicates 94 // Attempts to install a series of coverage effects to implement the clip. R eturn indicates
95 // whether the element list was successfully converted to effects. 95 // whether the element list was successfully converted to effects.
96 bool installClipEffects(GrPipelineBuilder*, 96 bool installClipEffects(GrPipelineBuilder*,
97 GrPipelineBuilder::AutoRestoreEffects*, 97 GrPipelineBuilder::AutoRestoreFragmentProcessors*,
98 const GrReducedClip::ElementList&, 98 const GrReducedClip::ElementList&,
99 const SkVector& clipOffset, 99 const SkVector& clipOffset,
100 const SkRect* devBounds); 100 const SkRect* devBounds);
101 101
102 // Draws the clip into the stencil buffer 102 // Draws the clip into the stencil buffer
103 bool createStencilClipMask(GrRenderTarget*, 103 bool createStencilClipMask(GrRenderTarget*,
104 int32_t elementsGenID, 104 int32_t elementsGenID,
105 GrReducedClip::InitialState initialState, 105 GrReducedClip::InitialState initialState,
106 const GrReducedClip::ElementList& elements, 106 const GrReducedClip::ElementList& elements,
107 const SkIRect& clipSpaceIBounds, 107 const SkIRect& clipSpaceIBounds,
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 kAlpha_ClipMaskType, 189 kAlpha_ClipMaskType,
190 } fCurrClipMaskType; 190 } fCurrClipMaskType;
191 191
192 GrClipMaskCache fAACache; // cache for the AA path 192 GrClipMaskCache fAACache; // cache for the AA path
193 GrClipTarget* fClipTarget; 193 GrClipTarget* fClipTarget;
194 StencilClipMode fClipMode; 194 StencilClipMode fClipMode;
195 195
196 typedef SkNoncopyable INHERITED; 196 typedef SkNoncopyable INHERITED;
197 }; 197 };
198 #endif // GrClipMaskManager_DEFINED 198 #endif // GrClipMaskManager_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrAADistanceFieldPathRenderer.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698