aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-02-28 14:19:04 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-28 14:19:16 +0000
commit0551818a01f5cab18a9660b4bb21d9f5890e3130 (patch)
tree2754be4d6b74596fbef4b2bfab34807ea80dd713 /include
parent615b1d9a3c6a78c87c2b042a769d5c2e016f207e (diff)
Revert "Move atlas manager creation to GrContext derived classes"
This reverts commit e5b7ceeac865fb8a3bab82a73d65752c78682718. Reason for revert: Breaking Mus/Viz tests in Chrome roll Original change's description: > Move atlas manager creation to GrContext derived classes > > This CL relies on: https://skia-review.googlesource.com/c/skia/+/108001 (Fission GrAtlasGlyphCache in two) > > TBR=bsalomon@google.com > Change-Id: Ic3f91cea2238221b970f8ebbda99b10202925cd8 > Reviewed-on: https://skia-review.googlesource.com/110621 > Commit-Queue: Robert Phillips <robertphillips@google.com> > Reviewed-by: Greg Daniel <egdaniel@google.com> TBR=egdaniel@google.com,jvanverth@google.com,bsalomon@google.com,robertphillips@google.com Change-Id: I3973463b7b837145d9732171a91d82f0f0cea148 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://skia-review.googlesource.com/110821 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrContext.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 1b43d99f2e..ff4ec5f677 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -36,7 +36,6 @@ class GrRenderTargetContext;
class GrResourceEntry;
class GrResourceCache;
class GrResourceProvider;
-class GrRestrictedAtlasManager;
class GrSamplerState;
class GrSurfaceProxy;
class GrSwizzle;
@@ -128,7 +127,7 @@ public:
* The typical use case for this function is that the underlying 3D context was lost and further
* API calls may crash.
*/
- virtual void abandonContext();
+ void abandonContext();
/**
* This is similar to abandonContext() however the underlying 3D context is not yet lost and
@@ -139,7 +138,7 @@ public:
* but can't guarantee that GrContext will be destroyed first (perhaps because it may be ref'ed
* elsewhere by either the client or Skia objects).
*/
- virtual void releaseResourcesAndAbandonContext();
+ void releaseResourcesAndAbandonContext();
///////////////////////////////////////////////////////////////////////////
// Resource Cache
@@ -184,7 +183,7 @@ public:
* Frees GPU created by the context. Can be called to reduce GPU memory
* pressure.
*/
- virtual void freeGpuResources();
+ void freeGpuResources();
/**
* Purge all the unlocked resources from the cache.
@@ -359,15 +358,9 @@ protected:
GrContext(GrContextThreadSafeProxy*);
GrContext(GrBackend);
- virtual bool init(const GrContextOptions&); // init must be called after either constructor.
-
- virtual GrAtlasManager* onGetFullAtlasManager() = 0;
- virtual GrRestrictedAtlasManager* onGetRestrictedAtlasManager() = 0;
-
- sk_sp<const GrCaps> fCaps;
-
private:
sk_sp<GrGpu> fGpu;
+ sk_sp<const GrCaps> fCaps;
GrResourceCache* fResourceCache;
GrResourceProvider* fResourceProvider;
GrProxyProvider* fProxyProvider;
@@ -375,6 +368,7 @@ private:
sk_sp<GrContextThreadSafeProxy> fThreadSafeProxy;
GrGlyphCache* fGlyphCache;
+ GrAtlasManager* fFullAtlasManager;
std::unique_ptr<GrTextBlobCache> fTextBlobCache;
bool fDisableGpuYUVConversion;
@@ -410,6 +404,8 @@ private:
// TODO: have the GrClipStackClip use renderTargetContexts and rm this friending
friend class GrContextPriv;
+ bool init(const GrContextOptions&); // init must be called after either constructor.
+
/**
* These functions create premul <-> unpremul effects. If the second argument is 'true', they
* use the specialized round-trip effects from GrConfigConversionEffect, otherwise they