Index: bench/TextBlobBench.cpp |
diff --git a/bench/TextBlobBench.cpp b/bench/TextBlobBench.cpp |
index 37bf311119118e2dcb532d27435dc4968486dce2..a350e7b4c40f3ee3e32ebfbdfa9d08add7edf2e2 100644 |
--- a/bench/TextBlobBench.cpp |
+++ b/bench/TextBlobBench.cpp |
@@ -23,11 +23,13 @@ |
*/ |
class TextBlobBench : public Benchmark { |
public: |
- TextBlobBench() {} |
+ TextBlobBench() |
+ : fTypeface(nullptr) { |
+ } |
protected: |
void onDelayedSetup() override { |
- fTypeface = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal); |
+ fTypeface.reset(sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal)); |
// make textblob |
SkPaint paint; |
paint.setTypeface(fTypeface); |
@@ -62,9 +64,9 @@ |
private: |
- SkAutoTUnref<const SkTextBlob> fBlob; |
- SkTDArray<uint16_t> fGlyphs; |
- sk_sp<SkTypeface> fTypeface; |
+ SkAutoTUnref<const SkTextBlob> fBlob; |
+ SkTDArray<uint16_t> fGlyphs; |
+ SkAutoTUnref<SkTypeface> fTypeface; |
typedef Benchmark INHERITED; |
}; |