This is a pretty minor change but felt like a small improvement to me. It ...
12 years, 5 months ago
(2012-06-15 21:37:15 UTC)
#1
This is a pretty minor change but felt like a small improvement to me. It seemed
to me like the existing code left open the possibility that the two booleans
could incorrectly both be true and that having an enum would be safer. Also, the
when and where the bools got set seemed a tad confusing since there were some
redundant sets in createClipMask and the functions it calls.
http://codereview.appspot.com/6306092/diff/4001/src/gpu/GrClipMaskManager.cpp
File src/gpu/GrClipMaskManager.cpp (left):
http://codereview.appspot.com/6306092/diff/4001/src/gpu/GrClipMaskManager.cpp...
src/gpu/GrClipMaskManager.cpp:835: fClipMaskInStencil = true;
I discovered that sometimes we were using a stencil mask but the bool wasn't set
here. This occurred if they clip matched the cached copy checked by
mustRenderClip above. However, the caller of this function was setting the bool
to true so we were OK. But this means the set here was always redundant. In the
modified code the caller, createClipMask, always sets the mask type to kNone and
the three functions that update the mask set it to either kStencil or kAlpha if
they succeed.
Issue 6306092: Store clip mask location in GrClipMaskManager as a enum rather than two bools
(Closed)
Created 12 years, 5 months ago by bsalomon
Modified 12 years, 5 months ago
Reviewers: robertphillips
Base URL: http://skia.googlecode.com/svn/trunk/
Comments: 1