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>
This commit is contained in:
Ben Wagner 2018-06-15 14:23:36 -04:00 committed by Skia Commit-Bot
parent 6ae5d74e86
commit 9bc36fd06d
2 changed files with 2 additions and 2 deletions

View File

@ -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");
}

View File

@ -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;
}