aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkFont.h
diff options
context:
space:
mode:
authorGravatar scroggo <scroggo@google.com>2016-05-12 06:22:30 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-05-12 06:22:30 -0700
commit9a9a7b29e5e5916a7b6453cd124ca437f14b9da4 (patch)
treead5b560f6ed5da12040e5665282fd2227c305ff8 /include/core/SkFont.h
parenta1b283345b27fef91908b104a30cb89e6fbdaade (diff)
Revert of Move SkTypeface to sk_sp. (patchset #5 id:80001 of https://codereview.chromium.org/1933393002/ )
Reason for revert: fontmgr_iterAndroid failing to draw emoji. E.g. 6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm">https://gold.skia.org/search2?blame=6296da736fbf40aae881650c239420f64e576c3f&unt=true&head=true&query=source_type%3Dgm Original issue's description: > Move SkTypeface to sk_sp. > > Committed: https://skia.googlesource.com/skia/+/6296da736fbf40aae881650c239420f64e576c3f TBR=reed@google.com,fmalita@chromium.org,tomhudson@google.com,bungeman@google.com # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review-Url: https://codereview.chromium.org/1974783002
Diffstat (limited to 'include/core/SkFont.h')
-rw-r--r--include/core/SkFont.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/core/SkFont.h b/include/core/SkFont.h
index 6c231c963a..e4ebebb244 100644
--- a/include/core/SkFont.h
+++ b/include/core/SkFont.h
@@ -117,17 +117,17 @@ public:
kLCD_MaskType,
};
- static sk_sp<SkFont> Make(sk_sp<SkTypeface>, SkScalar size, MaskType, uint32_t flags);
- static sk_sp<SkFont> Make(sk_sp<SkTypeface>, SkScalar size, SkScalar scaleX, SkScalar skewX,
- MaskType, uint32_t flags);
+ static SkFont* Create(SkTypeface*, SkScalar size, MaskType, uint32_t flags);
+ static SkFont* Create(SkTypeface*, SkScalar size, SkScalar scaleX, SkScalar skewX,
+ MaskType, uint32_t flags);
/**
* Return a font with the same attributes of this font, but with the specified size.
* If size is not supported (e.g. <= 0 or non-finite) NULL will be returned.
*/
- sk_sp<SkFont> makeWithSize(SkScalar size) const;
+ SkFont* cloneWithSize(SkScalar size) const;
- SkTypeface* getTypeface() const { return fTypeface.get(); }
+ SkTypeface* getTypeface() const { return fTypeface; }
SkScalar getSize() const { return fSize; }
SkScalar getScaleX() const { return fScaleX; }
SkScalar getSkewX() const { return fSkewX; }
@@ -145,17 +145,17 @@ public:
SkScalar measureText(const void* text, size_t byteLength, SkTextEncoding) const;
- static sk_sp<SkFont> Testing_CreateFromPaint(const SkPaint&);
+ static SkFont* Testing_CreateFromPaint(const SkPaint&);
private:
enum {
kAllFlags = 0xFF,
};
- SkFont(sk_sp<SkTypeface>, SkScalar size, SkScalar scaleX, SkScalar skewX, MaskType,
- uint32_t flags);
+ SkFont(SkTypeface*, SkScalar size, SkScalar scaleX, SkScalar skewX, MaskType, uint32_t flags);
+ virtual ~SkFont();
- sk_sp<SkTypeface> fTypeface;
+ SkTypeface* fTypeface;
SkScalar fSize;
SkScalar fScaleX;
SkScalar fSkewX;