diff options
Diffstat (limited to 'tests/ColorSpaceTest.cpp')
-rw-r--r-- | tests/ColorSpaceTest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/ColorSpaceTest.cpp b/tests/ColorSpaceTest.cpp index 7e247d304d..4a64460370 100644 --- a/tests/ColorSpaceTest.cpp +++ b/tests/ColorSpaceTest.cpp @@ -40,10 +40,15 @@ static void test_space(skiatest::Reporter* r, SkColorSpace* space, } } +static SkStreamAsset* resource(const char path[]) { + SkString fullPath = GetResourcePath(path); + return SkStream::NewFromFile(fullPath.c_str()); +} + static void test_path(skiatest::Reporter* r, const char* path, const float red[], const float green[], const float blue[], const SkGammaNamed expectedGamma) { - SkAutoTDelete<SkStream> stream(GetResourceAsStream(path)); + SkAutoTDelete<SkStream> stream(resource(path)); REPORTER_ASSERT(r, nullptr != stream); if (!stream) { return; |