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

Unified Diff: bench/nanobench.cpp

Issue 1230033004: Allow creating multiple scanline decoders. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Progressive scanline decoder needs to handle rewind on first call. Created 5 years, 5 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 f10fd6367bbcecdc3ba5b4b53f798152ace372b1..dbf7124555253066fc07aa8fdc06177b0cef9dc8 100644
--- a/bench/nanobench.cpp
+++ b/bench/nanobench.cpp
@@ -36,6 +36,7 @@
#include "SkOSFile.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
+#include "SkScanlineDecoder.h"
#include "SkString.h"
#include "SkSurface.h"
#include "SkTaskGroup.h"
@@ -512,8 +513,8 @@ static bool valid_subset_bench(const SkString& path, SkColorType colorType, bool
int colorCount;
const SkImageInfo info = codec->getInfo().makeColorType(colorType);
SkAutoTDeleteArray<uint8_t> row(SkNEW_ARRAY(uint8_t, info.minRowBytes()));
- SkScanlineDecoder* scanlineDecoder = codec->getScanlineDecoder(info, NULL,
- colors, &colorCount);
+ SkAutoTDelete<SkScanlineDecoder> scanlineDecoder(codec->getScanlineDecoder(info, NULL,
+ colors, &colorCount));
if (NULL == scanlineDecoder) {
SkDebugf("Could not create scanline decoder for %s with color type %s. "
"Skipping bench.\n", path.c_str(), get_color_name(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