diff options
author | 2018-03-06 08:20:37 -0500 | |
---|---|---|
committer | 2018-03-06 14:23:45 +0000 | |
commit | 0c4b7b1f2f1dd37204d401a6993119e5431942a6 (patch) | |
tree | af37ee06f3a29a0aeeba00f8bbcf67fbfd0bbea4 /include | |
parent | 2f8622029d265e79eb11df8eb06a29ff3faa7ac0 (diff) |
Move internal calls from GrContext to GrContextPriv
A mechanical bulk move just to get these out of the public API.
TBR=bsalomon@google.com
Change-Id: I813efbd54a09dd448275697c0e50947753a5cfd3
Reviewed-on: https://skia-review.googlesource.com/112262
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrContext.h | 86 |
1 files changed, 4 insertions, 82 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 6578638183..bbd43df694 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -187,13 +187,6 @@ public: virtual void freeGpuResources(); /** - * Purge all the unlocked resources from the cache. - * This entry point is mainly meant for timing texture uploads - * and is not defined in normal builds of Skia. - */ - void purgeAllUnlockedResources(); - - /** * Purge GPU resources that haven't been used in the past 'msNotUsed' milliseconds or are * otherwise marked for deletion, regardless of whether the context is under budget. */ @@ -239,38 +232,6 @@ public: */ int maxSurfaceSampleCountForColorType(SkColorType) const; - /* - * Create a new render target context backed by a deferred-style - * GrRenderTargetProxy. We guarantee that "asTextureProxy" will succeed for - * renderTargetContexts created via this entry point. - */ - sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContext( - SkBackingFit fit, - int width, int height, - GrPixelConfig config, - sk_sp<SkColorSpace> colorSpace, - int sampleCnt = 1, - GrMipMapped = GrMipMapped::kNo, - GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin, - const SkSurfaceProps* surfaceProps = nullptr, - SkBudgeted = SkBudgeted::kYes); - /* - * This method will attempt to create a renderTargetContext that has, at least, the number of - * channels and precision per channel as requested in 'config' (e.g., A8 and 888 can be - * converted to 8888). It may also swizzle the channels (e.g., BGRA -> RGBA). - * SRGB-ness will be preserved. - */ - sk_sp<GrRenderTargetContext> makeDeferredRenderTargetContextWithFallback( - SkBackingFit fit, - int width, int height, - GrPixelConfig config, - sk_sp<SkColorSpace> colorSpace, - int sampleCnt = 1, - GrMipMapped = GrMipMapped::kNo, - GrSurfaceOrigin origin = kBottomLeft_GrSurfaceOrigin, - const SkSurfaceProps* surfaceProps = nullptr, - SkBudgeted budgeted = SkBudgeted::kYes); - /////////////////////////////////////////////////////////////////////////// // Misc. @@ -308,53 +269,14 @@ public: */ uint32_t uniqueID() { return fUniqueID; } - /////////////////////////////////////////////////////////////////////////// - // Functions intended for internal use only. - bool abandoned() const; - - /** Reset GPU stats */ - void resetGpuStats() const ; - - /** Prints cache stats to the string if GR_CACHE_STATS == 1. */ - void dumpCacheStats(SkString*) const; - void dumpCacheStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>* values) const; - void printCacheStats() const; - - /** Prints GPU stats to the string if GR_GPU_STATS == 1. */ - void dumpGpuStats(SkString*) const; - void dumpGpuStatsKeyValuePairs(SkTArray<SkString>* keys, SkTArray<double>* values) const; - void printGpuStats() const; - - /** Returns a string with detailed information about the context & GPU, in JSON format. */ - SkString dump() const; - - /** Specify the TextBlob cache limit. If the current cache exceeds this limit it will purge. - this is for testing only */ - void setTextBlobCacheLimit_ForTesting(size_t bytes); - - /** Specify the sizes of the GrAtlasTextContext atlases. The configs pointer below should be - to an array of 3 entries */ - void setTextContextAtlasSizes_ForTesting(const GrDrawOpAtlasConfig* configs); - - /** Enumerates all cached GPU resources and dumps their memory to traceMemoryDump. */ - void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; - - /** Get pointer to atlas texture for given mask format. Note that this wraps an - actively mutating texture in an SkImage. This could yield unexpected results - if it gets cached or used more generally. */ - sk_sp<SkImage> getFontAtlasImage_ForTesting(GrMaskFormat format, unsigned int index = 0); - - GrAuditTrail* getAuditTrail() { return &fAuditTrail; } - - GrContextOptions::PersistentCache* getPersistentCache() { return fPersistentCache; } - - /** This is only useful for debug purposes */ - SkDEBUGCODE(GrSingleOwner* debugSingleOwner() const { return &fSingleOwner; } ) - // Provides access to functions that aren't part of the public API. GrContextPriv contextPriv(); const GrContextPriv contextPriv() const; + /** Enumerates all cached GPU resources and dumps their memory to traceMemoryDump. */ + // Chrome is using this! + void dumpMemoryStatistics(SkTraceMemoryDump* traceMemoryDump) const; + protected: GrContext(GrBackend, int32_t id = SK_InvalidGenID); |