diff options
author | Hal Canary <halcanary@google.com> | 2018-06-14 16:17:29 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-14 16:17:38 +0000 |
commit | ab17347df32807cabd9f2a518d22c3bd420e482f (patch) | |
tree | 02cca902ae0fefc6a629340a7a95192e427353c9 /tests | |
parent | b94097f315fb28c01f7b49d0e9f5b8ddf6a8fe5e (diff) |
Revert "Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines."
This reverts commit e1bc7de7c07686b28b00b850e44e0722189f3592.
Reason for revert: chrome used it
Original change's description:
> Remove SK_MaxSizeT, SK_M{in|ax}U{16|32}, #defines.
>
> sed 's/SK_MaxSizeT/SIZE_MAX/g'
> sed 's/SK_MaxU32/UINT32_MAX/g'
> sed 's/SK_MaxU16/UINT16_MAX/g'
>
> SK_MinU32 and SK_MinU16 were unused
>
> Change-Id: I6b6c824df47b05bde7e73b13a58e851a5f63fe0e
> Reviewed-on: https://skia-review.googlesource.com/134607
> Commit-Queue: Hal Canary <halcanary@google.com>
> Reviewed-by: Ben Wagner <bungeman@google.com>
TBR=halcanary@google.com,bungeman@google.com,reed@google.com
Change-Id: I1e2c440dcf9f59bf87c1fea113248cd5136f7519
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/134921
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PDFGlyphsToUnicodeTest.cpp | 2 | ||||
-rw-r--r-- | tests/ResourceCacheTest.cpp | 2 | ||||
-rw-r--r-- | tests/StringTest.cpp | 2 | ||||
-rw-r--r-- | tests/VerticesTest.cpp | 4 |
4 files changed, 5 insertions, 5 deletions
diff --git a/tests/PDFGlyphsToUnicodeTest.cpp b/tests/PDFGlyphsToUnicodeTest.cpp index ab520eba78..cf69705eb1 100644 --- a/tests/PDFGlyphsToUnicodeTest.cpp +++ b/tests/PDFGlyphsToUnicodeTest.cpp @@ -15,7 +15,7 @@ #include "SkStream.h" #include "SkTo.h" -static const int kMaximumGlyphCount = UINT16_MAX + 1; +static const int kMaximumGlyphCount = SK_MaxU16 + 1; static bool stream_equals(const SkDynamicMemoryWStream& stream, size_t offset, const char* buffer, size_t len) { diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index 113945b414..b6ccd515c2 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -1094,7 +1094,7 @@ static void test_timestamp_wrap(skiatest::Reporter* reporter) { GrGpu* gpu = context->contextPriv().getGpu(); // Pick a random number of resources to add before the timestamp will wrap. - cache->changeTimestamp(UINT32_MAX - random.nextULessThan(kCount + 1)); + cache->changeTimestamp(SK_MaxU32 - random.nextULessThan(kCount + 1)); static const int kNumToPurge = kCount - kBudgetCnt; diff --git a/tests/StringTest.cpp b/tests/StringTest.cpp index 503dbb8158..f8c319e9be 100644 --- a/tests/StringTest.cpp +++ b/tests/StringTest.cpp @@ -300,7 +300,7 @@ DEF_TEST(String_Threaded, r) { // let us create a string with a requested length longer than we can manage. DEF_TEST(String_huge, r) { // start testing slightly below max 32 - size_t size = UINT32_MAX - 16; + size_t size = SK_MaxU32 - 16; // See where we crash, and manually check that its at the right point. // // To test, change the false to true diff --git a/tests/VerticesTest.cpp b/tests/VerticesTest.cpp index b38a9de8ba..59d06472ac 100644 --- a/tests/VerticesTest.cpp +++ b/tests/VerticesTest.cpp @@ -91,13 +91,13 @@ DEF_TEST(Vertices, reporter) { { // This has the maximum number of vertices to be rewritten as indexed triangles without // overflowing a 16bit index. - SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, UINT16_MAX + 1, 0, + SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, SK_MaxU16 + 1, 0, SkVertices::kHasColors_BuilderFlag); REPORTER_ASSERT(reporter, builder.isValid()); } { // This has too many to be rewritten. - SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, UINT16_MAX + 2, 0, + SkVertices::Builder builder(SkVertices::kTriangleFan_VertexMode, SK_MaxU16 + 2, 0, SkVertices::kHasColors_BuilderFlag); REPORTER_ASSERT(reporter, !builder.isValid()); } |