aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-06-15 14:23:36 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-15 18:47:05 +0000
commit9bc36fd06d3ab9c2180ad25238268876aa758b69 (patch)
tree3ec227a690d249c95cfc9797563508bb0abfad59 /src
parent6ae5d74e8671fb2a0284d2fd8941d975cc84608c (diff)
Work around signed-unsigned comparison warning.
Change-Id: I751e69ad74fd1ccf27c3533c83de409aea97df36 Reviewed-on: https://skia-review.googlesource.com/135265 Reviewed-by: Greg Daniel <egdaniel@google.com> Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrResourceCache.cpp2
-rw-r--r--src/gpu/ops/GrDrawVerticesOp.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index 4e69444b61..5a72f2e1c2 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -29,7 +29,7 @@ GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() {
static int32_t gType = INHERITED::kInvalidDomain + 1;
int32_t type = sk_atomic_inc(&gType);
- if (type > UINT16_MAX) {
+ if (type > SkTo<int32_t>(UINT16_MAX)) {
SK_ABORT("Too many Resource Types");
}
diff --git a/src/gpu/ops/GrDrawVerticesOp.cpp b/src/gpu/ops/GrDrawVerticesOp.cpp
index 55d97f6866..4103387551 100644
--- a/src/gpu/ops/GrDrawVerticesOp.cpp
+++ b/src/gpu/ops/GrDrawVerticesOp.cpp
@@ -276,7 +276,7 @@ bool GrDrawVerticesOp::onCombineIfPossible(GrOp* t, const GrCaps& caps) {
return false;
}
- if (fVertexCount + that->fVertexCount > UINT16_MAX) {
+ if (fVertexCount + that->fVertexCount > SkTo<int>(UINT16_MAX)) {
return false;
}