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

Unified Diff: bench/DecodingBench.h

Issue 1044363002: Add timing SkCodec to nanobench. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: CodecBench decodes to fColorType, as intended. Created 5 years, 9 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/CodecBench.cpp ('k') | bench/DecodingBench.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/DecodingBench.h
diff --git a/bench/DecodingBench.h b/bench/DecodingBench.h
index 80a474df323abafa2568b82443611ce7d3ff59ec..61b90a1235109443683a66762691bee456928fb0 100644
--- a/bench/DecodingBench.h
+++ b/bench/DecodingBench.h
@@ -5,10 +5,15 @@
* found in the LICENSE file.
*/
+#ifndef DecodingBench_DEFINED
+#define DecodingBench_DEFINED
+
#include "Benchmark.h"
+#include "SkBitmap.h"
+#include "SkData.h"
#include "SkImageDecoder.h"
#include "SkImageInfo.h"
-#include "SkStream.h"
+#include "SkRefCnt.h"
#include "SkString.h"
/*
@@ -25,11 +30,13 @@ protected:
const char* onGetName() override;
bool isSuitableFor(Backend backend) override;
void onDraw(const int n, SkCanvas* canvas) override;
-
+ void onPreDraw() override;
+
private:
- SkString fName;
- SkColorType fColorType;
- SkAutoTDelete<SkMemoryStream> fStream;
- SkAutoTDelete<SkImageDecoder> fDecoder;
+ SkString fName;
+ SkColorType fColorType;
+ SkAutoTUnref<SkData> fData;
+ SkBitmap fBitmap;
typedef Benchmark INHERITED;
};
+#endif // DecodingBench_DEFINED
« no previous file with comments | « bench/CodecBench.cpp ('k') | bench/DecodingBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698