diff options
author | 2017-11-27 14:33:06 -0700 | |
---|---|---|
committer | 2017-11-27 22:40:27 +0000 | |
commit | 3b51df12119d82661ed64efa87d5ccfe2d32f625 (patch) | |
tree | 14e9d374b599621722c102cd61a382715ed75a03 /src/gpu/GrClipStackClip.cpp | |
parent | 4b9506bc3c6e06958d1c38abe56b034777d48d5c (diff) |
Cleanup yes/no enums in Ganesh
Yes/no enums should have a base type of bool, and kYes should always
be true. Also, there is no need for a "GrEnumToBool()" function, as we
can just use the enum itself directly: e.g. "GrAA(bool)".
Bug: skia:
Change-Id: I7bb3c2983f717f3467fca4ce6b32920d71026894
Reviewed-on: https://skia-review.googlesource.com/74860
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrClipStackClip.cpp')
-rw-r--r-- | src/gpu/GrClipStackClip.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/GrClipStackClip.cpp b/src/gpu/GrClipStackClip.cpp index 52fab72476..684a52d216 100644 --- a/src/gpu/GrClipStackClip.cpp +++ b/src/gpu/GrClipStackClip.cpp @@ -53,7 +53,7 @@ bool GrClipStackClip::isRRect(const SkRect& origRTBounds, SkRRect* rr, GrAA* aa) const SkRect* rtBounds = &origRTBounds; bool isAA; if (fStack->isRRect(*rtBounds, rr, &isAA)) { - *aa = GrBoolToAA(isAA); + *aa = GrAA(isAA); return true; } return false; @@ -121,7 +121,7 @@ bool GrClipStackClip::PathNeedsSWRenderer(GrContext* context, canDrawArgs.fClipConservativeBounds = &scissorRect; canDrawArgs.fViewMatrix = &viewMatrix; canDrawArgs.fShape = &shape; - canDrawArgs.fAAType = GrChooseAAType(GrBoolToAA(element->isAA()), + canDrawArgs.fAAType = GrChooseAAType(GrAA(element->isAA()), renderTargetContext->fsaaType(), GrAllowMixedSamples::kYes, *context->caps()); @@ -383,7 +383,7 @@ static void draw_clip_elements_to_mask_helper(GrSWMaskHelper& helper, const Elem for (ElementList::Iter iter(elements); iter.get(); iter.next()) { const Element* element = iter.get(); SkClipOp op = element->getOp(); - GrAA aa = GrBoolToAA(element->isAA()); + GrAA aa = GrAA(element->isAA()); if (kIntersect_SkClipOp == op || kReverseDifference_SkClipOp == op) { // Intersect and reverse difference require modifying pixels outside of the geometry |