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

Unified Diff: src/gpu/GrBatchAtlas.h

Issue 1713693002: Use unorm shorts for texture coordinates when rendering text. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | « include/gpu/GrTypesPriv.h ('k') | src/gpu/effects/GrBitmapTextGeoProc.cpp » ('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 61fc7e10934c9ccbc4204da520b26ec7d0401e8c..21eda0568d1eaf91fe8cc64e37a4c779e04441c3 100644
--- a/src/gpu/GrBatchAtlas.h
+++ b/src/gpu/GrBatchAtlas.h
@@ -20,6 +20,8 @@ class GrRectanizer;
struct GrBatchAtlasConfig {
int numPlotsX() const { return fWidth / fPlotWidth; }
int numPlotsY() const { return fHeight / fPlotWidth; }
+ int log2Width() const { return SkNextLog2(fWidth); }
+ int log2Height() const { return SkNextLog2(fHeight); }
joshualitt 2016/02/18 20:12:11 is it worth caching these?
jvanverth1 2016/02/18 20:21:20 Yes, that makes sense.
int fWidth;
int fHeight;
int fPlotWidth;
« no previous file with comments | « include/gpu/GrTypesPriv.h ('k') | src/gpu/effects/GrBitmapTextGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698