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

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

Issue 1399223005: Don't abort analytic clipping if using MSAA until elements are examined (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 5 years, 2 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 | « 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 #ifndef GrClipMaskManager_DEFINED 7 #ifndef GrClipMaskManager_DEFINED
8 #define GrClipMaskManager_DEFINED 8 #define GrClipMaskManager_DEFINED
9 9
10 #include "GrPipelineBuilder.h" 10 #include "GrPipelineBuilder.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Clip against the existing representation of the clip in the high bit 82 // Clip against the existing representation of the clip in the high bit
83 // of the stencil buffer. 83 // of the stencil buffer.
84 kRespectClip_StencilClipMode, 84 kRespectClip_StencilClipMode,
85 // Neither writing to nor clipping against the clip bit. 85 // Neither writing to nor clipping against the clip bit.
86 kIgnoreClip_StencilClipMode, 86 kIgnoreClip_StencilClipMode,
87 }; 87 };
88 88
89 // Attempts to install a series of coverage effects to implement the clip. R eturn indicates 89 // Attempts to install a series of coverage effects to implement the clip. R eturn indicates
90 // whether the element list was successfully converted to processors. *fp ma y be nullptr even 90 // whether the element list was successfully converted to processors. *fp ma y be nullptr even
91 // when the function succeeds because all the elements were ignored. TODO: M ake clip reduction 91 // when the function succeeds because all the elements were ignored. TODO: M ake clip reduction
92 // bounds-aware and stop checking bounds in this function. 92 // bounds-aware and stop checking bounds in this function. Similarly, we sho uldn't need to pass
93 // abortIfAA, but we don't yet know if all the AA elements will be eliminate d.
93 bool getAnalyticClipProcessor(const GrReducedClip::ElementList&, 94 bool getAnalyticClipProcessor(const GrReducedClip::ElementList&,
95 bool abortIfAA,
94 SkVector& clipOffset, 96 SkVector& clipOffset,
95 const SkRect* devBounds, 97 const SkRect* devBounds,
96 const GrFragmentProcessor** fp); 98 const GrFragmentProcessor** fp);
97 99
98 // Draws the clip into the stencil buffer 100 // Draws the clip into the stencil buffer
99 bool createStencilClipMask(GrRenderTarget*, 101 bool createStencilClipMask(GrRenderTarget*,
100 int32_t elementsGenID, 102 int32_t elementsGenID,
101 GrReducedClip::InitialState initialState, 103 GrReducedClip::InitialState initialState,
102 const GrReducedClip::ElementList& elements, 104 const GrReducedClip::ElementList& elements,
103 const SkIRect& clipSpaceIBounds, 105 const SkIRect& clipSpaceIBounds,
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b ool renderTarget); 168 GrTexture* createCachedMask(int width, int height, const GrUniqueKey& key, b ool renderTarget);
167 169
168 static const int kMaxAnalyticElements = 4; 170 static const int kMaxAnalyticElements = 4;
169 171
170 GrDrawTarget* fDrawTarget; // This is our owning draw target. 172 GrDrawTarget* fDrawTarget; // This is our owning draw target.
171 StencilClipMode fClipMode; 173 StencilClipMode fClipMode;
172 174
173 typedef SkNoncopyable INHERITED; 175 typedef SkNoncopyable INHERITED;
174 }; 176 };
175 #endif // GrClipMaskManager_DEFINED 177 #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