aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/BitmapRegionDecoderBench.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-05-18 06:23:57 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-18 06:23:57 -0700
commitd1227a7417922ce26252d55815d0d1e98f0eb070 (patch)
treee6aa4536de96410f69247c4b3e72e8cab09429ff /bench/BitmapRegionDecoderBench.cpp
parent4803f9715ff02b54a8ebae24167c490181d7cc3f (diff)
Delete SkBitmapRegionCanvas
This was an approach we considered for implementing Android's BitmapRegionDecoder. It was useful for testing and comparison, but now is no longer worth maintaining and testing. The approach to subset/scaled decodes (clipped decode, then scale) may be worth reconsidering at some point. BUG=skia:5307 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1990543002 Review-Url: https://codereview.chromium.org/1990543002
Diffstat (limited to 'bench/BitmapRegionDecoderBench.cpp')
-rw-r--r--bench/BitmapRegionDecoderBench.cpp23
1 files changed, 3 insertions, 20 deletions
diff --git a/bench/BitmapRegionDecoderBench.cpp b/bench/BitmapRegionDecoderBench.cpp
index 125c4a84cf..dd60b18296 100644
--- a/bench/BitmapRegionDecoderBench.cpp
+++ b/bench/BitmapRegionDecoderBench.cpp
@@ -11,34 +11,17 @@
#include "SkOSFile.h"
BitmapRegionDecoderBench::BitmapRegionDecoderBench(const char* baseName, SkData* encoded,
- SkBitmapRegionDecoder::Strategy strategy, SkColorType colorType,
- uint32_t sampleSize, const SkIRect& subset)
+ SkColorType colorType, uint32_t sampleSize, const SkIRect& subset)
: fBRD(nullptr)
, fData(SkRef(encoded))
- , fStrategy(strategy)
, fColorType(colorType)
, fSampleSize(sampleSize)
, fSubset(subset)
{
- // Choose a useful name for the region decoding strategy
- const char* strategyName;
- switch (strategy) {
- case SkBitmapRegionDecoder::kCanvas_Strategy:
- strategyName = "Canvas";
- break;
- case SkBitmapRegionDecoder::kAndroidCodec_Strategy:
- strategyName = "AndroidCodec";
- break;
- default:
- SkASSERT(false);
- strategyName = "";
- break;
- }
-
// Choose a useful name for the color type
const char* colorName = color_type_to_str(colorType);
- fName.printf("BRD_%s_%s_%s", baseName, strategyName, colorName);
+ fName.printf("BRD_%s_%s", baseName, colorName);
if (1 != sampleSize) {
fName.appendf("_%.3f", 1.0f / (float) sampleSize);
}
@@ -53,7 +36,7 @@ bool BitmapRegionDecoderBench::isSuitableFor(Backend backend) {
}
void BitmapRegionDecoderBench::onDelayedSetup() {
- fBRD.reset(SkBitmapRegionDecoder::Create(fData, fStrategy));
+ fBRD.reset(SkBitmapRegionDecoder::Create(fData, SkBitmapRegionDecoder::kAndroidCodec_Strategy));
}
void BitmapRegionDecoderBench::onDraw(int n, SkCanvas* canvas) {