Index: src/core/SkScalerContext.h |
diff --git a/src/core/SkScalerContext.h b/src/core/SkScalerContext.h |
index ffde83cb0a9e456f6baf035ca7feb8358983069b..96674cd5002a8934df2af4a9933834d7345bf1ad 100644 |
--- a/src/core/SkScalerContext.h |
+++ b/src/core/SkScalerContext.h |
@@ -19,16 +19,6 @@ |
class SkMaskFilter; |
class SkPathEffect; |
class SkRasterizer; |
- |
-struct SkScalerContextEffects { |
- SkScalerContextEffects() : fPathEffect(nullptr), fMaskFilter(nullptr), fRasterizer(nullptr) {} |
- SkScalerContextEffects(SkPathEffect* pe, SkMaskFilter* mf, SkRasterizer* ra) |
- : fPathEffect(pe), fMaskFilter(mf), fRasterizer(ra) {} |
- |
- SkPathEffect* fPathEffect; |
- SkMaskFilter* fMaskFilter; |
- SkRasterizer* fRasterizer; |
-}; |
enum SkAxisAlignment { |
kNone_SkAxisAlignment, |
@@ -210,7 +200,8 @@ |
kHinting_Mask = kHintingBit1_Flag | kHintingBit2_Flag, |
}; |
- SkScalerContext(SkTypeface*, const SkScalerContextEffects&, const SkDescriptor*); |
+ |
+ SkScalerContext(SkTypeface*, const SkDescriptor*); |
virtual ~SkScalerContext(); |
SkTypeface* getTypeface() const { return fTypeface.get(); } |
@@ -269,16 +260,13 @@ |
const Rec& getRec() const { return fRec; } |
- SkScalerContextEffects getEffects() const { |
- return { fPathEffect.get(), fMaskFilter.get(), fRasterizer.get() }; |
- } |
- |
/** |
* Return the axis (if any) that the baseline for horizontal text should land on. |
* As an example, the identity matrix will return kX_SkAxisAlignment |
*/ |
SkAxisAlignment computeAxisAlignmentForHText(); |
+ |
protected: |
Rec fRec; |
@@ -338,12 +326,12 @@ |
friend class SkRandomScalerContext; // For debug purposes |
// never null |
- sk_sp<SkTypeface> fTypeface; |
- |
- // optional objects, which may be null |
- sk_sp<SkPathEffect> fPathEffect; |
- sk_sp<SkMaskFilter> fMaskFilter; |
- sk_sp<SkRasterizer> fRasterizer; |
+ SkAutoTUnref<SkTypeface> fTypeface; |
+ |
+ // optional object, which may be null |
+ SkPathEffect* fPathEffect; |
+ SkMaskFilter* fMaskFilter; |
+ SkRasterizer* fRasterizer; |
// if this is set, we draw the image from a path, rather than |
// calling generateImage. |