aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrContext.h
diff options
context:
space:
mode:
authorGravatar bungeman <bungeman@google.com>2016-10-27 09:30:08 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-27 09:30:08 -0700
commit6bd5284415bd983b0628c4941dff5def40018f5a (patch)
tree7de7e45431f76db69807204ecdce3ed6fcc4d9e8 /include/gpu/GrContext.h
parent56380524d903f27627a75e2e1189463999725008 (diff)
Remove SkAutoTUnref and SkAutoTDelete from public includes.
This also makes the required changed to src, tests, and tools. The few public APIs modified by this change appear to be unused outside of Skia. Removing these from the public API makes it easier to ensure users are no longer using them. This also updates GrGpu::wrapBackendXXX and the ::onWrapBackendXXX methods to clarify ownership. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2448593002 Review-Url: https://codereview.chromium.org/2448593002
Diffstat (limited to 'include/gpu/GrContext.h')
-rw-r--r--include/gpu/GrContext.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 996b77f2db..8e5781100e 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -60,7 +60,7 @@ public:
virtual ~GrContext();
- GrContextThreadSafeProxy* threadSafeProxy();
+ sk_sp<GrContextThreadSafeProxy> threadSafeProxy();
/**
* The GrContext normally assumes that no outsider is setting state
@@ -327,7 +327,7 @@ public:
GrGpu* getGpu() { return fGpu; }
const GrGpu* getGpu() const { return fGpu; }
GrBatchFontCache* getBatchFontCache() { return fBatchFontCache; }
- GrTextBlobCache* getTextBlobCache() { return fTextBlobCache; }
+ GrTextBlobCache* getTextBlobCache() { return fTextBlobCache.get(); }
bool abandoned() const;
GrResourceProvider* resourceProvider() { return fResourceProvider; }
const GrResourceProvider* resourceProvider() const { return fResourceProvider; }
@@ -383,10 +383,10 @@ private:
GrTextureProvider* fTextureProvider;
};
- SkAutoTUnref<GrContextThreadSafeProxy> fThreadSafeProxy;
+ sk_sp<GrContextThreadSafeProxy> fThreadSafeProxy;
GrBatchFontCache* fBatchFontCache;
- SkAutoTDelete<GrTextBlobCache> fTextBlobCache;
+ std::unique_ptr<GrTextBlobCache> fTextBlobCache;
bool fDidTestPMConversions;
int fPMToUPMConversion;
@@ -418,7 +418,7 @@ private:
const uint32_t fUniqueID;
- SkAutoTDelete<GrDrawingManager> fDrawingManager;
+ std::unique_ptr<GrDrawingManager> fDrawingManager;
GrAuditTrail fAuditTrail;
@@ -463,12 +463,12 @@ private:
*/
class GrContextThreadSafeProxy : public SkRefCnt {
private:
- GrContextThreadSafeProxy(const GrCaps* caps, uint32_t uniqueID)
- : fCaps(SkRef(caps))
+ GrContextThreadSafeProxy(sk_sp<const GrCaps> caps, uint32_t uniqueID)
+ : fCaps(std::move(caps))
, fContextUniqueID(uniqueID) {}
- SkAutoTUnref<const GrCaps> fCaps;
- uint32_t fContextUniqueID;
+ sk_sp<const GrCaps> fCaps;
+ uint32_t fContextUniqueID;
friend class GrContext;
friend class SkImage;