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

Unified Diff: src/gpu/GrTextContext.cpp

Issue 26253003: Fix for blinking/corrupted text in Canvas 2D. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 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 | « no previous file | src/gpu/GrTextStrike.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTextContext.cpp
diff --git a/src/gpu/GrTextContext.cpp b/src/gpu/GrTextContext.cpp
index 5a6183965cf6422585baa7befa56299138c90488..8178032ae7a6351d9e4c714ef05b04cc0f3b5721 100644
--- a/src/gpu/GrTextContext.cpp
+++ b/src/gpu/GrTextContext.cpp
@@ -153,15 +153,14 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
}
}
- GrDrawTarget::DrawToken drawToken = fDrawTarget->getCurrentDrawToken();
if (NULL == glyph->fPlot) {
- if (fStrike->getGlyphAtlas(glyph, scaler, drawToken)) {
+ if (fStrike->getGlyphAtlas(glyph, scaler)) {
goto HAS_ATLAS;
}
// try to clear out an unused plot before we flush
fContext->getFontCache()->freePlotExceptFor(fStrike);
- if (fStrike->getGlyphAtlas(glyph, scaler, drawToken)) {
+ if (fStrike->getGlyphAtlas(glyph, scaler)) {
goto HAS_ATLAS;
}
@@ -178,7 +177,7 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
// try to purge
fContext->getFontCache()->purgeExceptFor(fStrike);
// need to use new flush count here
- if (fStrike->getGlyphAtlas(glyph, scaler, drawToken)) {
+ if (fStrike->getGlyphAtlas(glyph, scaler)) {
goto HAS_ATLAS;
}
@@ -205,6 +204,8 @@ void GrTextContext::drawPackedGlyph(GrGlyph::PackedID packed,
HAS_ATLAS:
SkASSERT(glyph->fPlot);
+ GrDrawTarget::DrawToken drawToken = fDrawTarget->getCurrentDrawToken();
+ glyph->fPlot->setDrawToken(drawToken);
// now promote them to fixed (TODO: Rethink using fixed pt).
width = SkIntToFixed(width);
« no previous file with comments | « no previous file | src/gpu/GrTextStrike.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698