diff options
author | msarett <msarett@google.com> | 2015-11-13 09:59:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-13 09:59:11 -0800 |
commit | 4b0778ec491513d1dab752fddb7520aac19ad47b (patch) | |
tree | eaf44cd5c02fb693cececa29a2e3e05cdf6855e1 | |
parent | e659a581f63fdccb64dce2dc8a478cf56831feea (diff) |
Remove dependency on src/android from dm and nanobench
BUG=skia:
Review URL: https://codereview.chromium.org/1443033002
-rw-r--r-- | bench/BitmapRegionDecoderBench.cpp | 3 | ||||
-rw-r--r-- | dm/DM.cpp | 5 | ||||
-rw-r--r-- | dm/DMSrcSink.cpp | 5 | ||||
-rw-r--r-- | gyp/bench.gypi | 1 | ||||
-rw-r--r-- | gyp/dm.gypi | 1 | ||||
-rw-r--r-- | gyp/visualbench.gyp | 1 | ||||
-rw-r--r-- | src/android/SkBitmapRegionDecoderPriv.h | 4 |
7 files changed, 5 insertions, 15 deletions
diff --git a/bench/BitmapRegionDecoderBench.cpp b/bench/BitmapRegionDecoderBench.cpp index a98dbb0cc5..125c4a84cf 100644 --- a/bench/BitmapRegionDecoderBench.cpp +++ b/bench/BitmapRegionDecoderBench.cpp @@ -8,7 +8,6 @@ #include "BitmapRegionDecoderBench.h" #include "CodecBenchPriv.h" #include "SkBitmap.h" -#include "SkBitmapRegionDecoderPriv.h" #include "SkOSFile.h" BitmapRegionDecoderBench::BitmapRegionDecoderBench(const char* baseName, SkData* encoded, @@ -41,7 +40,7 @@ BitmapRegionDecoderBench::BitmapRegionDecoderBench(const char* baseName, SkData* fName.printf("BRD_%s_%s_%s", baseName, strategyName, colorName); if (1 != sampleSize) { - fName.appendf("_%.3f", get_scale_from_sample_size(sampleSize)); + fName.appendf("_%.3f", 1.0f / (float) sampleSize); } } @@ -12,7 +12,6 @@ #include "OverwriteLine.h" #include "ProcStats.h" #include "SkBBHFactory.h" -#include "SkBitmapRegionDecoderPriv.h" #include "SkChecksum.h" #include "SkCodec.h" #include "SkCommonFlags.h" @@ -285,7 +284,7 @@ static void push_android_codec_src(Path path, AndroidCodecSrc::Mode mode, } if (1 != sampleSize) { - folder.appendf("_%.3f", get_scale_from_sample_size(sampleSize)); + folder.appendf("_%.3f", 1.0f / (float) sampleSize); } AndroidCodecSrc* src = new AndroidCodecSrc(path, mode, dstColorType, sampleSize); @@ -441,7 +440,7 @@ static void push_brd_src(Path path, SkBitmapRegionDecoder::Strategy strategy, } if (1 != sampleSize) { - folder.appendf("_%.3f", get_scale_from_sample_size(sampleSize)); + folder.appendf("_%.3f", 1.0f / (float) sampleSize); } BRDSrc* src = new BRDSrc(path, strategy, mode, dstColorType, sampleSize); diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index c9178c06dc..75f954f453 100644 --- a/dm/DMSrcSink.cpp +++ b/dm/DMSrcSink.cpp @@ -8,7 +8,6 @@ #include "DMSrcSink.h" #include "SamplePipeControllers.h" #include "SkAndroidCodec.h" -#include "SkBitmapRegionDecoderPriv.h" #include "SkCodec.h" #include "SkCommonFlags.h" #include "SkData.h" @@ -228,7 +227,7 @@ Name BRDSrc::name() const { if (1 == fSampleSize) { return SkOSPath::Basename(fPath.c_str()); } - return get_scaled_name(fPath, get_scale_from_sample_size(fSampleSize)); + return get_scaled_name(fPath, 1.0f / (float) fSampleSize); } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ @@ -761,7 +760,7 @@ Name AndroidCodecSrc::name() const { if (1 == fSampleSize) { return SkOSPath::Basename(fPath.c_str()); } - return get_scaled_name(fPath, get_scale_from_sample_size(fSampleSize)); + return get_scaled_name(fPath, 1.0f / (float) fSampleSize); } /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/ diff --git a/gyp/bench.gypi b/gyp/bench.gypi index ae00e0cba6..825ea4f693 100644 --- a/gyp/bench.gypi +++ b/gyp/bench.gypi @@ -7,7 +7,6 @@ '../bench/subset', '../bench', '../include/private', - '../src/android', '../src/core', '../src/effects', '../src/gpu', diff --git a/gyp/dm.gypi b/gyp/dm.gypi index 2ff209369f..96bd385037 100644 --- a/gyp/dm.gypi +++ b/gyp/dm.gypi @@ -8,7 +8,6 @@ '../dm', '../gm', '../include/private', - '../src/android', '../src/core', '../src/effects', '../src/images', diff --git a/gyp/visualbench.gyp b/gyp/visualbench.gyp index 2d238305d3..aac107b3f4 100644 --- a/gyp/visualbench.gyp +++ b/gyp/visualbench.gyp @@ -18,7 +18,6 @@ '../bench', '../include/gpu', '../include/private', - '../src/android', '../src/core', '../src/effects', '../src/images', diff --git a/src/android/SkBitmapRegionDecoderPriv.h b/src/android/SkBitmapRegionDecoderPriv.h index d7423b05fd..baa891e9c3 100644 --- a/src/android/SkBitmapRegionDecoderPriv.h +++ b/src/android/SkBitmapRegionDecoderPriv.h @@ -8,10 +8,6 @@ #ifndef SkBitmapRegionDecoderPriv_DEFINED #define SkBitmapRegionDecoderPriv_DEFINED -inline float get_scale_from_sample_size(uint32_t sampleSize) { - return 1.0f / (float) sampleSize; -} - enum SubsetType { kFullyInside_SubsetType, kPartiallyInside_SubsetType, |