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

Unified Diff: trunk/src/core/SkScalerContext.h

Issue 12706010: Add SkTypeface* parameter to SkScalerContext (and its callers) (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 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
Index: trunk/src/core/SkScalerContext.h
===================================================================
--- trunk/src/core/SkScalerContext.h (revision 8166)
+++ trunk/src/core/SkScalerContext.h (working copy)
@@ -12,12 +12,8 @@
#include "SkMaskGamma.h"
#include "SkMatrix.h"
#include "SkPaint.h"
+#include "SkTypeface.h"
-#ifdef SK_BUILD_FOR_ANDROID
- //For SkFontID
- #include "SkTypeface.h"
-#endif
-
struct SkGlyph;
class SkDescriptor;
class SkMaskFilter;
@@ -149,9 +145,11 @@
};
- SkScalerContext(const SkDescriptor* desc);
+ SkScalerContext(SkTypeface*, const SkDescriptor*);
virtual ~SkScalerContext();
+ SkTypeface* getTypeface() const { return fTypeface; }
+
SkMask::Format getMaskFormat() const {
return (SkMask::Format)fRec.fMaskFormat;
}
@@ -197,7 +195,6 @@
const SkMatrix*, Rec* rec);
static inline void PostMakeRec(const SkPaint&, Rec*);
- static SkScalerContext* Create(const SkDescriptor*);
static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec);
protected:
@@ -218,6 +215,7 @@
void forceGenerateImageFromPath() { fGenerateImageFromPath = true; }
private:
+ SkTypeface* fTypeface;
bungeman-skia 2013/03/15 16:12:44 SkAutoTUnref<SkTypeface> would be nice, since it d
reed1 2013/03/15 17:46:44 Done.
SkPathEffect* fPathEffect;
SkMaskFilter* fMaskFilter;
SkRasterizer* fRasterizer;

Powered by Google App Engine
This is Rietveld 408576698