diff options
author | 2017-03-22 14:59:02 +0000 | |
---|---|---|
committer | 2017-03-22 14:59:07 +0000 | |
commit | 20c322ef0cd04cf8e2592879d05d9f4e6cb19596 (patch) | |
tree | 3dd86434ae8c1f636f5e29dcae947c595840bd4b /include/gpu/GrGpuResource.h | |
parent | fbb56ce83fc717b7c6722324bbccd1ae73c350a4 (diff) |
Revert "Add a new GrResourceCache purging mechanism for purging unused resources."
This reverts commit fbb56ce83fc717b7c6722324bbccd1ae73c350a4.
Reason for revert: Chrome's ancient libstdc++ doesn't like use of steady_clock
Original change's description:
> Add a new GrResourceCache purging mechanism for purging unused resources.
>
> The client may call GrContext::purgeResourceNotUsedSince() with a stead_clock::time_point and all resources that have been purgeable since before that time point are purged.
>
> This is intended to replace the "max unused flushes" purging mechanism once Chrome adopts it.
>
> Change-Id: I28881dd2959cc01c0acca81b2d6001ee5626439d
> Reviewed-on: https://skia-review.googlesource.com/8920
> Commit-Queue: Brian Salomon <bsalomon@google.com>
> Reviewed-by: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Eric Karl <ericrk@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,ericrk@google.com,reviews@skia.org,ericrk@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I3baa3b2e80302315b757d4d625732459e13795d4
Reviewed-on: https://skia-review.googlesource.com/10004
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/gpu/GrGpuResource.h')
-rw-r--r-- | include/gpu/GrGpuResource.h | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h index 1c4cbfa104..e0a7903f1d 100644 --- a/include/gpu/GrGpuResource.h +++ b/include/gpu/GrGpuResource.h @@ -8,7 +8,6 @@ #ifndef GrGpuResource_DEFINED #define GrGpuResource_DEFINED -#include <chrono> #include "GrResourceKey.h" #include "GrTypesPriv.h" @@ -316,30 +315,28 @@ private: void makeUnbudgeted(); #ifdef SK_DEBUG - friend class GrGpu; // for assert in GrGpu to access getGpu + friend class GrGpu; // for assert in GrGpu to access getGpu #endif - // An index into a heap when this resource is purgeable or an array when not. This is maintained // by the cache. - int fCacheArrayIndex; + int fCacheArrayIndex; // This value reflects how recently this resource was accessed in the cache. This is maintained // by the cache. - uint32_t fTimestamp; - uint32_t fExternalFlushCntWhenBecamePurgeable; - std::chrono::steady_clock::time_point fTimeWhenBecamePurgeable; + uint32_t fTimestamp; + uint32_t fExternalFlushCntWhenBecamePurgeable; static const size_t kInvalidGpuMemorySize = ~static_cast<size_t>(0); - GrScratchKey fScratchKey; - GrUniqueKey fUniqueKey; + GrScratchKey fScratchKey; + GrUniqueKey fUniqueKey; // This is not ref'ed but abandon() or release() will be called before the GrGpu object // is destroyed. Those calls set will this to NULL. - GrGpu* fGpu; - mutable size_t fGpuMemorySize; + GrGpu* fGpu; + mutable size_t fGpuMemorySize; - SkBudgeted fBudgeted; - bool fRefsWrappedObjects; - const UniqueID fUniqueID; + SkBudgeted fBudgeted; + bool fRefsWrappedObjects; + const UniqueID fUniqueID; typedef GrIORef<GrGpuResource> INHERITED; friend class GrIORef<GrGpuResource>; // to access notifyAllCntsAreZero and notifyRefCntIsZero. |