summaryrefslogtreecommitdiff
path: root/chromium/third_party/skia/gm/gradient_matrix.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/gm/gradient_matrix.cpp')
-rw-r--r--chromium/third_party/skia/gm/gradient_matrix.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/chromium/third_party/skia/gm/gradient_matrix.cpp b/chromium/third_party/skia/gm/gradient_matrix.cpp
index 3c4f8879f85..4306d594bee 100644
--- a/chromium/third_party/skia/gm/gradient_matrix.cpp
+++ b/chromium/third_party/skia/gm/gradient_matrix.cpp
@@ -62,7 +62,7 @@ constexpr SkScalar TESTGRID_Y = SkIntToScalar(200);
constexpr int IMAGES_X = 4; // number of images per row
static sk_sp<SkShader> make_linear_gradient(const SkPoint pts[2], const SkMatrix& localMatrix) {
- return SkGradientShader::MakeLinear(pts, gColors, nullptr, SK_ARRAY_COUNT(gColors),
+ return SkGradientShader::MakeLinear(pts, gColors, nullptr, std::size(gColors),
SkTileMode::kClamp, 0, &localMatrix);
}
@@ -71,7 +71,7 @@ static sk_sp<SkShader> make_radial_gradient(const SkPoint pts[2], const SkMatrix
center.set(SkScalarAve(pts[0].fX, pts[1].fX),
SkScalarAve(pts[0].fY, pts[1].fY));
float radius = (center - pts[0]).length();
- return SkGradientShader::MakeRadial(center, radius, gColors, nullptr, SK_ARRAY_COUNT(gColors),
+ return SkGradientShader::MakeRadial(center, radius, gColors, nullptr, std::size(gColors),
SkTileMode::kClamp, 0, &localMatrix);
}
@@ -110,10 +110,10 @@ static void draw_gradients(SkCanvas* canvas,
DEF_SIMPLE_GM_BG(gradient_matrix, canvas, 800, 800, 0xFFDDDDDD) {
draw_gradients(canvas, &make_linear_gradient,
- linearPts, SK_ARRAY_COUNT(linearPts));
+ linearPts, std::size(linearPts));
canvas->translate(0, TESTGRID_Y);
draw_gradients(canvas, &make_radial_gradient,
- radialPts, SK_ARRAY_COUNT(radialPts));
+ radialPts, std::size(radialPts));
}