diff options
author | Brian Salomon <bsalomon@google.com> | 2017-10-30 09:37:55 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-30 15:30:09 +0000 |
commit | 943ed7910f938d7b4894b4e925566cf7b7053f29 (patch) | |
tree | b281c6fb91ede12be586ee7d475a2c4f38e15f5d /src/gpu/GrDrawOpAtlas.h | |
parent | f18b1d88aa98f81d2c115a59d887265fea63f876 (diff) |
Remove deferred upload types from GrDrawOp.h.
This is motivated by exposing these to an upcoming atlas text rendering API that doesn't use ops.
Change-Id: Id034dd43d13bc96fe1350fc6d8f699477bb74a05
Reviewed-on: https://skia-review.googlesource.com/65060
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrDrawOpAtlas.h')
-rw-r--r-- | src/gpu/GrDrawOpAtlas.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/gpu/GrDrawOpAtlas.h b/src/gpu/GrDrawOpAtlas.h index 647e6a58b9..694af30e00 100644 --- a/src/gpu/GrDrawOpAtlas.h +++ b/src/gpu/GrDrawOpAtlas.h @@ -117,7 +117,7 @@ public: } /** To ensure the atlas does not evict a given entry, the client must set the last use token. */ - inline void setLastUseToken(AtlasID id, GrDrawOpUploadToken token) { + inline void setLastUseToken(AtlasID id, GrDeferredUploadToken token) { SkASSERT(this->hasID(id)); uint32_t plotIdx = GetPlotIndexFromID(id); SkASSERT(plotIdx < fNumPlots); @@ -191,7 +191,7 @@ public: friend class GrDrawOpAtlas; }; - void setLastUseTokenBulk(const BulkUseTokenUpdater& updater, GrDrawOpUploadToken token) { + void setLastUseTokenBulk(const BulkUseTokenUpdater& updater, GrDeferredUploadToken token) { int count = updater.fPlotsToUpdate.count(); for (int i = 0; i < count; i++) { const BulkUseTokenUpdater::PlotData& pd = updater.fPlotsToUpdate[i]; @@ -205,7 +205,7 @@ public: } } - void compact(GrDrawOpUploadToken startTokenForNextFlush); + void compact(GrDeferredUploadToken startTokenForNextFlush); static constexpr auto kGlyphMaxDim = 256; static bool GlyphTooLargeForAtlas(int width, int height) { @@ -253,12 +253,12 @@ private: * use lastUse to determine when we can evict a plot from the cache, i.e. if the last use * has already flushed through the gpu then we can reuse the plot. */ - GrDrawOpUploadToken lastUploadToken() const { return fLastUpload; } - GrDrawOpUploadToken lastUseToken() const { return fLastUse; } - void setLastUploadToken(GrDrawOpUploadToken token) { fLastUpload = token; } - void setLastUseToken(GrDrawOpUploadToken token) { fLastUse = token; } + GrDeferredUploadToken lastUploadToken() const { return fLastUpload; } + GrDeferredUploadToken lastUseToken() const { return fLastUse; } + void setLastUploadToken(GrDeferredUploadToken token) { fLastUpload = token; } + void setLastUseToken(GrDeferredUploadToken token) { fLastUse = token; } - void uploadToTexture(GrDrawOp::WritePixelsFn&, GrTextureProxy*); + void uploadToTexture(GrDeferredTextureUploadWritePixelsFn&, GrTextureProxy*); void resetRects(); int flushesSinceLastUsed() { return fFlushesSinceLastUse; } @@ -288,8 +288,8 @@ private: return generation << 16 | plotIdx << 8 | pageIdx; } - GrDrawOpUploadToken fLastUpload; - GrDrawOpUploadToken fLastUse; + GrDeferredUploadToken fLastUpload; + GrDeferredUploadToken fLastUse; // the number of flushes since this plot has been last used int fFlushesSinceLastUse; @@ -360,7 +360,7 @@ private: uint64_t fAtlasGeneration; // nextTokenToFlush() value at the end of the previous flush - GrDrawOpUploadToken fPrevFlushToken; + GrDeferredUploadToken fPrevFlushToken; struct EvictionData { EvictionFunc fFunc; |