aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawOpAtlas.h
diff options
context:
space:
mode:
authorGravatar Jim Van Verth <jvanverth@google.com>2017-09-15 17:14:20 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-15 17:14:25 +0000
commitad70c41f678771f889449c296a8ab48640742050 (patch)
tree3a2b1175d806b3b1fe3b1af7cc298477fc82015f /src/gpu/GrDrawOpAtlas.h
parent4127456bd631e79f1755fe974de90dd6c42e767f (diff)
Revert "Allow GrDrawOpAtlas to grow as needed"
This reverts commit 03168b8a62a0d3d14b7a0d14642df4d82203b87c. Reason for revert: Assert in resetting texture proxies. Original change's description: > Allow GrDrawOpAtlas to grow as needed > > Bug: skia:3550 > Change-Id: Ib5312c8c06ba8549d90545658df6686c45058255 > Reviewed-on: https://skia-review.googlesource.com/45841 > Commit-Queue: Jim Van Verth <jvanverth@google.com> > Reviewed-by: Robert Phillips <robertphillips@google.com> TBR=jvanverth@google.com,robertphillips@google.com Change-Id: I05e084b4cefa57e558f296d6087d4f03fa16ac81 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: skia:3550 Reviewed-on: https://skia-review.googlesource.com/47140 Reviewed-by: Jim Van Verth <jvanverth@google.com> Commit-Queue: Jim Van Verth <jvanverth@google.com>
Diffstat (limited to 'src/gpu/GrDrawOpAtlas.h')
-rw-r--r--src/gpu/GrDrawOpAtlas.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/gpu/GrDrawOpAtlas.h b/src/gpu/GrDrawOpAtlas.h
index 87d9c5b619..6d12973f4a 100644
--- a/src/gpu/GrDrawOpAtlas.h
+++ b/src/gpu/GrDrawOpAtlas.h
@@ -120,7 +120,6 @@ public:
}
static constexpr auto kMaxPages = 4;
- uint32_t pageCount() { return fNumPages; }
/**
* A class which can be handed back to GrDrawOpAtlas for updating last use tokens in bulk. The
@@ -191,10 +190,6 @@ public:
return width > kGlyphMaxDim || height > kGlyphMaxDim;
}
- static uint32_t GetPageIndexFromID(AtlasID id) {
- return id & 0xff;
- }
-
private:
GrDrawOpAtlas(GrContext*, GrPixelConfig config, int width, int height,
int numPlotsX, int numPlotsY);
@@ -257,7 +252,7 @@ private:
static GrDrawOpAtlas::AtlasID CreateId(uint32_t pageIdx, uint32_t plotIdx,
uint64_t generation) {
SkASSERT(pageIdx < (1 << 8));
- SkASSERT(pageIdx < kMaxPages);
+ SkASSERT(pageIdx == 0); // for now, we only support one page
SkASSERT(plotIdx < (1 << 8));
SkASSERT(generation < ((uint64_t)1 << 48));
return generation << 16 | plotIdx << 8 | pageIdx;
@@ -291,6 +286,10 @@ private:
typedef SkTInternalLList<Plot> PlotList;
+ static uint32_t GetPageIndexFromID(AtlasID id) {
+ return id & 0xff;
+ }
+
static uint32_t GetPlotIndexFromID(AtlasID id) {
return (id >> 8) & 0xff;
}
@@ -313,8 +312,6 @@ private:
// TODO: make page MRU
}
- bool createNewPage();
-
inline void processEviction(AtlasID);
GrContext* fContext;
@@ -343,7 +340,7 @@ private:
// proxies kept separate to make it easier to pass them up to client
sk_sp<GrTextureProxy> fProxies[kMaxPages];
Page fPages[kMaxPages];
- uint32_t fNumPages;
+ SkDEBUGCODE(uint32_t fNumPages;)
};
#endif