| Index: src/gpu/GrAtlas.h
|
| diff --git a/src/gpu/GrAtlas.h b/src/gpu/GrAtlas.h
|
| index 9ccbc53bc605331dcab16725f6658862eb870f3d..1e91d1e90ee111833cf0c3a83fe0c71e4960dce3 100644
|
| --- a/src/gpu/GrAtlas.h
|
| +++ b/src/gpu/GrAtlas.h
|
| @@ -81,6 +81,12 @@ public:
|
| public:
|
| bool isEmpty() const { return 0 == fPlots.count(); }
|
|
|
| +#ifdef SK_DEBUG
|
| + bool contains(const GrPlot* plot) const {
|
| + return fPlots.contains(const_cast<GrPlot*>(plot));
|
| + }
|
| +#endif
|
| +
|
| private:
|
| SkTDArray<GrPlot*> fPlots;
|
|
|
| @@ -112,6 +118,18 @@ public:
|
|
|
| void uploadPlotsToTexture();
|
|
|
| + enum IterOrder {
|
| + kLRUFirst_IterOrder,
|
| + kMRUFirst_IterOrder
|
| + };
|
| +
|
| + typedef GrPlotList::Iter PlotIter;
|
| + GrPlot* iterInit(PlotIter* iter, IterOrder order) {
|
| + return iter->init(fPlotList, kLRUFirst_IterOrder == order
|
| + ? GrPlotList::Iter::kTail_IterStart
|
| + : GrPlotList::Iter::kHead_IterStart);
|
| + }
|
| +
|
| private:
|
| void makeMRU(GrPlot* plot);
|
|
|
|
|