Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Unified Diff: include/gpu/GrContext.h

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/gpu/GrCaps.h ('k') | include/gpu/GrGpuResource.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrContext.h
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index 996b77f2dbf0171ad9b25685d524ee82f2256143..8e5781100e2d94d37d387e73ce98bc9c378726df 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;
« no previous file with comments | « include/gpu/GrCaps.h ('k') | include/gpu/GrGpuResource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698