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

Unified Diff: src/gpu/GrAtlas.h

Issue 24608002: First pass at font cache refactor: Create an atlas manager per texture (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Make sure to set the MaskFormat Created 7 years, 3 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
Index: src/gpu/GrAtlas.h
diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h
index e4472e7c13fbe7bc2b5b350f0a29a1159f1334a0..3f9da8cb13703eeea01b5aaa7de95ba9b40f84a9 100644
--- a/src/gpu/GrAtlas.h
+++ b/src/gpu/GrAtlas.h
@@ -64,25 +64,24 @@ class GrPlotMgr;
class GrAtlasMgr {
public:
- GrAtlasMgr(GrGpu*);
+ GrAtlasMgr(GrGpu*, GrMaskFormat);
~GrAtlasMgr();
- GrAtlas* addToAtlas(GrAtlas**, int width, int height, const void*,
- GrMaskFormat, GrIPoint16*);
+ GrAtlas* addToAtlas(GrAtlas**, int width, int height, const void*, GrIPoint16*);
void deleteAtlas(GrAtlas* atlas) { delete atlas; }
- GrTexture* getTexture(GrMaskFormat format) const {
- SkASSERT((unsigned)format < kCount_GrMaskFormats);
- return fTexture[format];
+ GrTexture* getTexture() const {
+ return fTexture;
}
// to be called by ~GrAtlas()
- void freePlot(GrMaskFormat format, int x, int y);
+ void freePlot(int x, int y);
private:
- GrGpu* fGpu;
- GrTexture* fTexture[kCount_GrMaskFormats];
- GrPlotMgr* fPlotMgr[kCount_GrMaskFormats];
+ GrGpu* fGpu;
+ GrMaskFormat fMaskFormat;
+ GrTexture* fTexture;
+ GrPlotMgr* fPlotMgr;
};
#endif
« include/gpu/GrTypes.h ('K') | « include/gpu/GrTypes.h ('k') | src/gpu/GrAtlas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698