diff options
author | Brian Salomon <bsalomon@google.com> | 2017-05-08 20:46:17 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-05-08 20:46:26 +0000 |
commit | 449d78f5a8e73407b314aa6cb4e60a8273f0d410 (patch) | |
tree | e2cf8993a9dc917b69aa0dcfb0bc7904fbdf05e6 /src/gpu/GrResourceCache.h | |
parent | 823bdd96ef85c2e8bbea2bbeeff270b29755413d (diff) |
Revert "Added SkImage::MakeCrossContextFromEncoded"
This reverts commit 83b1b3db36e8622f4bbc8c391d5c714e258d1e03.
Reason for revert: unit test failing and asan leaks
Original change's description:
> Added SkImage::MakeCrossContextFromEncoded
>
> Designed for Flutter's threading architecture, with
> an eye to being useful to other clients. Under the
> hood, uses a new image generator class to lazily wrap
> a texture for multiple GrContexts.
>
> Bug: skia:
> Change-Id: I6c37b12c8ab5bce94b91190e5f0beb91d31ae81b
> Reviewed-on: https://skia-review.googlesource.com/14180
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,brianosman@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I1f0bf580aa0ea2d132e18b64ff610ddac9d073a7
Reviewed-on: https://skia-review.googlesource.com/15892
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrResourceCache.h')
-rw-r--r-- | src/gpu/GrResourceCache.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/src/gpu/GrResourceCache.h b/src/gpu/GrResourceCache.h index 61770b1b86..d871c9ad13 100644 --- a/src/gpu/GrResourceCache.h +++ b/src/gpu/GrResourceCache.h @@ -24,11 +24,6 @@ class GrCaps; class SkString; class SkTraceMemoryDump; -struct GrGpuResourceFreedMessage { - GrGpuResource* fResource; - uint32_t fOwningUniqueID; -}; - /** * Manages the lifetime of all GrGpuResource instances. * @@ -48,7 +43,7 @@ struct GrGpuResourceFreedMessage { */ class GrResourceCache { public: - GrResourceCache(const GrCaps* caps, uint32_t contextUniqueID); + GrResourceCache(const GrCaps* caps); ~GrResourceCache(); // Default maximum number of budgeted resources in the cache. @@ -179,9 +174,6 @@ public: }; void notifyFlushOccurred(FlushType); - /** Maintain a ref to this resource until we receive a GrGpuResourceFreedMessage. */ - void insertCrossContextGpuResource(GrGpuResource* resource); - #if GR_CACHE_STATS struct Stats { int fTotal; @@ -249,7 +241,6 @@ private: /// @} void processInvalidUniqueKeys(const SkTArray<GrUniqueKeyInvalidatedMessage>&); - void processFreedGpuResources(const SkTArray<GrGpuResourceFreedMessage>&); void addToNonpurgeableArray(GrGpuResource*); void removeFromNonpurgeableArray(GrGpuResource*); bool overBudget() const { return fBudgetedBytes > fMaxBytes || fBudgetedCount > fMaxCount; } @@ -296,7 +287,6 @@ private: } typedef SkMessageBus<GrUniqueKeyInvalidatedMessage>::Inbox InvalidUniqueKeyInbox; - typedef SkMessageBus<GrGpuResourceFreedMessage>::Inbox FreedGpuResourceInbox; typedef SkTDPQueue<GrGpuResource*, CompareTimestamp, AccessResourceIndex> PurgeableQueue; typedef SkTDArray<GrGpuResource*> ResourceArray; @@ -336,9 +326,6 @@ private: uint32_t fExternalFlushCnt; InvalidUniqueKeyInbox fInvalidUniqueKeyInbox; - FreedGpuResourceInbox fFreedGpuResourceInbox; - - uint32_t fContextUniqueID; // This resource is allowed to be in the nonpurgeable array for the sake of validate() because // we're in the midst of converting it to purgeable status. |