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

Unified Diff: bench/TextBlobBench.cpp

Issue 1933393002: Move SkTypeface to sk_sp. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Restore deleted Android code. Created 4 years, 7 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/TextBench.cpp ('k') | dm/DM.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: bench/TextBlobBench.cpp
diff --git a/bench/TextBlobBench.cpp b/bench/TextBlobBench.cpp
index a350e7b4c40f3ee3e32ebfbdfa9d08add7edf2e2..37bf311119118e2dcb532d27435dc4968486dce2 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;
};
« no previous file with comments | « bench/TextBench.cpp ('k') | dm/DM.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698