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

Unified Diff: trunk/src/core/SkPaint.cpp

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
« no previous file with comments | « trunk/src/core/SkGlyphCache.cpp ('k') | trunk/src/core/SkScalerContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/core/SkPaint.cpp
===================================================================
--- trunk/src/core/SkPaint.cpp (revision 8215)
+++ trunk/src/core/SkPaint.cpp (working copy)
@@ -414,8 +414,9 @@
#include "SkGlyphCache.h"
#include "SkUtils.h"
-static void DetachDescProc(const SkDescriptor* desc, void* context) {
- *((SkGlyphCache**)context) = SkGlyphCache::DetachCache(desc);
+static void DetachDescProc(SkTypeface* typeface, const SkDescriptor* desc,
+ void* context) {
+ *((SkGlyphCache**)context) = SkGlyphCache::DetachCache(typeface, desc);
}
#ifdef SK_BUILD_FOR_ANDROID
@@ -1206,8 +1207,9 @@
return false; // don't detach the cache
}
-static void FontMetricsDescProc(const SkDescriptor* desc, void* context) {
- SkGlyphCache::VisitCache(desc, FontMetricsCacheProc, context);
+static void FontMetricsDescProc(SkTypeface* typeface, const SkDescriptor* desc,
+ void* context) {
+ SkGlyphCache::VisitCache(typeface, desc, FontMetricsCacheProc, context);
}
SkScalar SkPaint::getFontMetrics(FontMetrics* metrics, SkScalar zoom) const {
@@ -1761,7 +1763,7 @@
*/
void SkPaint::descriptorProc(const SkDeviceProperties* deviceProperties,
const SkMatrix* deviceMatrix,
- void (*proc)(const SkDescriptor*, void*),
+ void (*proc)(SkTypeface*, const SkDescriptor*, void*),
void* context, bool ignoreGamma) const {
SkScalerContext::Rec rec;
@@ -1873,7 +1875,7 @@
}
#endif
- proc(desc, context);
+ proc(fTypeface, desc, context);
}
SkGlyphCache* SkPaint::detachCache(const SkDeviceProperties* deviceProperties,
« no previous file with comments | « trunk/src/core/SkGlyphCache.cpp ('k') | trunk/src/core/SkScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698