From 3b51df12119d82661ed64efa87d5ccfe2d32f625 Mon Sep 17 00:00:00 2001 From: Chris Dalton Date: Mon, 27 Nov 2017 14:33:06 -0700 Subject: 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 Reviewed-by: Brian Salomon --- src/gpu/ops/GrOp.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/gpu/ops') diff --git a/src/gpu/ops/GrOp.h b/src/gpu/ops/GrOp.h index ece868fd44..5f6177009a 100644 --- a/src/gpu/ops/GrOp.h +++ b/src/gpu/ops/GrOp.h @@ -164,17 +164,17 @@ protected: * purpose of ensuring that the fragment shader runs on partially covered pixels for * non-MSAA antialiasing. */ - enum class HasAABloat { - kYes, - kNo + enum class HasAABloat : bool { + kNo = false, + kYes = true }; /** * Indicates that the geometry represented by the op has zero area (e.g. it is hairline or * points). */ - enum class IsZeroArea { - kYes, - kNo + enum class IsZeroArea : bool { + kNo = false, + kYes = true }; void setBounds(const SkRect& newBounds, HasAABloat aabloat, IsZeroArea zeroArea) { -- cgit v1.2.3