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

Unified Diff: bench/nanobench.cpp

Issue 1365313002: Merge SkCodec with SkScanlineDecoder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Skip ICO in SkScaledCodec for now Created 5 years, 3 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 | « no previous file | bench/subset/SubsetSingleBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/nanobench.cpp
diff --git a/bench/nanobench.cpp b/bench/nanobench.cpp
index a1db0acd80b4e6616b87ae8261cb51a570618e0e..900ba4dfa27724c6d312280f47c6356e9f4c523a 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -38,7 +38,6 @@
#include "SkOSFile.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
-#include "SkScanlineDecoder.h"
#include "SkString.h"
#include "SkSurface.h"
#include "SkTaskGroup.h"
@@ -522,9 +521,7 @@ static bool valid_subset_bench(const SkString& path, SkColorType colorType, bool
int colorCount;
const SkImageInfo info = codec->getInfo().makeColorType(colorType);
SkAutoTDeleteArray<uint8_t> row(new uint8_t[info.minRowBytes()]);
- SkAutoTDelete<SkScanlineDecoder> scanlineDecoder(SkScanlineDecoder::NewFromData(encoded));
- if (nullptr == scanlineDecoder || scanlineDecoder->start(info, nullptr,
- colors, &colorCount) != SkCodec::kSuccess)
+ if (codec->startScanlineDecode(info, nullptr, colors, &colorCount) != SkCodec::kSuccess)
{
SkDebugf("Could not create scanline decoder for %s with color type %s. "
"Skipping bench.\n", path.c_str(), color_type_to_str(colorType));
« no previous file with comments | « no previous file | bench/subset/SubsetSingleBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698