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

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

Issue 947443003: Move clip off of draw target (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: feedback inc Created 5 years, 9 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/GrClipData.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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
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::AutoRestoreEffects*,
53 GrPipelineBuilder::AutoRestoreStencil*, 53 GrPipelineBuilder::AutoRestoreStencil*,
54 GrScissorState*, 54 GrScissorState*,
55 const GrClipData* clipDataIn,
56 const SkRect* devBounds); 55 const SkRect* devBounds);
57 56
58 /** 57 /**
59 * 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
60 * 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.
61 */ 60 */
62 void purgeResources(); 61 void purgeResources();
63 62
64 bool isClipInStencil() const { 63 bool isClipInStencil() const {
65 return kStencil_ClipMaskType == fCurrClipMaskType; 64 return kStencil_ClipMaskType == fCurrClipMaskType;
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 kAlpha_ClipMaskType, 189 kAlpha_ClipMaskType,
191 } fCurrClipMaskType; 190 } fCurrClipMaskType;
192 191
193 GrClipMaskCache fAACache; // cache for the AA path 192 GrClipMaskCache fAACache; // cache for the AA path
194 GrClipTarget* fClipTarget; 193 GrClipTarget* fClipTarget;
195 StencilClipMode fClipMode; 194 StencilClipMode fClipMode;
196 195
197 typedef SkNoncopyable INHERITED; 196 typedef SkNoncopyable INHERITED;
198 }; 197 };
199 #endif // GrClipMaskManager_DEFINED 198 #endif // GrClipMaskManager_DEFINED
OLDNEW
« no previous file with comments | « src/gpu/GrClipData.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698