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

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

Issue 712223002: Combine similar DrawPaths calls in GrInOrderDrawBuffer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « expectations/gm/ignored-tests.txt ('k') | src/gpu/GrInOrderDrawBuffer.h » ('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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 , fClipTarget(NULL) 43 , fClipTarget(NULL)
44 , fClipMode(kIgnoreClip_StencilClipMode) { 44 , fClipMode(kIgnoreClip_StencilClipMode) {
45 } 45 }
46 46
47 // The state of the scissor is controlled by the clip manager, no one else s hould set 47 // The state of the scissor is controlled by the clip manager, no one else s hould set
48 // Scissor state. This should really be on Gpu itself. We should revist th is when GPU 48 // Scissor state. This should really be on Gpu itself. We should revist th is when GPU
49 // and drawtarget are separate 49 // and drawtarget are separate
50 struct ScissorState { 50 struct ScissorState {
51 ScissorState() : fEnabled(false) {} 51 ScissorState() : fEnabled(false) {}
52 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; } 52 void set(const SkIRect& rect) { fRect = rect; fEnabled = true; }
53 bool operator==(const ScissorState& other) { 53 bool operator==(const ScissorState& other) const {
54 return fEnabled == other.fEnabled && 54 return fEnabled == other.fEnabled &&
55 (false == fEnabled || fRect == other.fRect); 55 (false == fEnabled || fRect == other.fRect);
56 } 56 }
57 bool operator!=(const ScissorState& other) { return !(*this == other); } 57 bool operator!=(const ScissorState& other) const { return !(*this == oth er); }
58 bool fEnabled; 58 bool fEnabled;
59 SkIRect fRect; 59 SkIRect fRect;
60 }; 60 };
61 61
62 /** 62 /**
63 * Creates a clip mask if necessary as a stencil buffer or alpha texture 63 * Creates a clip mask if necessary as a stencil buffer or alpha texture
64 * and sets the GrGpu's scissor and stencil state. If the return is false 64 * and sets the GrGpu's scissor and stencil state. If the return is false
65 * then the draw can be skipped. The AutoRestoreEffects is initialized by 65 * then the draw can be skipped. The AutoRestoreEffects is initialized by
66 * the manager when it must install additional effects to implement the 66 * the manager when it must install additional effects to implement the
67 * clip. devBounds is optional but can help optimize clipping. 67 * clip. devBounds is optional but can help optimize clipping.
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 } fCurrClipMaskType; 194 } fCurrClipMaskType;
195 195
196 GrClipMaskCache fAACache; // cache for the AA path 196 GrClipMaskCache fAACache; // cache for the AA path
197 GrClipTarget* fClipTarget; 197 GrClipTarget* fClipTarget;
198 StencilClipMode fClipMode; 198 StencilClipMode fClipMode;
199 199
200 typedef SkNoncopyable INHERITED; 200 typedef SkNoncopyable INHERITED;
201 }; 201 };
202 202
203 #endif // GrClipMaskManager_DEFINED 203 #endif // GrClipMaskManager_DEFINED
OLDNEW
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | src/gpu/GrInOrderDrawBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698