diff options
author | Jim Van Verth <jvanverth@google.com> | 2017-09-26 12:45:29 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-26 17:06:16 +0000 |
commit | 106b5c4917636d3df70ee6f59661ac5fa506d087 (patch) | |
tree | f23abd882319273d0d7868831f0158867a7bac65 /src/gpu/GrOnFlushResourceProvider.h | |
parent | 8d1776970097502f9cff5fb9504a656c8be3193c (diff) |
Shrink GrDrawOpAtlases when no longer needed, take 2.
Bug: skia:3550
Change-Id: Id483a76b9edcf29f7ea0aad0dd8946a3655ba8f2
Reviewed-on: https://skia-review.googlesource.com/50600
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrOnFlushResourceProvider.h')
-rw-r--r-- | src/gpu/GrOnFlushResourceProvider.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/gpu/GrOnFlushResourceProvider.h b/src/gpu/GrOnFlushResourceProvider.h index e2c0b73075..04f93b8618 100644 --- a/src/gpu/GrOnFlushResourceProvider.h +++ b/src/gpu/GrOnFlushResourceProvider.h @@ -9,6 +9,7 @@ #define GrOnFlushResourceProvider_DEFINED #include "GrTypes.h" +#include "GrOpFlushState.h" #include "GrResourceProvider.h" #include "SkRefCnt.h" #include "SkTArray.h" @@ -43,9 +44,17 @@ public: /** * Called once flushing is complete and all ops indicated by preFlush have been executed and - * released. + * released. startTokenForNextFlush can be used to track resources used in the current flush. */ - virtual void postFlush() {} + virtual void postFlush(GrDrawOpUploadToken startTokenForNextFlush) {} + + /** + * Tells the callback owner to hold onto this object when freeing GPU resources + * + * In particular, GrDrawingManager::freeGPUResources() deletes all the path renderers. + * Any OnFlushCallbackObject associated with a path renderer will need to be deleted. + */ + virtual bool retainOnFreeGpuResources() { return false; } private: typedef SkRefCnt INHERITED; |