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

Unified Diff: src/gpu/text/GrAtlasTextBlob.cpp

Issue 1993213003: Make GrAtlasTextBlob::run own effects it points to. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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/gpu/text/GrAtlasTextBlob.h ('k') | src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/text/GrAtlasTextBlob.cpp
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index 54af7af87a2d32944fb39f73466b5c6e2486bd67..13c96b5e645f08542eb5aa6ca9147f3685c75430 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -58,9 +58,13 @@ SkGlyphCache* GrAtlasTextBlob::setupCache(int runIndex,
// if we have an override descriptor for the run, then we should use that
SkAutoDescriptor* desc = run->fOverrideDescriptor.get() ? run->fOverrideDescriptor.get() :
&run->fDescriptor;
- skPaint.getScalerContextDescriptor(&run->fEffects, desc, props, scalerContextFlags, viewMatrix);
+ SkScalerContextEffects effects;
+ skPaint.getScalerContextDescriptor(&effects, desc, props, scalerContextFlags, viewMatrix);
run->fTypeface.reset(SkSafeRef(skPaint.getTypeface()));
- return SkGlyphCache::DetachCache(run->fTypeface, run->fEffects, desc->getDesc());
+ run->fPathEffect = sk_ref_sp(effects.fPathEffect);
+ run->fRasterizer = sk_ref_sp(effects.fRasterizer);
+ run->fMaskFilter = sk_ref_sp(effects.fMaskFilter);
+ return SkGlyphCache::DetachCache(run->fTypeface, effects, desc->getDesc());
}
void GrAtlasTextBlob::appendGlyph(int runIndex,
« no previous file with comments | « src/gpu/text/GrAtlasTextBlob.h ('k') | src/gpu/text/GrAtlasTextBlob_regenInBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698