From 936b73424f7393994be832376287da988a52b993 Mon Sep 17 00:00:00 2001 From: caryclark Date: Fri, 11 Jul 2014 12:14:51 -0700 Subject: ios fixes skia_ios.mm Get the app's Documents directory and pass use it to set the resource path. This is a quick hack which will be replaced by a new application that is a tiny shim around a command line tool. SkImageEncoder.h SkForceLinking.cpp SkImageDecoder_CG.cpp Add support for FORCE_LINKING so iOS sees the PNG encoder and others. SkFloatBits.cpp SkPoint.cpp Handle denormalized numbers that are floored by the iOS ARM processor. SkImageDecoder_iOS.mm Remove empty encoder factory. SkTouchGesture.cpp Return early on empty state on touch rather than aborting (crashing) JpegTest.cpp Hal via stackoverflow.com says partial jpegs can be gray as well. skia_test.cpp Remove crash handler call for now to avoid link failure. OverwriteLine.h Remove fancy line overwrite for iOS. Resources.cpp Add interface to set resource directory based on runtime query. BUG=skia:2736 skia:2737 skia:2738 R=reed@google.com, halcanary@google.com, mtklein@google.com, tfarina@chromium.org Author: caryclark@google.com Review URL: https://codereview.chromium.org/373383003 --- tests/JpegTest.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/JpegTest.cpp b/tests/JpegTest.cpp index 2897883da3..f8784a2d26 100644 --- a/tests/JpegTest.cpp +++ b/tests/JpegTest.cpp @@ -437,8 +437,13 @@ DEF_TEST(Jpeg, reporter) { REPORTER_ASSERT(reporter, bm8888.getColor(27, 34) == 0xffffffff); REPORTER_ASSERT(reporter, bm8888.getColor(71, 18) == 0xff000000); +#ifdef SK_BUILD_FOR_IOS // the iOS jpeg decoder fills to gray + REPORTER_ASSERT(reporter, bm8888.getColor(127, 127) == 0xff808080 + || bm8888.getColor(127, 127) == SK_ColorWHITE); +#else // This is the fill color REPORTER_ASSERT(reporter, bm8888.getColor(127, 127) == SK_ColorWHITE); +#endif #if JPEG_TEST_WRITE_TO_FILE_FOR_DEBUGGING // Check to see that the resulting bitmap is nice -- cgit v1.2.3