aboutsummaryrefslogtreecommitdiffhomepage
path: root/bench/TextBlobBench.cpp
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-05-11 12:38:18 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-11 12:38:18 -0700
commit6296da736fbf40aae881650c239420f64e576c3f (patch)
tree5121ecf46ff7099d8eb66d2b2a4671d5ad94db89 /bench/TextBlobBench.cpp
parentc8699321b924c1f284df93cb29b86000c1d73c0a (diff)
Move SkTypeface to sk_sp.
Diffstat (limited to 'bench/TextBlobBench.cpp')
-rw-r--r--bench/TextBlobBench.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/bench/TextBlobBench.cpp b/bench/TextBlobBench.cpp
index a350e7b4c4..37bf311119 100644
--- a/bench/TextBlobBench.cpp
+++ b/bench/TextBlobBench.cpp
@@ -23,13 +23,11 @@
*/
class TextBlobBench : public Benchmark {
public:
- TextBlobBench()
- : fTypeface(nullptr) {
- }
+ TextBlobBench() {}
protected:
void onDelayedSetup() override {
- fTypeface.reset(sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal));
+ fTypeface = sk_tool_utils::create_portable_typeface("serif", SkTypeface::kNormal);
// make textblob
SkPaint paint;
paint.setTypeface(fTypeface);
@@ -64,9 +62,9 @@ protected:
private:
- SkAutoTUnref<const SkTextBlob> fBlob;
- SkTDArray<uint16_t> fGlyphs;
- SkAutoTUnref<SkTypeface> fTypeface;
+ SkAutoTUnref<const SkTextBlob> fBlob;
+ SkTDArray<uint16_t> fGlyphs;
+ sk_sp<SkTypeface> fTypeface;
typedef Benchmark INHERITED;
};