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

Unified Diff: src/fonts/SkGScalerContext.cpp

Issue 21142004: support SK_FONTHOST_USES_FONTMGR on mac (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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/fonts/SkGScalerContext.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/fonts/SkGScalerContext.cpp
diff --git a/src/fonts/SkGScalerContext.cpp b/src/fonts/SkGScalerContext.cpp
index ab0dce56870141623a29e3514adc2b0826ca5540..882c70b1214b0750ca0537d3ecafadb36cb559f5 100644
--- a/src/fonts/SkGScalerContext.cpp
+++ b/src/fonts/SkGScalerContext.cpp
@@ -211,6 +211,15 @@ size_t SkGTypeface::onGetTableData(SkFontTableTag tag, size_t offset,
return fProxy->getTableData(tag, offset, length, data);
}
+SkTypeface* SkGTypeface::onRefMatchingStyle(Style style) const {
+ if (this->style() == style) {
+ return const_cast<SkGTypeface*>(SkRef(this));
+ }
+
+ SkAutoTUnref<SkTypeface> other(fProxy->refMatchingStyle(style));
+ return SkNEW_ARGS(SkGTypeface, (other, fPaint));
+}
+
///////////////////////////////////////////////////////////////////////////////
#if 0
« no previous file with comments | « src/fonts/SkGScalerContext.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698