Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2472)

Unified Diff: bench/BitmapRegionDecoderBench.cpp

Issue 1990543002: Delete SkBitmapRegionCanvas (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Preserve old name of tests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « bench/BitmapRegionDecoderBench.h ('k') | bench/nanobench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/BitmapRegionDecoderBench.cpp
diff --git a/bench/BitmapRegionDecoderBench.cpp b/bench/BitmapRegionDecoderBench.cpp
index 125c4a84cf887a0624ed7e4d0632c2188614f70f..dd60b18296111ebb13bf7baf300a6ecab5f6d3fd 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) {
« no previous file with comments | « bench/BitmapRegionDecoderBench.h ('k') | bench/nanobench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698