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

Unified Diff: src/gpu/GrAtlas.h

Issue 21594005: GPU Font Cache improvements: (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Remove some added spaces Created 7 years, 5 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/GrAtlas.cpp » ('j') | src/gpu/GrTextStrike.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlas.h
diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h
index 40a21545e15e6e7d1d089a3eba6db51c274eb441..18dad18fb3803599706efaa3792f11569f594cd5 100644
--- a/src/gpu/GrAtlas.h
+++ b/src/gpu/GrAtlas.h
@@ -20,8 +20,6 @@ class GrAtlasMgr;
class GrAtlas {
public:
- GrAtlas(GrAtlasMgr*, int plotX, int plotY, GrMaskFormat);
-
int getPlotX() const { return fPlot.fX; }
int getPlotY() const { return fPlot.fY; }
GrMaskFormat getMaskFormat() const { return fMaskFormat; }
@@ -40,11 +38,16 @@ public:
// testing
GrAtlas* nextAtlas() const { return fNext; }
+
robertphillips 2013/08/02 15:23:50 Does this need to be out here with the availabilit
bsalomon 2013/08/02 15:30:35 I'd feel better if this and fUsed were private, ev
jvanverth1 2013/08/02 21:49:27 Done.
+ GrAtlas* fNext;
+
+ // for recycling
+ bool fUsed;
private:
+ GrAtlas(GrAtlasMgr*, int plotX, int plotY, GrMaskFormat format);
~GrAtlas(); // does not try to delete the fNext field
- GrAtlas* fNext;
GrTexture* fTexture;
GrRectanizer* fRects;
GrAtlasMgr* fAtlasMgr;
@@ -61,8 +64,9 @@ public:
GrAtlasMgr(GrGpu*);
~GrAtlasMgr();
- GrAtlas* addToAtlas(GrAtlas*, int width, int height, const void*,
+ GrAtlas* addToAtlas(GrAtlas**, int width, int height, const void*,
GrMaskFormat, GrIPoint16*);
+ void deleteAtlas(GrAtlas* atlas) { delete atlas; }
GrTexture* getTexture(GrMaskFormat format) const {
GrAssert((unsigned)format < kCount_GrMaskFormats);
@@ -70,12 +74,12 @@ public:
}
// to be called by ~GrAtlas()
- void freePlot(int x, int y);
+ void freePlot(GrMaskFormat format, int x, int y);
private:
GrGpu* fGpu;
GrTexture* fTexture[kCount_GrMaskFormats];
- GrPlotMgr* fPlotMgr;
+ GrPlotMgr* fPlotMgr[kCount_GrMaskFormats];
};
#endif
« no previous file with comments | « no previous file | src/gpu/GrAtlas.cpp » ('j') | src/gpu/GrTextStrike.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698