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

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

Issue 678683005: Scissor rect on drawinfo (Closed) Base URL: https://skia.googlesource.com/skia.git@clip_to_target
Patch Set: rebase on master Created 6 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
« 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
11 #include "GrClipMaskCache.h" 11 #include "GrClipMaskCache.h"
12 #include "GrContext.h" 12 #include "GrContext.h"
13 #include "GrDrawState.h" 13 #include "GrDrawState.h"
14 #include "GrDrawTarget.h"
14 #include "GrReducedClip.h" 15 #include "GrReducedClip.h"
15 #include "GrStencil.h" 16 #include "GrStencil.h"
16 #include "GrTexture.h" 17 #include "GrTexture.h"
17 18
18 #include "SkClipStack.h" 19 #include "SkClipStack.h"
19 #include "SkDeque.h" 20 #include "SkDeque.h"
20 #include "SkPath.h" 21 #include "SkPath.h"
21 #include "SkRefCnt.h" 22 #include "SkRefCnt.h"
22 #include "SkTLList.h" 23 #include "SkTLList.h"
23 #include "SkTypes.h" 24 #include "SkTypes.h"
(...skipping 20 matching lines...) Expand all
44 } 45 }
45 46
46 /** 47 /**
47 * Creates a clip mask if necessary as a stencil buffer or alpha texture 48 * Creates a clip mask if necessary as a stencil buffer or alpha texture
48 * and sets the GrGpu's scissor and stencil state. If the return is false 49 * and sets the GrGpu's scissor and stencil state. If the return is false
49 * then the draw can be skipped. The AutoRestoreEffects is initialized by 50 * then the draw can be skipped. The AutoRestoreEffects is initialized by
50 * the manager when it must install additional effects to implement the 51 * the manager when it must install additional effects to implement the
51 * clip. devBounds is optional but can help optimize clipping. 52 * clip. devBounds is optional but can help optimize clipping.
52 */ 53 */
53 bool setupClipping(const GrClipData* clipDataIn, 54 bool setupClipping(const GrClipData* clipDataIn,
55 const SkRect* devBounds,
54 GrDrawState::AutoRestoreEffects*, 56 GrDrawState::AutoRestoreEffects*,
55 GrDrawState::AutoRestoreStencil*, 57 GrDrawState::AutoRestoreStencil*,
56 const SkRect* devBounds); 58 GrDrawTarget::ScissorState* scissorState);
57 59
58 /** 60 /**
59 * Purge resources to free up memory. TODO: This class shouldn't hold any lo ng lived refs 61 * Purge resources to free up memory. TODO: This class shouldn't hold any lo ng lived refs
60 * which will allow ResourceCache2 to automatically purge anything this clas s has created. 62 * which will allow ResourceCache2 to automatically purge anything this clas s has created.
61 */ 63 */
62 void purgeResources(); 64 void purgeResources();
63 65
64 bool isClipInStencil() const { 66 bool isClipInStencil() const {
65 return kStencil_ClipMaskType == fCurrClipMaskType; 67 return kStencil_ClipMaskType == fCurrClipMaskType;
66 } 68 }
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 * clipping. 184 * clipping.
183 */ 185 */
184 void adjustStencilParams(GrStencilSettings* settings, 186 void adjustStencilParams(GrStencilSettings* settings,
185 StencilClipMode mode, 187 StencilClipMode mode,
186 int stencilBitCnt); 188 int stencilBitCnt);
187 189
188 typedef SkNoncopyable INHERITED; 190 typedef SkNoncopyable INHERITED;
189 }; 191 };
190 192
191 #endif // GrClipMaskManager_DEFINED 193 #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