diff options
author | Mike Reed <reed@google.com> | 2017-08-28 13:32:37 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-28 17:54:06 +0000 |
commit | 3c2d09f89ae119de506722f550a6e28305d4813f (patch) | |
tree | 15ec5a80e6d3292bef61fea74d8fedf4b8790309 /src/gpu/ops | |
parent | de67a2c0e01a68ca8bb3a569947f8e33350f31f7 (diff) |
change SkRect::growToInclude to take a point instead of x,y
This avoids the dangerous overload problem of
growToInclude(0, 0)
matching to (const SkPoint[], count) rather than growToInclude(x, y)
Bug: skia:
Change-Id: Iaba8b1a579638ff363fde62e4e3004052dd2b2ac
Reviewed-on: https://skia-review.googlesource.com/39501
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/gpu/ops')
-rw-r--r-- | src/gpu/ops/GrAAHairLinePathRenderer.cpp | 2 | ||||
-rw-r--r-- | src/gpu/ops/GrDrawAtlasOp.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu/ops/GrAAHairLinePathRenderer.cpp b/src/gpu/ops/GrAAHairLinePathRenderer.cpp index c5479b7849..e00ca3fd5d 100644 --- a/src/gpu/ops/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/ops/GrAAHairLinePathRenderer.cpp @@ -726,7 +726,7 @@ bool check_bounds(const SkMatrix& viewMatrix, const SkRect& devBounds, void* ver actualBounds.set(pos.fX, pos.fY, pos.fX, pos.fY); first = false; } else { - actualBounds.growToInclude(pos.fX, pos.fY); + actualBounds.growToInclude(pos); } } if (!first) { diff --git a/src/gpu/ops/GrDrawAtlasOp.cpp b/src/gpu/ops/GrDrawAtlasOp.cpp index 6659c6a633..47ebbd5607 100644 --- a/src/gpu/ops/GrDrawAtlasOp.cpp +++ b/src/gpu/ops/GrDrawAtlasOp.cpp @@ -82,25 +82,25 @@ GrDrawAtlasOp::GrDrawAtlasOp(const Helper::MakeArgs& helperArgs, GrColor color, *(reinterpret_cast<SkPoint*>(currVertex)) = quad[0]; *(reinterpret_cast<SkPoint*>(currVertex + texOffset)) = SkPoint::Make(currRect.fLeft, currRect.fTop); - bounds.growToInclude(quad[0].fX, quad[0].fY); + bounds.growToInclude(quad[0]); currVertex += vertexStride; *(reinterpret_cast<SkPoint*>(currVertex)) = quad[1]; *(reinterpret_cast<SkPoint*>(currVertex + texOffset)) = SkPoint::Make(currRect.fRight, currRect.fTop); - bounds.growToInclude(quad[1].fX, quad[1].fY); + bounds.growToInclude(quad[1]); currVertex += vertexStride; *(reinterpret_cast<SkPoint*>(currVertex)) = quad[2]; *(reinterpret_cast<SkPoint*>(currVertex + texOffset)) = SkPoint::Make(currRect.fRight, currRect.fBottom); - bounds.growToInclude(quad[2].fX, quad[2].fY); + bounds.growToInclude(quad[2]); currVertex += vertexStride; *(reinterpret_cast<SkPoint*>(currVertex)) = quad[3]; *(reinterpret_cast<SkPoint*>(currVertex + texOffset)) = SkPoint::Make(currRect.fLeft, currRect.fBottom); - bounds.growToInclude(quad[3].fX, quad[3].fY); + bounds.growToInclude(quad[3]); currVertex += vertexStride; } |