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

Unified Diff: src/gpu/GrBatchFontCache.cpp

Issue 1093083003: Some simple optimizations for improving GrAtlasTextContext perf (Closed) Base URL: https://skia.googlesource.com/skia.git@atdfregen
Patch Set: simple optimizations Created 5 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/gpu/GrBatchFontCache.h ('k') | src/gpu/GrGlyph.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatchFontCache.cpp
diff --git a/src/gpu/GrBatchFontCache.cpp b/src/gpu/GrBatchFontCache.cpp
index 7e44fa52368fd671d45bc717c3a1d628267d0e22..4f27cfcf8cf33a494d4a569ef1fde4011b03f90a 100644
--- a/src/gpu/GrBatchFontCache.cpp
+++ b/src/gpu/GrBatchFontCache.cpp
@@ -202,24 +202,6 @@ void GrBatchTextStrike::removeID(GrBatchAtlas::AtlasID id) {
}
}
-bool GrBatchTextStrike::glyphTooLargeForAtlas(GrGlyph* glyph) {
- int width = glyph->fBounds.width();
- int height = glyph->fBounds.height();
- bool useDistanceField =
- (GrGlyph::kDistance_MaskStyle == GrGlyph::UnpackMaskStyle(glyph->fPackedID));
- int pad = useDistanceField ? 2 * SK_DistanceFieldPad : 0;
- int plotWidth = (kA8_GrMaskFormat == glyph->fMaskFormat) ? GR_FONT_ATLAS_A8_PLOT_WIDTH
- : GR_FONT_ATLAS_PLOT_WIDTH;
- if (width + pad > plotWidth) {
- return true;
- }
- if (height + pad > GR_FONT_ATLAS_PLOT_HEIGHT) {
- return true;
- }
-
- return false;
-}
-
bool GrBatchTextStrike::addGlyphToAtlas(GrBatchTarget* batchTarget, GrGlyph* glyph,
GrFontScaler* scaler) {
SkASSERT(glyph);
« no previous file with comments | « src/gpu/GrBatchFontCache.h ('k') | src/gpu/GrGlyph.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698