aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/BitmapRegionDecoderBench.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2015-10-27 12:50:25 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-10-27 12:50:25 -0700
commit35e5d1b4495478ca3bede66914ae07f50a447c4d (patch)
tree1db71991433b478c83d50b36211c4683649c5336 /bench/BitmapRegionDecoderBench.cpp
parentf7c0822911e736940a8690fb0553821561bf8ac7 (diff)
Refactor SkBitmapRegionDecoderInterface for Android
The result SkBitmap, the pixel allocator, and the alpha preference need to be communicated from the client to the region decoder. BUG=skia: Review URL: https://codereview.chromium.org/1418093006
Diffstat (limited to 'bench/BitmapRegionDecoderBench.cpp')
-rw-r--r--bench/BitmapRegionDecoderBench.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/bench/BitmapRegionDecoderBench.cpp b/bench/BitmapRegionDecoderBench.cpp
index 092693619b..70e3e760e0 100644
--- a/bench/BitmapRegionDecoderBench.cpp
+++ b/bench/BitmapRegionDecoderBench.cpp
@@ -61,10 +61,8 @@ void BitmapRegionDecoderBench::onDelayedSetup() {
}
void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) {
- SkAutoTDelete<SkBitmap> bitmap;
for (int i = 0; i < n; i++) {
- bitmap.reset(fBRD->decodeRegion(fSubset.left(), fSubset.top(), fSubset.width(),
- fSubset.height(), fSampleSize, fColorType));
- SkASSERT(nullptr != bitmap.get());
+ SkBitmap bm;
+ SkAssertResult(fBRD->decodeRegion(&bm, nullptr, fSubset, fSampleSize, fColorType, false));
}
}