| Index: src/gpu/GrAtlas.h
|
| diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h
|
| index 23cb326fee1acd7139437d00cfe6c78b7ec4c44c..1b0854b85ef7af2c16778fa71e8fb5bbc1a5c515 100644
|
| --- a/src/gpu/GrAtlas.h
|
| +++ b/src/gpu/GrAtlas.h
|
| @@ -41,6 +41,11 @@
|
|
|
| bool addSubImage(int width, int height, const void*, SkIPoint16*);
|
|
|
| + GrDrawTarget::DrawToken drawToken() const { return fDrawToken; }
|
| + void setDrawToken(GrDrawTarget::DrawToken draw) { fDrawToken = draw; }
|
| +
|
| + void uploadToTexture();
|
| +
|
| void resetRects();
|
|
|
| private:
|
| @@ -48,6 +53,9 @@
|
| ~GrPlot(); // does not try to delete the fNext field
|
| void init(GrAtlas* atlas, int id, int offX, int offY, int width, int height, size_t bpp,
|
| bool batchUploads);
|
| +
|
| + // for recycling
|
| + GrDrawTarget::DrawToken fDrawToken;
|
|
|
| int fID;
|
| unsigned char* fPlotData;
|
| @@ -100,9 +108,15 @@
|
| // remove reference to this plot
|
| static void RemovePlot(ClientPlotUsage* usage, const GrPlot* plot);
|
|
|
| + // get a plot that's not being used by the current draw
|
| + // this allows us to overwrite this plot without flushing
|
| + GrPlot* getUnusedPlot();
|
| +
|
| GrTexture* getTexture() const {
|
| return fTexture;
|
| }
|
| +
|
| + void uploadPlotsToTexture();
|
|
|
| enum IterOrder {
|
| kLRUFirst_IterOrder,
|
| @@ -111,7 +125,7 @@
|
|
|
| typedef GrPlotList::Iter PlotIter;
|
| GrPlot* iterInit(PlotIter* iter, IterOrder order) {
|
| - return iter->init(fPlotList, kLRUFirst_IterOrder == order
|
| + return iter->init(fPlotList, kLRUFirst_IterOrder == order
|
| ? GrPlotList::Iter::kTail_IterStart
|
| : GrPlotList::Iter::kHead_IterStart);
|
| }
|
|
|