aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-10-03 14:47:21 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-03 20:03:35 +0000
commitf0ffb8943b7be477b769db23660a80013f3332eb (patch)
tree9aa9b49cf411799b50168bd16aee922bc9b13f8e /bench
parentd140fe910e11edf2496439e39ba6ca15d5bc17db (diff)
Revert[4] "guard old apis for querying byte-size of a bitmap/imageinfo/pixmap"
This reverts commit 5a2e50edc51006ce91366e177a9d21a16775d7fd. Bug: skia: Change-Id: I8d28b5c07d90130e5a1653923740eaf189ecb954 Reviewed-on: https://skia-review.googlesource.com/53900 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'bench')
-rw-r--r--bench/AndroidCodecBench.cpp2
-rw-r--r--bench/CodecBench.cpp2
-rw-r--r--bench/ColorCodecBench.cpp4
-rw-r--r--bench/nanobench.cpp2
4 files changed, 5 insertions, 5 deletions
diff --git a/bench/AndroidCodecBench.cpp b/bench/AndroidCodecBench.cpp
index d9abac63d8..886e875c6d 100644
--- a/bench/AndroidCodecBench.cpp
+++ b/bench/AndroidCodecBench.cpp
@@ -38,7 +38,7 @@ void AndroidCodecBench::onDelayedSetup() {
fInfo = fInfo.makeAlphaType(kPremul_SkAlphaType);
}
- fPixelStorage.reset(fInfo.getSafeSize(fInfo.minRowBytes()));
+ fPixelStorage.reset(fInfo.computeMinByteSize());
}
void AndroidCodecBench::onDraw(int n, SkCanvas* canvas) {
diff --git a/bench/CodecBench.cpp b/bench/CodecBench.cpp
index 29443746f7..708ab60870 100644
--- a/bench/CodecBench.cpp
+++ b/bench/CodecBench.cpp
@@ -43,7 +43,7 @@ void CodecBench::onDelayedSetup() {
.makeAlphaType(fAlphaType)
.makeColorSpace(nullptr);
- fPixelStorage.reset(fInfo.getSafeSize(fInfo.minRowBytes()));
+ fPixelStorage.reset(fInfo.computeMinByteSize());
}
void CodecBench::onDraw(int n, SkCanvas* canvas) {
diff --git a/bench/ColorCodecBench.cpp b/bench/ColorCodecBench.cpp
index 680c1d916f..1239e1d4fe 100644
--- a/bench/ColorCodecBench.cpp
+++ b/bench/ColorCodecBench.cpp
@@ -88,10 +88,10 @@ void ColorCodecBench::onDelayedSetup() {
fDstSpace = static_cast<SkColorSpace_XYZ*>(fDstSpace.get())->makeLinearGamma();
}
- fDst.reset(fDstInfo.getSafeSize(fDstInfo.minRowBytes()));
+ fDst.reset(fDstInfo.computeMinByteSize());
if (FLAGS_xform_only) {
- fSrc.reset(fSrcInfo.getSafeSize(fSrcInfo.minRowBytes()));
+ fSrc.reset(fSrcInfo.computeMinByteSize());
fSrcSpace = codec->getInfo().refColorSpace();
codec->getPixels(fSrcInfo, fSrc.get(), fSrcInfo.minRowBytes());
}
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index 61de8a944e..33d433d9be 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -887,7 +887,7 @@ public:
SkImageInfo info =
codec->getInfo().makeColorType(colorType).makeAlphaType(alphaType);
const size_t rowBytes = info.minRowBytes();
- SkAutoMalloc storage(info.getSafeSize(rowBytes));
+ SkAutoMalloc storage(info.computeByteSize(rowBytes));
const SkCodec::Result result = codec->getPixels(
info, storage.get(), rowBytes);