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

Unified Diff: src/core/SkPaint.cpp

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/SkGlyphCache.cpp ('k') | src/core/SkScalerContext.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPaint.cpp
diff --git a/src/core/SkPaint.cpp b/src/core/SkPaint.cpp
index 123f20365e6ef2cf96a905e46681be48f684655d..c3bf1ba9ac78750ab15a7b5b204412d475a400c8 100644
--- a/src/core/SkPaint.cpp
+++ b/src/core/SkPaint.cpp
@@ -430,12 +430,13 @@
#include "SkGlyphCache.h"
#include "SkUtils.h"
-static void DetachDescProc(SkTypeface* typeface, const SkScalerContextEffects& effects,
- const SkDescriptor* desc, void* context) {
- *((SkGlyphCache**)context) = SkGlyphCache::DetachCache(typeface, effects, desc);
-}
-
-int SkPaint::textToGlyphs(const void* textData, size_t byteLength, uint16_t glyphs[]) const {
+static void DetachDescProc(SkTypeface* typeface, const SkDescriptor* desc,
+ void* context) {
+ *((SkGlyphCache**)context) = SkGlyphCache::DetachCache(typeface, desc);
+}
+
+int SkPaint::textToGlyphs(const void* textData, size_t byteLength,
+ uint16_t glyphs[]) const {
if (byteLength == 0) {
return 0;
}
@@ -937,9 +938,9 @@
return false; // don't detach the cache
}
-static void FontMetricsDescProc(SkTypeface* typeface, const SkScalerContextEffects& effects,
- const SkDescriptor* desc, void* context) {
- SkGlyphCache::VisitCache(typeface, effects, 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 {
@@ -1647,8 +1648,7 @@
#endif
/* see the note on ignoreGamma on descriptorProc */
-void SkPaint::getScalerContextDescriptor(SkScalerContextEffects* effects,
- SkAutoDescriptor* ad,
+void SkPaint::getScalerContextDescriptor(SkAutoDescriptor* ad,
const SkSurfaceProps& surfaceProps,
uint32_t scalerContextFlags,
const SkMatrix* deviceMatrix) const {
@@ -1674,10 +1674,6 @@
#ifdef TEST_DESC
test_desc(rec, pe, &peBuffer, mf, &mfBuffer, ra, &raBuffer, desc, descSize);
#endif
-
- effects->fPathEffect = pe;
- effects->fMaskFilter = mf;
- effects->fRasterizer = ra;
}
/*
@@ -1688,8 +1684,7 @@
void SkPaint::descriptorProc(const SkSurfaceProps* surfaceProps,
uint32_t scalerContextFlags,
const SkMatrix* deviceMatrix,
- void (*proc)(SkTypeface*, const SkScalerContextEffects&,
- const SkDescriptor*, void*),
+ void (*proc)(SkTypeface*, const SkDescriptor*, void*),
void* context) const {
SkScalerContext::Rec rec;
@@ -1714,7 +1709,7 @@
test_desc(rec, pe, &peBuffer, mf, &mfBuffer, ra, &raBuffer, desc, descSize);
#endif
- proc(fTypeface.get(), { pe, mf, ra }, desc, context);
+ proc(fTypeface.get(), desc, context);
}
SkGlyphCache* SkPaint::detachCache(const SkSurfaceProps* surfaceProps,
« no previous file with comments | « src/core/SkGlyphCache.cpp ('k') | src/core/SkScalerContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698