aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-03-09 12:00:34 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-09 17:33:20 +0000
commit41a3b87846553e9d77e0e113bfaf4ec74a068e96 (patch)
tree1494d36c2b5704e5bb364100b06fa217a72527e4 /include
parentafdc6b1ba9f5dba52916bd20b608f1f7c21c3160 (diff)
Make GrTextureStripAtlas DDL friendly
Change-Id: If8fdd7a1c027bc2b2791cfe1af13f99c2561d93d Reviewed-on: https://skia-review.googlesource.com/113268 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrContext.h27
1 files changed, 2 insertions, 25 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 98d278acdb..eccad0465a 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -42,6 +42,7 @@ class GrSwizzle;
class GrTextBlobCache;
class GrTextContext;
class GrTextureProxy;
+class GrTextureStripAtlasManager;
class GrVertexBuffer;
struct GrVkBackendContext;
@@ -99,24 +100,6 @@ public:
void resetContext(uint32_t state = kAll_GrBackendState);
/**
- * Callback function to allow classes to cleanup on GrContext destruction.
- * The 'info' field is filled in with the 'info' passed to addCleanUp.
- */
- typedef void (*PFCleanUpFunc)(const GrContext* context, void* info);
-
- /**
- * Add a function to be called from within GrContext's destructor.
- * This gives classes a chance to free resources held on a per context basis.
- * The 'info' parameter will be stored and passed to the callback function.
- */
- void addCleanUp(PFCleanUpFunc cleanUp, void* info) {
- CleanUpData* entry = fCleanUpData.push();
-
- entry->fFunc = cleanUp;
- entry->fInfo = info;
- }
-
- /**
* Abandons all GPU resources and assumes the underlying backend 3D API context is no longer
* usable. Call this if you have lost the associated GPU context, and thus internal texture,
* buffer, etc. references/IDs are now invalid. Calling this ensures that the destructors of the
@@ -293,6 +276,7 @@ private:
GrResourceCache* fResourceCache;
GrResourceProvider* fResourceProvider;
GrProxyProvider* fProxyProvider;
+ std::unique_ptr<GrTextureStripAtlasManager> fTextureStripAtlasManager;
GrGlyphCache* fGlyphCache;
@@ -311,13 +295,6 @@ private:
std::unique_ptr<SkTaskGroup> fTaskGroup;
- struct CleanUpData {
- PFCleanUpFunc fFunc;
- void* fInfo;
- };
-
- SkTDArray<CleanUpData> fCleanUpData;
-
const uint32_t fUniqueID;
std::unique_ptr<GrDrawingManager> fDrawingManager;