From c57354418b70b4708cfaecbf97edad16f8da66b8 Mon Sep 17 00:00:00 2001 From: Ankur Mittal Date: Thu, 3 May 2018 14:02:56 -0700 Subject: [PATCH] Fix skia compilation error UINT16_MAX is unsigned int. cast it to int before using it with other int variables Change-Id: I77d88a8d3011424a05ab54201c815ce38f9854ca Reviewed-on: https://skia-review.googlesource.com/125805 Reviewed-by: Brian Osman Commit-Queue: Brian Osman --- src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp index 2fcb9cd09c..2176e0914b 100644 --- a/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp +++ b/src/gpu/ops/GrAALinearizingConvexPathRenderer.cpp @@ -271,7 +271,7 @@ private: } int currentIndices = tess.numIndices(); - if (indexCount + currentIndices > UINT16_MAX) { + if (indexCount + currentIndices > static_cast(UINT16_MAX)) { // if we added the current instance, we would overflow the indices we can store in a // uint16_t. Draw what we've got so far and reset. this->draw(target, gp.get(), pipeline, vertexCount, vertexStride, vertices,