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

Unified Diff: src/core/SkScalerContext.h

Issue 1872253004: Revert of Pass effects directly to fontcache (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « src/core/SkPaint.cpp ('k') | src/core/SkScalerContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698