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

Unified Diff: src/gpu/GrBatchAtlas.h

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/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchFontCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrBatchAtlas.h
diff --git a/src/gpu/GrBatchAtlas.h b/src/gpu/GrBatchAtlas.h
index 77a49ce6993064fced6aadf055629ecafa2cddaa..2b85da1f7d7d2c3083323917d7b7dabedb02f213 100644
--- a/src/gpu/GrBatchAtlas.h
+++ b/src/gpu/GrBatchAtlas.h
@@ -112,6 +112,11 @@ public:
void setLastUseTokenBulk(const BulkUseTokenUpdater& reffer, BatchToken);
+ static const int kGlyphMaxDim = 256;
+ static bool GlyphTooLargeForAtlas(int width, int height) {
+ return width > kGlyphMaxDim || height > kGlyphMaxDim;
+ }
+
private:
static int GetIndexFromID(AtlasID id) {
return id & 0xffff;
« no previous file with comments | « src/gpu/GrAtlasTextContext.cpp ('k') | src/gpu/GrBatchFontCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698