Remove dependency on src/android from dm and nanobench
BUG=skia:
Review URL: https://codereview.chromium.org/1443033002
diff --git a/bench/BitmapRegionDecoderBench.cpp b/bench/BitmapRegionDecoderBench.cpp
index a98dbb0..125c4a8 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 @@
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);
}
}
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 2587b0d..403252b 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -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 @@
}
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 @@
}
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 c9178c0..75f954f 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 @@
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 @@
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 ae00e0c..825ea4f 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 2ff2093..96bd385 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 2d23830..aac107b 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 d7423b0..baa891e 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,