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

Unified Diff: src/core/SkPaint.cpp

Issue 2290653002: change readTypeface to return sk_sp (Closed)
Patch Set: Created 4 years, 4 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 | src/core/SkReadBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 44b2928c25bb7b4cbf1c318f5f7bfee898472946..58d6a0f95c94d05d1bade46c19815d3d3959a490 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -1958,7 +1958,7 @@ void SkPaint::unflatten(SkReadBuffer& buffer) {
this->setTextEncoding(static_cast<TextEncoding>((tmp >> 0) & 0xFF));
if (flatFlags & kHasTypeface_FlatFlag) {
- this->setTypeface(sk_ref_sp(buffer.readTypeface()));
+ this->setTypeface(buffer.readTypeface());
} else {
this->setTypeface(nullptr);
}
« no previous file with comments | « no previous file | src/core/SkReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698