Rename GrPipeline::Flags to GrPipeline::InputFlags
Renames the Flags to InputFlags and makes it a strongly typed enum.
Simplifies the relationship between GrSimpleMeshDrawOpHelper::Flags
and GrPipeline::InputFlags.
Bug: skia:
Change-Id: Ia25b8526ff96a47428dfbb82da18dbebdd382c5b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/204906
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrStrokeRectOp.cpp b/src/gpu/ops/GrStrokeRectOp.cpp
index 4aac66d..c7b469c 100644
--- a/src/gpu/ops/GrStrokeRectOp.cpp
+++ b/src/gpu/ops/GrStrokeRectOp.cpp
@@ -117,22 +117,22 @@
if (!allowed_stroke(stroke, GrAA::kNo, &isMiter)) {
return nullptr;
}
- Helper::Flags flags = Helper::Flags::kNone;
+ Helper::InputFlags inputFlags = Helper::InputFlags::kNone;
// Depending on sub-pixel coordinates and the particular GPU, we may lose a corner of
// hairline rects. We jam all the vertices to pixel centers to avoid this, but not
// when MSAA is enabled because it can cause ugly artifacts.
if (stroke.getStyle() == SkStrokeRec::kHairline_Style && aaType != GrAAType::kMSAA) {
- flags |= Helper::Flags::kSnapVerticesToPixelCenters;
+ inputFlags |= Helper::InputFlags::kSnapVerticesToPixelCenters;
}
- return Helper::FactoryHelper<NonAAStrokeRectOp>(context, std::move(paint), flags,
+ return Helper::FactoryHelper<NonAAStrokeRectOp>(context, std::move(paint), inputFlags,
viewMatrix, rect,
stroke, aaType);
}
NonAAStrokeRectOp(const Helper::MakeArgs& helperArgs, const SkPMColor4f& color,
- Helper::Flags flags, const SkMatrix& viewMatrix, const SkRect& rect,
+ Helper::InputFlags inputFlags, const SkMatrix& viewMatrix, const SkRect& rect,
const SkStrokeRec& stroke, GrAAType aaType)
- : INHERITED(ClassID()), fHelper(helperArgs, aaType, flags) {
+ : INHERITED(ClassID()), fHelper(helperArgs, aaType, inputFlags) {
fColor = color;
fViewMatrix = viewMatrix;
fRect = rect;
@@ -145,7 +145,7 @@
bounds.outset(rad, rad);
// If our caller snaps to pixel centers then we have to round out the bounds
- if (flags & Helper::Flags::kSnapVerticesToPixelCenters) {
+ if (inputFlags & Helper::InputFlags::kSnapVerticesToPixelCenters) {
viewMatrix.mapRect(&bounds);
// We want to be consistent with how we snap non-aa lines. To match what we do in
// GrGLSLVertexShaderBuilder, we first floor all the vertex values and then add half a