History log of /external/skia/src/gpu/GrResourceCache.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
47710a52505e9b8d2ae6ef8521f6b7a022542b9e 28-Mar-2018 Robert Phillips <robertphillips@google.com> Add new GrResourceCache::purgeUnlockedResources variant

TBR=bsalomon@google.com
Change-Id: I05bef1f8a271474db878a046cc1f6ac7b60a15f1
Reviewed-on: https://skia-review.googlesource.com/116801
Reviewed-by: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
(cherry picked from commit 6eba063b63efbf824aff8ec6b32af05e4d54c38b)
Reviewed-on: https://skia-review.googlesource.com/116981
/external/skia/src/gpu/GrResourceCache.cpp
1afd4cdb0800e2e395b465da24eb71e0e834dafa 08-Jan-2018 Robert Phillips <robertphillips@google.com> Add GrProxyProvider

This pulls all the proxy tracking & creation functionality out of the GrResourceCache and GrResourceProvider and consolidates it in the GrProxyProvider.

Change-Id: I7256f7c544319a70c1bd93dd5a9ccbe5fa0a544f
Reviewed-on: https://skia-review.googlesource.com/91501
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
3ec9573ac3fd8b973fe4feda27c109d47cb5defc 29-Sep-2017 Robert Phillips <robertphillips@google.com> Add unit test for pinned SkImages

Change-Id: I2e14353bc865b5994cc90ad643a6a58604955957
Reviewed-on: https://skia-review.googlesource.com/53500
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
45a6f147b0dc47630e75dcfc8f9c4ce816392553 29-Sep-2017 Robert Phillips <robertphillips@google.com> Clear uniquely keyed texture proxies out of ResourceCache when it is deleted

Change-Id: Ice135dd4b6316b791276eefd522be6bd90b8b5eb
Reviewed-on: https://skia-review.googlesource.com/53261
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Stan Iliev <stani@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
cd871401114f402e72420ccd49edecee2532b0e6 26-Sep-2017 Greg Daniel <egdaniel@google.com> Add ability to remove unique key from proxy and underlying surface.

Bug: skia:
Change-Id: I66b891ce9ca35906fdbddb36f565b35b25825112
Reviewed-on: https://skia-review.googlesource.com/51240
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
ae7d3f3992708354a3284bb49066737e36a76f40 21-Sep-2017 Robert Phillips <robertphillips@google.com> Add native caching of uniquely keyed GrTextureProxies (take 2)

TBR=bsalomon@google.com

Change-Id: I590dcdc85fb60706c7eb06277694791dc04c9141
Reviewed-on: https://skia-review.googlesource.com/49543
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
76d640d14ea78e1f827a2f545e7f0729cdc2896f 20-Sep-2017 Robert Phillips <robertphillips@google.com> Revert "Add native caching of uniquely keyed GrTextureProxies"

This reverts commit d4f100dad90ed5beb1b614464d8c4fcb22c0a993.

Reason for revert: ASAN

Original change's description:
> Add native caching of uniquely keyed GrTextureProxies
>
> Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
> Reviewed-on: https://skia-review.googlesource.com/48300
> Commit-Queue: Robert Phillips <robertphillips@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com

Change-Id: I7bbf549d4855ce6d985867c3880eef80080bd3d1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/49442
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
d4f100dad90ed5beb1b614464d8c4fcb22c0a993 20-Sep-2017 Robert Phillips <robertphillips@google.com> Add native caching of uniquely keyed GrTextureProxies

Change-Id: I303fe025b7856b8d681a2d35b416c015bd468e1d
Reviewed-on: https://skia-review.googlesource.com/48300
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
0d53780b8cbf75c0282fb8246a0a3de0026f211b 08-Sep-2017 Greg Daniel <egdaniel@google.com> Update GrResourceCache changeUniqueKey to stay in valid state after each step

The issues are that we are intertwining removing things from the old and new
resource. This changes it so we do all the removal on the old resource first
then start updating the new resource.

Bug: skia:
Change-Id: I7ce4a309290cd499cdc4398c87d1cfd42ef6994d
Reviewed-on: https://skia-review.googlesource.com/44242
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
b4aab9ae6d27c446af8302b79d15b832c816c633 16-Aug-2017 Ben Wagner <bungeman@google.com> Replace SkFAIL with SK_ABORT.

SkFAIL is a legacy macro which is just SK_ABORT. This CL mechanically
changes uses of SkFAIL to SK_ABORT in preparation for its removal. The
related sk_throw macro will be changed independently, due to needing to
actually clean up its users.

Change-Id: Id70b5c111a02d2458dc60c8933f444df27d9cebb
Reviewed-on: https://skia-review.googlesource.com/35284
Reviewed-by: Derek Sollenberger <djsollen@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
39c08ac3be30f9956cea7c5e4fd9a1d86e993a65 26-Jul-2017 Brian Osman <brianosman@google.com> Automatically prepend "disabled-by-default-" to TRACE categories

Ensures that all Skia events are disabled by default in Chrome, and
eliminates redundant typing.

Bug: skia:
Change-Id: I289c5e5a01084fcf4cccf512da65a4727f4aeca2
Reviewed-on: https://skia-review.googlesource.com/26880
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
/external/skia/src/gpu/GrResourceCache.cpp
3ea1798829df1a5d163b1851783046b624c29ea2 02-Jun-2017 Robert Phillips <robertphillips@google.com> Remove ImmediateFlush mode

Change-Id: I7db113e66d81516b2beb5eefeddf488d9bfed2e5
Reviewed-on: https://skia-review.googlesource.com/18488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
5480a18d8799511034d0da219c72932cd8f25274 25-May-2017 Derek Sollenberger <djsollen@google.com> Add method to GrContext to purge unlocked resources.

Beyond setting the total cache limits this method enables clients to
request to purge a specific number of bytes, as well as specify their
preference to purge scratch resources over resources of other types.

Change-Id: I9259d5544d34251575d77eebe599388f213ff3ce
Reviewed-on: https://skia-review.googlesource.com/17987
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
ee47914ae5661043c20754f46523665a6d31bc73 24-May-2017 Derek Sollenberger <djsollen@google.com> Add GrContext API to report the number of purgeable bytes in the cache.

Change-Id: I1457eec9831736f386e3b3b80d9eac8dbb337a9b
Reviewed-on: https://skia-review.googlesource.com/17829
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Derek Sollenberger <djsollen@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
13dddce65fd87a8175a209a49f35615735a2886a 09-May-2017 Brian Osman <brianosman@google.com> 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.

Re-land of https://skia-review.googlesource.com/c/14180/

Bug: skia:
Change-Id: I3dd382640629b79b3058f18fee68d043566e43e5
Reviewed-on: https://skia-review.googlesource.com/15895
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
449d78f5a8e73407b314aa6cb4e60a8273f0d410 08-May-2017 Brian Salomon <bsalomon@google.com> 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>
/external/skia/src/gpu/GrResourceCache.cpp
83b1b3db36e8622f4bbc8c391d5c714e258d1e03 08-May-2017 Brian Osman <brianosman@google.com> 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>
/external/skia/src/gpu/GrResourceCache.cpp
0562eb9c6c98f07732ca96a1dd4e986f1ca089b8 08-May-2017 Brian Osman <brianosman@google.com> Allow wrapped resources to have unique keys

Previously, wrapped resources were never budgeted. Now we explicitly allow
wrapped, unbudgeted resources with unique keys. This allows code that
wraps (and re-wraps) external resources with a deterministic key to find
the same wrapped resource - saving time and ensuring a single wrapped
copy, to preserve state on the resource (like texture sampler state).

Bug: skia:
Change-Id: I1dd7642f1ed8bb6c620029d46203cf5cb6b3c160
Reviewed-on: https://skia-review.googlesource.com/15241
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
5e150851d0dd5ddb161449b44edf1bf52d18ac5a 22-Mar-2017 Brian Salomon <bsalomon@google.com> Revert "Revert "Add a new GrResourceCache purging mechanism for purging unused resources.""

This reverts commit 20c322ef0cd04cf8e2592879d05d9f4e6cb19596.

Change-Id: I6df9a8594484837672308dc2c21c7c29b76ffa2c
Reviewed-on: https://skia-review.googlesource.com/10013
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
/external/skia/src/gpu/GrResourceCache.cpp
20c322ef0cd04cf8e2592879d05d9f4e6cb19596 22-Mar-2017 Brian Salomon <bsalomon@google.com> 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>
/external/skia/src/gpu/GrResourceCache.cpp
fbb56ce83fc717b7c6722324bbccd1ae73c350a4 22-Mar-2017 Brian Salomon <bsalomon@google.com> 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>
/external/skia/src/gpu/GrResourceCache.cpp
ee843b2ae4d75748d8bc323287f0c310fad548a7 04-Oct-2016 robertphillips <robertphillips@google.com> Revert of Make GrResourceCache dynamically change between LRU and random replacement strategies. (patchset #8 id:140001 of https://codereview.chromium.org/2321563006/ )

Reason for revert:
Causing problems on Mac & Windows bots.

Original issue's description:
> Make GrResourceCache dynamically change between LRU and random replacement strategies.
>
> Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior.
>
> The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames.
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006
>
> Committed: https://skia.googlesource.com/skia/+/0f147ac2ae575bbad3515a526f13700bc5c8e9d7

TBR=bsalomon@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2386993004
/external/skia/src/gpu/GrResourceCache.cpp
0f147ac2ae575bbad3515a526f13700bc5c8e9d7 03-Oct-2016 bsalomon <bsalomon@google.com> Make GrResourceCache dynamically change between LRU and random replacement strategies.

Random performs significantly better when each frame exceeds the budget by a small margin whereas LRU has worst case behavior.

The decision of which to use is made based on the history from a few frames of the ratio of total unique key cache misses to unique key cache misses of resources purged in the last 2 frames.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2321563006

Review-Url: https://codereview.chromium.org/2321563006
/external/skia/src/gpu/GrResourceCache.cpp
e2e87f3484e5524dbfd6c01f402136738d1d434b 22-Sep-2016 bsalomon <bsalomon@google.com> Change implementation of flush-count based GrGpuResource purging

Change default to approx 30seconds (given some API usage assumptions)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2361093002

Review-Url: https://codereview.chromium.org/2361093002
/external/skia/src/gpu/GrResourceCache.cpp
b77a907c2fb4402b7e70e9fff70eb71482354e67 07-Sep-2016 bsalomon <bsalomon@google.com> Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.

Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002

Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744
Review-Url: https://codereview.chromium.org/2307053002
/external/skia/src/gpu/GrResourceCache.cpp
5eb41fdf94187d6cc22702444622ed7897c8039a 06-Sep-2016 bsalomon <bsalomon@google.com> Revert of Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache. (patchset #4 id:60001 of https://codereview.chromium.org/2307053002/ )

Reason for revert:
Causing assertions on bots

Original issue's description:
> Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.
>
> Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.
>
> Removes the unused and untested discard flush variation.
>
> Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.
>
> Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
> flush that just occurred.
>
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002
>
> Committed: https://skia.googlesource.com/skia/+/1dbb207babecdae8f1f74ed9d9900c73064df744

TBR=robertphillips@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review-Url: https://codereview.chromium.org/2312123003
/external/skia/src/gpu/GrResourceCache.cpp
1dbb207babecdae8f1f74ed9d9900c73064df744 06-Sep-2016 bsalomon <bsalomon@google.com> Restructure flushing relationship between GrContext, GrDrawingManager, and GrResourceCache.

Consolidates all flush actions into GrDrawingManager and makes GrContext::flush a passthrough.

Removes the unused and untested discard flush variation.

Replaces the indirect overbudget callback mechanism of GrResourceCache with a flag set by resource cache when it wants to flush that is checked after each draw by GrDrawContext.

Modifies GrResourceCache::notifyFlushOccurred() to take a param indicating whether it triggered the
flush that just occurred.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2307053002

Review-Url: https://codereview.chromium.org/2307053002
/external/skia/src/gpu/GrResourceCache.cpp
4e97607d9a1cef66fac16f347c5ca813ec4f9515 08-Aug-2016 mtklein <mtklein@chromium.org> Use sse4.2 CRC32 instructions to hash when available.

About 9x faster than Murmur3 for long inputs.

Most of this is a mechanical change from SkChecksum::Murmur3(...) to SkOpts::hash(...).

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2208903002
CQ_INCLUDE_TRYBOTS=master.client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot;master.client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review-Url: https://codereview.chromium.org/2208903002
/external/skia/src/gpu/GrResourceCache.cpp
28a838e532250fcca9673aca6c4616193a5a139d 23-Jun-2016 robertphillips <robertphillips@google.com> Move GrPipelineBuilder out of gms & reduce use of GrPipelineBuilder.h

Just another step in reining in the GrPLB

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2086293006

Review-Url: https://codereview.chromium.org/2086293006
/external/skia/src/gpu/GrResourceCache.cpp
c4ed68426649dd4ca2c3119cdafdd562d3c3ba28 24-May-2016 robertphillips <robertphillips@google.com> Don't store resources with a unique key in GrResourceCache's fScratchMap

The reasoning here is that resources with a unique key are never selected from fScratchMap and just clog up the search for an available resource.

This knocks a 200x loop over the SVGbouncingrects case from 264ms down to 164ms.

BUG=603969
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2008083002

Review-Url: https://codereview.chromium.org/2008083002
/external/skia/src/gpu/GrResourceCache.cpp
2e6055b3ea14a04fcde1ac1974a70bf00b1e295b 22-Apr-2016 kkinnunen <kkinnunen@nvidia.com> Refactor to separate backend object lifecycle and GpuResource budget decision

Refactor GrGpuResource to contain two different pieces of state:
a) instance is budgeted or not budgeted
b) instance references wrapped backend objects or not

The "object lifecycle" was also attached to backend object
handles (ids), which made the code a bit unclear. Backend objects
would be associated with GrGpuResource::LifeCycle, even though
GrGpuResource::LifeCycle refers to the GpuResource, and individual
backend objects in one GpuResource might be governed with different
"lifecycle".

Mark the budgeted/not budgeted with SkBudgeted::kYes, SkBudgeted::kNo.
This was previously GrGpuResource::kCached_LifeCycle,
GrGpuResource::kUncached_LifeCycle.

Mark the "references wrapped object" with boolean. This was previously
GrGpuResource::kBorrowed_LifeCycle,
GrGpuResource::kAdopted_LifeCycle for GrGpuResource.

Associate the backend object ownership status with
GrBackendObjectOwnership for the backend object handles.

The resource type leaf constuctors, such has GrGLTexture or
GrGLTextureRenderTarget take "budgeted" parameter. This parameter
is passed to GrGpuResource::registerWithCache().

The resource type intermediary constructors, such as GrGLTexture
constructors for class GrGLTextureRenderTarget do not take "budgeted"
parameters, intermediary construtors do not call registerWithCache.

Removes the need for tagging GrGpuResource -derived subclass
constructors with "Derived" parameter.

Makes instances that wrap backend objects be registered with
a new function GrGpuResource::registerWithCacheWrapped().

Removes "budgeted" parameter from classes such as StencilAttahment, as
they are always cached and never wrap any external backend objects.

Removes the use of concept "external" from the member function names.
The API refers to the objects as "wrapped", so make all related
functions use the term consistently.

No change in functionality. Resources referencing wrapped objects are
always inserted to the cache with budget decision kNo.

BUG=594928
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1862043002

Review URL: https://codereview.chromium.org/1862043002
/external/skia/src/gpu/GrResourceCache.cpp
9d524f22bfde5dc3dc8f48e1be39bdebd3bb0304 29-Mar-2016 halcanary <halcanary@google.com> Style bikeshed - remove extraneous whitespace

GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1842753002

Review URL: https://codereview.chromium.org/1842753002
/external/skia/src/gpu/GrResourceCache.cpp
b2c0133caf0f03462385c19634281c351355c979 26-Feb-2016 bsalomon <bsalomon@google.com> When a surface is backed by an external render target force a copy on image snap

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1694943002

Review URL: https://codereview.chromium.org/1694943002
/external/skia/src/gpu/GrResourceCache.cpp
5ec26ae9bfca635ccc98283aad5deda11519d826 25-Feb-2016 bsalomon <bsalomon@google.com> Move Budgeted enum out of SkSurface, use in GrTextureProvider

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c
CQ_EXTRA_TRYBOTS=client.skia.compile:Build-Ubuntu-GCC-x86_64-Release-CMake-Trybot,Build-Mac-Clang-x86_64-Release-CMake-Trybot

Review URL: https://codereview.chromium.org/1728093005
/external/skia/src/gpu/GrResourceCache.cpp
bd500f09ce5b1ca464431d693f9ec5da60a59230 25-Feb-2016 bsalomon <bsalomon@google.com> Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (patchset #6 id:100001 of https://codereview.chromium.org/1728093005/ )

Reason for revert:
Need workaround for chrome to build

Original issue's description:
> Move Budgeted enum out of SkSurface, use in GrTextureProvider
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
> DOCS_PREVIEW= https://skia.org/?cl=1728093005
>
> Committed: https://skia.googlesource.com/skia/+/57599fe6c0336feaeeeb9b1996e77b70219b483c

TBR=reed@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1734043002
/external/skia/src/gpu/GrResourceCache.cpp
57599fe6c0336feaeeeb9b1996e77b70219b483c 25-Feb-2016 bsalomon <bsalomon@google.com> Move Budgeted enum out of SkSurface, use in GrTextureProvider

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1728093005
DOCS_PREVIEW= https://skia.org/?cl=1728093005

Review URL: https://codereview.chromium.org/1728093005
/external/skia/src/gpu/GrResourceCache.cpp
56da02502019cfbb817898e37e320539b9838e2b 16-Nov-2015 mtklein <mtklein@chromium.org> Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac

Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba

Review URL: https://codereview.chromium.org/1436973003
/external/skia/src/gpu/GrResourceCache.cpp
3c2d32b8e27820a6e149d9ded67cbdf2411cc5c9 16-Nov-2015 mtklein <mtklein@google.com> Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of https://codereview.chromium.org/1436973003/ )

Reason for revert:
gotta put back *compute = 0.

Original issue's description:
> Switch uses of SkChecksum::Compute to Murmur3.
>
> SkChecksum::Compute is a very, very poorly distributed hash function.
> This replaces all remaining uses with Murmur3.
>
> The only interesting stuff is in src/gpu.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac
>
> Committed: https://skia.googlesource.com/skia/+/540e95483d285b555e9b1a73d18c16e7d7c0deba

TBR=bsalomon@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1448023005
/external/skia/src/gpu/GrResourceCache.cpp
540e95483d285b555e9b1a73d18c16e7d7c0deba 16-Nov-2015 mtklein <mtklein@chromium.org> Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac

Review URL: https://codereview.chromium.org/1436973003
/external/skia/src/gpu/GrResourceCache.cpp
0274efbd3d2c3b2fba2b4212347159a20050038d 13-Nov-2015 mtklein <mtklein@google.com> Revert of Switch uses of SkChecksum::Compute to Murmur3. (patchset #2 id:20001 of https://codereview.chromium.org/1436973003/ )

Reason for revert:
I would not have expected this to change any images.

Looks like it's changed both MSAA and non-MSAA GMs:
https://gold.skia.org/search2?blame=1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac&unt=true&head=true&query=source_type%3Dgm

Original issue's description:
> Switch uses of SkChecksum::Compute to Murmur3.
>
> SkChecksum::Compute is a very, very poorly distributed hash function.
> This replaces all remaining uses with Murmur3.
>
> The only interesting stuff is in src/gpu.
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac

TBR=bsalomon@google.com,mtklein@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review URL: https://codereview.chromium.org/1445523003
/external/skia/src/gpu/GrResourceCache.cpp
1d024a3c909ae5cefa5e8b339e2b52dc73ee85ac 13-Nov-2015 mtklein <mtklein@chromium.org> Switch uses of SkChecksum::Compute to Murmur3.

SkChecksum::Compute is a very, very poorly distributed hash function.
This replaces all remaining uses with Murmur3.

The only interesting stuff is in src/gpu.

BUG=skia:

Review URL: https://codereview.chromium.org/1436973003
/external/skia/src/gpu/GrResourceCache.cpp
0a5fa484fd58d27088f8696bdc11c8cc8f2b4866 15-Sep-2015 ericrk <ericrk@chromium.org> Add onMemoryDump to GrContext

Adds an entry point to GrContext to allow enumeration and tracing of GPU resources
via the newly added SkTraceMemoryDump.

Plan is for Chrome to call this on each of its GrContexts.

Dumps both the total size of GPU resources, as well as the total purgeable size.

BUG=526261

Review URL: https://codereview.chromium.org/1313743002
/external/skia/src/gpu/GrResourceCache.cpp
96fcdcc219d2a0d3579719b84b28bede76efba64 27-Aug-2015 halcanary <halcanary@google.com> Style Change: NULL->nullptr
DOCS_PREVIEW= https://skia.org/?cl=1316233002

Review URL: https://codereview.chromium.org/1316233002
/external/skia/src/gpu/GrResourceCache.cpp
385fe4d4b62d7d1dd76116dd570df3290a2f487b 26-Aug-2015 halcanary <halcanary@google.com> Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003

Review URL: https://codereview.chromium.org/1316123003
/external/skia/src/gpu/GrResourceCache.cpp
63926683c583e8497d9d907977e773663cb4bd9e 20-Aug-2015 robertphillips <robertphillips@google.com> Add ANGLE workaround to prefer flushes over VRAM usage

On the whole, https://codereview.chromium.org/1286203002/ (Defer flushes if kPreferNoIO is specified) improved performance but it did cause a performance regression on ANGLE. This CL disables the deferral of flushes on ANGLE until we can add a separate incremental flushing mechanism.

TBR=bsalomon@google.com

BUG=skia:4201
BUG=521529

Review URL: https://codereview.chromium.org/1287193008
/external/skia/src/gpu/GrResourceCache.cpp
6e83ac778f8f90939abe3aee3ea865428dff592f 13-Aug-2015 robertphillips <robertphillips@google.com> Defer flushes if kPreferNoIO is specified

Prior to this patch clients who were solely uploading to textures (e.g., SW Mask Mgr) would cause extra flushes b.c., even though kPreferNoIO was being specified, resources with pending IO would still be returned even though there was plenty of space in the resource cache.

Review URL: https://codereview.chromium.org/1286203002
/external/skia/src/gpu/GrResourceCache.cpp
6dc6f5f4a153d33ed91565cb3cd397a310a937d0 18-Jun-2015 bsalomon <bsalomon@google.com> Add support for creating texture backed images where Skia will delete the texture.

Review URL: https://codereview.chromium.org/1187523005
/external/skia/src/gpu/GrResourceCache.cpp
d9f8862ab6bed4195cbfe5dda48693e1062b01e2 09-Apr-2015 mtklein <mtklein@chromium.org> Valgrind sez: new[] wants delete[].

https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind/builds/17/steps/dm/logs/stdio

TBR=bsalomon@google.com

BUG=skia:

Review URL: https://codereview.chromium.org/1075853002
/external/skia/src/gpu/GrResourceCache.cpp
3f324321cdd8fde7976d958e2888a1ec4e657e35 08-Apr-2015 bsalomon <bsalomon@google.com> Add mechanism to proactively purge old resources in GrResourceCache.

This change leaves the feature turned off by default.

Review URL: https://codereview.chromium.org/1032873002
/external/skia/src/gpu/GrResourceCache.cpp
732a92db490acb8a4996e82c0d81387e4b24f90b 10-Mar-2015 kkinnunen <kkinnunen@nvidia.com> Increase maximum gpu resources from 1024 to 4096

Pictures with many drawn paths benefit from the increase of the
count. As an example, chalkboard testcase has ~2500 paths, tiger
has ~300.

Bigger objects, like textures, tend to be limited by the cache
byte limit, not item count.

Review URL: https://codereview.chromium.org/991783003
/external/skia/src/gpu/GrResourceCache.cpp
876c3132d75966829ad58b2f9b2957d50457cc29 04-Mar-2015 hendrikw <hendrikw@chromium.org> skia: Add tracing for skia's budget

We've run into several places where GPU rasterization slows down a lot,
and in some cases, it's due to use reaching skia's budget. This shows a
graph of skia's used and free budgeted memory.

Review URL: https://codereview.chromium.org/977143002
/external/skia/src/gpu/GrResourceCache.cpp
ddf30e64fe474847b204d7062fad3341d245062c 19-Feb-2015 bsalomon <bsalomon@google.com> Handle the case when the GrResourceCache timestamp wraps.

NOTREECHECKS=true

Review URL: https://codereview.chromium.org/916103006
/external/skia/src/gpu/GrResourceCache.cpp
f99e961f55bb603d099c8cb57d05a2ae52a4e9ca 19-Feb-2015 bsalomon <bsalomon@google.com> Allow resources' unique keys to be changed.

Review URL: https://codereview.chromium.org/938943002
/external/skia/src/gpu/GrResourceCache.cpp
8718aafec239c93485e45bbe8fed19d9a8def079 19-Feb-2015 bsalomon <bsalomon@google.com> Rename GrContentKey to GrUniqueKey

Review URL: https://codereview.chromium.org/940463006
/external/skia/src/gpu/GrResourceCache.cpp
f320e04c50a1c8a861bc1d8f50bf732044ff9843 18-Feb-2015 bsalomon <bsalomon@google.com> Use an array of nonpurgeable resources in GrResourceCache

Review URL: https://codereview.chromium.org/932863004
/external/skia/src/gpu/GrResourceCache.cpp
9f2d1571ed1f0ed579e5d7779c46a90e20f30f22 17-Feb-2015 bsalomon <bsalomon@google.com> Make GrResourceCache use a priority queue of purgeable resources.

Review URL: https://codereview.chromium.org/921323002
/external/skia/src/gpu/GrResourceCache.cpp
3582d3ee9fffdec715f5e4949a241ab08e6271ec 13-Feb-2015 bsalomon <bsalomon@google.com> Split out methods in GrGpuResource::CacheAccess that can be called outside of the cache.

Review URL: https://codereview.chromium.org/923143002
/external/skia/src/gpu/GrResourceCache.cpp
0ea80f43a1af05b8157a4ef387223bb5b0da35ed 11-Feb-2015 bsalomon <bsalomon@google.com> Rename GrResourceCache2->GrResourceCache

TBR=robertphillips@google.com

Review URL: https://codereview.chromium.org/921453002
/external/skia/src/gpu/GrResourceCache.cpp
71cb0c241e439b6ed746b90294d0b6916644a644 14-Nov-2014 bsalomon <bsalomon@google.com> Replace GrResourceCache with GrResourceCache2.

BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89

Review URL: https://codereview.chromium.org/716143004
/external/skia/src/gpu/GrResourceCache.cpp
ac49acda520292b059bc37fd368dff912626c3d9 14-Nov-2014 bsalomon <bsalomon@google.com> Revert of Replace GrResourceCache with GrResourceCache2. (patchset #7 id:120001 of https://codereview.chromium.org/716143004/)

Reason for revert:
broken again

Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6
>
> Committed: https://skia.googlesource.com/skia/+/407aa584d183c1bf314f5defd1cf0202e8a96c89

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/726913002
/external/skia/src/gpu/GrResourceCache.cpp
407aa584d183c1bf314f5defd1cf0202e8a96c89 14-Nov-2014 bsalomon <bsalomon@google.com> Replace GrResourceCache with GrResourceCache2.

BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

Review URL: https://codereview.chromium.org/716143004
/external/skia/src/gpu/GrResourceCache.cpp
f21dab95405979a4aff9f6a741c818304a67f220 13-Nov-2014 bsalomon <bsalomon@google.com> Revert of Replace GrResourceCache with GrResourceCache2. (patchset #6 id:100001 of https://codereview.chromium.org/716143004/)

Reason for revert:
Breaking stuff

Original issue's description:
> Replace GrResourceCache with GrResourceCache2.
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/66a450f21a3da174b7eed89a1d5fc8591e8b6ee6

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/715333003
/external/skia/src/gpu/GrResourceCache.cpp
66a450f21a3da174b7eed89a1d5fc8591e8b6ee6 13-Nov-2014 bsalomon <bsalomon@google.com> Replace GrResourceCache with GrResourceCache2.

BUG=skia:2889

Review URL: https://codereview.chromium.org/716143004
/external/skia/src/gpu/GrResourceCache.cpp
69ed47f42d4877c178fdc0031cb01af2966ae235 12-Nov-2014 bsalomon <bsalomon@google.com> Make GrGpuResource::gpuMemorySize non-virtual w/ onGpuMemorySize virtual impl

BUG=skia:2889

Review URL: https://codereview.chromium.org/702413003
/external/skia/src/gpu/GrResourceCache.cpp
453cf40ac7702722695bb09ae2c6df44c19d008b 11-Nov-2014 bsalomon <bsalomon@google.com> Add GrGpuResource::CacheAccess

Internal only helper class for manipulating and accessing cache keys.

BUG=skia:2889

Review URL: https://codereview.chromium.org/703303003
/external/skia/src/gpu/GrResourceCache.cpp
6d4488c5e03010c94200b3706631d34ec3201411 11-Nov-2014 bsalomon <bsalomon@google.com> Remove all knowledge of resource keys from the legacy cache.

BUG=skia:2889

Review URL: https://codereview.chromium.org/705413002
/external/skia/src/gpu/GrResourceCache.cpp
8b79d23f825cd9e0f9e3bf8aaa9e209940b17ef6 10-Nov-2014 bsalomon <bsalomon@google.com> Use GrResourceCache2 to service content key lookups

BUG=skia:2889

Review URL: https://codereview.chromium.org/707493002
/external/skia/src/gpu/GrResourceCache.cpp
37dd331b20a92ce79cc26556e065dec98a66cb0b 03-Nov-2014 bsalomon <bsalomon@google.com> Add class GrGLTextureRenderTarget for GL texture/rendertarget objects

BUG=skia:2889

Review URL: https://codereview.chromium.org/695813003
/external/skia/src/gpu/GrResourceCache.cpp
f2703d83da3ab2ae18b45231fd4f11e16cce3184 28-Oct-2014 bsalomon <bsalomon@google.com> rename GrTextureDesc->GrSurfaceDesc, GrTextureFlags->GrSurfaceFlags

Review URL: https://codereview.chromium.org/682223002
/external/skia/src/gpu/GrResourceCache.cpp
24234fe77718a553ccc6ffdea0f2ee3ef414e0b6 24-Oct-2014 bsalomon <bsalomon@google.com> Build gpu stats tracking in dev builds.

Fix cache stats, add more info.

BUG=skia:2889

Review URL: https://codereview.chromium.org/655263005
/external/skia/src/gpu/GrResourceCache.cpp
1e2530babb65a883a01df5ee87147432f6707ce3 09-Oct-2014 bsalomon <bsalomon@google.com> Use presence of a content key as non-scratch indicator

BUG=skia:2889

Committed: https://skia.googlesource.com/skia/+/9eefe0851eeaa8ded05b4774ebcb38ed201d5dbf

Review URL: https://codereview.chromium.org/639873002
/external/skia/src/gpu/GrResourceCache.cpp
0f9e8a720c583956ed6e291d018f40fa624bb40d 08-Oct-2014 bsalomon <bsalomon@google.com> Revert of Use presence of a content key as non-scratch indicator (patchset #5 id:80001 of https://codereview.chromium.org/639873002/)

Reason for revert:
breaking nanobench on ubuntu

Original issue's description:
> Use presence of a content key as non-scratch indicator
>
> BUG=skia:2889
>
> Committed: https://skia.googlesource.com/skia/+/9eefe0851eeaa8ded05b4774ebcb38ed201d5dbf

TBR=robertphillips@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:2889

Review URL: https://codereview.chromium.org/642493003
/external/skia/src/gpu/GrResourceCache.cpp
9eefe0851eeaa8ded05b4774ebcb38ed201d5dbf 08-Oct-2014 bsalomon <bsalomon@google.com> Use presence of a content key as non-scratch indicator

BUG=skia:2889

Review URL: https://codereview.chromium.org/639873002
/external/skia/src/gpu/GrResourceCache.cpp
bcf0a52d4f4221b158e68a06ba0c4cc4db011060 08-Oct-2014 bsalomon <bsalomon@google.com> GrResourceCache2 manages scratch texture.

BUG=skia:2889

Review URL: https://codereview.chromium.org/608883003
/external/skia/src/gpu/GrResourceCache.cpp
9323b8b8e16df4adcd63ee8496a6382e8df535c9 07-Oct-2014 Brian Salomon <bsalomon@google.com> Revert "GrResourceCache2 manages scratch texture."

This reverts commit d14e1a27643125bfef37fa0ed314b64c1fae22b7.
/external/skia/src/gpu/GrResourceCache.cpp
d14e1a27643125bfef37fa0ed314b64c1fae22b7 07-Oct-2014 bsalomon <bsalomon@google.com> GrResourceCache2 manages scratch texture.

BUG=skia:2889

Review URL: https://codereview.chromium.org/608883003
/external/skia/src/gpu/GrResourceCache.cpp
dbe6074a06efc5fb6883bb5e4f251ed67c8c0ab4 30-Sep-2014 robertphillips <robertphillips@google.com> Revert of GrResourceCache2 manages scratch texture. (patchset #14 id:260001 of https://codereview.chromium.org/608883003/)

Reason for revert:
Turning bots red:
Nanobench seems to be uniformly failing on Android
(http://108.170.220.21:10117/builders/Perf-Android-Venue8-PowerVR-x86-Release/builds/99/steps/RunNanobench/logs/stdio)

Ubuntu GTX660 32bit is failing in both Debug and Release on GM generation (it appears to be out of memory) (http://108.170.220.120:10117/builders/Test-Ubuntu12-ShuttleA-GTX660-x86-Debug/builds/2457/steps/GenerateGMs/logs/stdio)

Original issue's description:
> GrResourceCache2 manages scratch texture.
>
>
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/3d398c876440deaab39bbf2a9b881c337e6dc8d4

R=bsalomon@google.com
TBR=bsalomon@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Author: robertphillips@google.com

Review URL: https://codereview.chromium.org/611383003
/external/skia/src/gpu/GrResourceCache.cpp
3d398c876440deaab39bbf2a9b881c337e6dc8d4 30-Sep-2014 bsalomon <bsalomon@google.com> GrResourceCache2 manages scratch texture.

BUG=skia:
R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/608883003
/external/skia/src/gpu/GrResourceCache.cpp
49f085dddff10473b6ebf832a974288300224e60 05-Sep-2014 bsalomon <bsalomon@google.com> "NULL !=" = NULL

R=reed@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/544233002
/external/skia/src/gpu/GrResourceCache.cpp
c8dc1f74b6cdda9a43a638292a608c59c1d72d80 21-Aug-2014 bsalomon <bsalomon@google.com> Add GrResourceCache2.

Currently it just replaces GrGpu as the owner of the linked list of resources.

Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f

R=mtklein@google.com, robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/481443002
/external/skia/src/gpu/GrResourceCache.cpp
1d89ddc4a3aad153501cfdc93bc1d61eb49157f4 19-Aug-2014 bsalomon <bsalomon@google.com> Revert of Add GrResourceCache2. (patchset #4 of https://codereview.chromium.org/481443002/)

Reason for revert:
Likely caused a leak detected in Chromium after last Skia roll.

Original issue's description:
> Add GrResourceCache2.
>
> Currently it just replaces GrGpu as the owner of the linked list of resources.
>
> Committed: https://skia.googlesource.com/skia/+/94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f

R=mtklein@google.com, robertphillips@google.com
TBR=mtklein@google.com, robertphillips@google.com
NOTREECHECKS=true
NOTRY=true

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/477323006
/external/skia/src/gpu/GrResourceCache.cpp
94ce9ac8624dbb45656b8f5c992fad9c9ff3ee5f 19-Aug-2014 bsalomon <bsalomon@google.com> Add GrResourceCache2.

Currently it just replaces GrGpu as the owner of the linked list of resources.

R=robertphillips@google.com, mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/481443002
/external/skia/src/gpu/GrResourceCache.cpp
6d3fe022d68fd6dd32c0fab30e24fa5a4f048946 25-Jul-2014 bsalomon <bsalomon@google.com> Rename GrGpuObject to GrGpuResource

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/418143004
/external/skia/src/gpu/GrResourceCache.cpp
c44be0e9e4cee5402909c06370a630eee188a8f3 25-Jul-2014 bsalomon <bsalomon@google.com> Merge GrGpuObject and GrCacheable.

We want to create a new base class for "meta" gr resources as part of the GrResourceCache rewrite and this is an iterim step towards that goal.s

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/414013005
/external/skia/src/gpu/GrResourceCache.cpp
dcabb05113a732636691abc16d643a091336aea5 21-Jul-2014 bsalomon <bsalomon@google.com> Make GrCacheable implement its own ref counting.

R=robertphillips@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/392333008
/external/skia/src/gpu/GrResourceCache.cpp
11c6b39cfa24f812ceb115589f51a60a56ef14fe 05-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Adds a mechanism for GrCacheable objects to notify the resource cache
when their size has changed. GrResourceCacheEntry now holds a
reference to the cache, and a cached value of the resource's most
recent size.

Also utilizes this new functionality for mipmaps, and adds a test for
changing resource sizes.

R=bsalomon@google.com, robertphillips@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/257093002

git-svn-id: http://skia.googlecode.com/svn/trunk@14576 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
089a780c3355129eefc942246534bc1f126b8ccb 02-May-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Split GrResource into GrCacheable/GrGpuObject

Before this change, an object needed to inherit from GrResource (and
thus be a GPU object) in order to live in the GrResourceCache. That
was a problem for caching items that weren't GPU objects themselves,
but owned GPU objects.

This change splits GrResource into two classes:

1. GrCacheable: The base class for objects that can live in the
GrResourceCache.

2. GrGpuObject, which inherits from GrCacheable: The base class for
objects that get tracked by GrGpu.

This change is purely a refactor; there is no change in functionality.

Change-Id: I3e8daeb1f123041f414aa306c1366e959ae9e39e

BUG=skia:
R=bsalomon@google.com

Author: cdalton@nvidia.com

Review URL: https://codereview.chromium.org/251013002

git-svn-id: http://skia.googlecode.com/svn/trunk@14553 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
88cb22b6b4816c7a9ca6c5b795965b4606f9eb7b 30-Apr-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Convert GrCrash->SkFAIL GrDebugCrash->SkDEBUGFAIL

R=robertphillips@google.com, reed@google.com, mtklein@google.com

Author: bsalomon@google.com

Review URL: https://codereview.chromium.org/257393004

git-svn-id: http://skia.googlecode.com/svn/trunk@14460 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
bd58febffb103ea830bf027c5a95313548f7ea8e 17-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Speed up GrResourceCache add and lookup by using TDynamicHash

Speed up GrResourceCache add and lookup by using TDynamicHash instead
of GrTHashTable. GrTHashTable spends most of its time memmoving the
array elements while sorting after an add. Lookup is not particularly
fast either.

R=mtklein@google.com, bsalomon@google.com, reed@google.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/91453002

git-svn-id: http://skia.googlecode.com/svn/trunk@13122 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
c665804300096c2e7617379835bb83d715538788 16-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Move SkMessageBus::Get out of header, and retry crrev.com/106563002.

BUG=
R=bsalomon@google.com, kkinnunen@nvidia.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/140053002

git-svn-id: http://skia.googlecode.com/svn/trunk@13104 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
0f7e3470d63f77f062626ef68eb735301ad3eb20 10-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert of https://codereview.chromium.org/106563002/
Reason for revert: There's a threading issue I don't quite understand yet. Objects are being deleted after we check they're deleted. Will try again.

R=kkinnunen@nvidia.com, kkinnunen@nvidia.com
TBR=kkinnunen@nvidia.com, kkinnunen@nvidia.com
NOTREECHECKS=true
NOTRY=true

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/134363002

git-svn-id: http://skia.googlecode.com/svn/trunk@13023 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
2b8aacba5299a2759268de7de13af9f319ba39d5 10-Jan-2014 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Delete all invalidated resources with same key

Delete all invalidated resources with same key instead of deleting
just the first resource.

R=mtklein@google.com, kkinnunen@nvidia.com

Author: kkinnunen@nvidia.com

Review URL: https://codereview.chromium.org/106563002

git-svn-id: http://skia.googlecode.com/svn/trunk@13019 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
50a3043194cf278a74ff51c33c6cdb52cbe1f8f9 24-Oct-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> We want to give SkPixelRef a way to signal over to GrResourceCache that it's become pointless to keep around textures based on that SkPixelRef when its pixels change, so that it can be a good citizen and free those textures.

This adds an invalidation listener mechanism to SkPixelRef to let it send this message while still staying ignorant of who's listening.

These messages are tricky to deliver. The SkPixelRefs they originates from and the GrResourceCaches they ultimately end up at may be on different threads; neither class is threadsafe; their object lifetimes are totally independent; it's a many-senders-to-many-receivers relation; and neither codebase should really know about the other.

So I've added a per-message-type global message bus to broadcast messages to threadsafe inboxes. Anyone can post() a message, which will show up in all the inboxes of that type, read whenever the inbox's owner calls poll(). The implementation is _dumb_; it can be improved in several dimensions (inbox size limits, lock-free message delivery) if we find the need.

I took some care to make sure not to send the invalidation message for any SkPixelRef that's sharing a generation ID with another SkPixelRef.

BUG=
R=bsalomon@google.com, scroggo@google.com, reed@google.com

Author: mtklein@google.com

Review URL: https://codereview.chromium.org/26734003

git-svn-id: http://skia.googlecode.com/svn/trunk@11949 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
adacc7067ad617cdc7bbef39192ca80f4b4d27f9 14-Oct-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Start cleaning up 64bit Win warnings

https://codereview.chromium.org/27192003/



git-svn-id: http://skia.googlecode.com/svn/trunk@11764 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
515dcd36032997ce335daa0163c6d67e851bcad1 28-Aug-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Replace uses of GR_DEBUG by SK_DEBUG.

BUG=None
R=bsalomon@google.com, robertphillips@google.com

Author: tfarina@chromium.org

Review URL: https://chromiumcodereview.appspot.com/23137022

git-svn-id: http://skia.googlecode.com/svn/trunk@10978 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
f6de475e5cbd143f348ff7738919e397b7fe7f57 17-Aug-2013 tfarina@chromium.org <tfarina@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Replace uses of GrAssert by SkASSERT.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/22850006

git-svn-id: http://skia.googlecode.com/svn/trunk@10789 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
f64c6842c15e1ba126639be7578e4642cb396987 20-Jul-2013 bungeman@google.com <bungeman@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add a 'unique' method to SkRefCnt, document the usage, and add support.

std::shared_ptr has a method called 'unique' which captures the concept that
a reference count of 1 is special, and can be used to optimize copy on write.
It also has some undocumented need for memory barriers in certain situations
and those needs are documented here.

The motivation for looking into this is crbug.com/258499 . The use of the
reference count in this manner is a benign race with both ref() and unref().
By introducing sk_atomic_unprotected_read, it is possible for Chromium to
annotate this read to tell ThreadSanitizer that this is known.

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/18770007

git-svn-id: http://skia.googlecode.com/svn/trunk@10221 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
e4eaea2d126d58d8ce4034a1ce921404e83fe3f4 19-Jul-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Alter resource cache and GrContext to (optionally) never reuse a scratch texture

https://codereview.chromium.org/19482004/



git-svn-id: http://skia.googlecode.com/svn/trunk@10193 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
a79919883e275e7a5e00afc50be10cc721f6ba1d 19-Jul-2013 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Housekeeper-Nightly

git-svn-id: http://skia.googlecode.com/svn/trunk@10175 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
41d2532931a2e85b56ae112047d57927cb09ef6f 18-Jul-2013 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> The rest of: Add purgeAsNeeded calls before addResource calls

https://codereview.chromium.org/19591003/



git-svn-id: http://skia.googlecode.com/svn/trunk@10146 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
cae27fed5e45e8899e56ece22b27e8958ffc0162 10-Jul-2013 commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> Allow the resource cache to (indirectly) flush the InOrderDrawBuffer

R=bsalomon@google.com

Author: robertphillips@google.com

Review URL: https://chromiumcodereview.appspot.com/18466005

git-svn-id: http://skia.googlecode.com/svn/trunk@9949 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
5b25a8d72d129cdfd8fe001635941cf725bcf2bd 07-Feb-2013 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove GR_DUMP_TEXTURE_UPLOADS

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/7300062

git-svn-id: http://skia.googlecode.com/svn/trunk@7652 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
0797c2cceadd7dfc2e7f9efa30b611d18efcdcdd 20-Dec-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Reland 6914 w/ fixes.



git-svn-id: http://skia.googlecode.com/svn/trunk@6916 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
0b6ad2297fbf43466950690102c1c9c150f2a972 20-Dec-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert 6914 to fix build issues.



git-svn-id: http://skia.googlecode.com/svn/trunk@6915 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
4b86e3428b115202e82d49a0914ea8ab6dc25940 20-Dec-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Simplify cache IDs and keys.

R=robertphillips@google.com
Review URL: https://codereview.appspot.com/6954047

git-svn-id: http://skia.googlecode.com/svn/trunk@6914 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
f3dc199c0b18e35ac8de4075ecbede7a484f1b0d 01-Nov-2012 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@6228 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
209a1143a1a26935578d45c7f86dc6f9aa2eb1a6 31-Oct-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Ganesh resource cache changes

https://codereview.appspot.com/6784051/



git-svn-id: http://skia.googlecode.com/svn/trunk@6211 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
9fbcad0f00d7098574cf3394a812c9d845c9cc5b 09-Sep-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Removed old resource locking system

https://codereview.appspot.com/6488098/



git-svn-id: http://skia.googlecode.com/svn/trunk@5453 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
6c778164a743f8760dca251524d51848548b436f 06-Sep-2012 skia.committer@gmail.com <skia.committer@gmail.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Sanitizing source files in Skia_Periodic_House_Keeping

git-svn-id: http://skia.googlecode.com/svn/trunk@5410 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
f2e93fc989129f11881919de99a3b8f12081beae 05-Sep-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Resource cache now explicitly takes ref of managed resources

https://codereview.appspot.com/6489085/



git-svn-id: http://skia.googlecode.com/svn/trunk@5407 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
d6bbbf8a831cc982cda9b91e84c5600c631af5b2 05-Sep-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Simplified stencil buffer caching

https://codereview.appspot.com/6503073/



git-svn-id: http://skia.googlecode.com/svn/trunk@5400 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
6fc9518a55d57f362b4e13f4a48fa6d9c85d0cd2 04-Sep-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Don't purge resources from cache if they have > 1 ref

https://codereview.appspot.com/6494069/



git-svn-id: http://skia.googlecode.com/svn/trunk@5380 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
5955202c805c7ef1448103cbf666972ea9d1ded1 31-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Allow cache tracking to be enabled in release

https://codereview.appspot.com/6500057/



git-svn-id: http://skia.googlecode.com/svn/trunk@5365 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
d07cb0c0370de521169500c26b8d534a001cf580 30-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Begin moving locking out of GrResourceCache

http://codereview.appspot.com/6498064/



git-svn-id: http://skia.googlecode.com/svn/trunk@5354 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
a9b0623eac4a473517c15418dbdc1e331ee752d2 30-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Added find, lock to GrContext & GrResourceCache interfaces

https://codereview.appspot.com/6499052/



git-svn-id: http://skia.googlecode.com/svn/trunk@5343 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
a292112154f803feb9f5cc002bbfab559f7cb633 28-Aug-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove SkGpuDevice::fTexture, use new pixel ref class name

Review URL: https://codereview.appspot.com/6474068/


git-svn-id: http://skia.googlecode.com/svn/trunk@5307 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
fbfcd5602128ec010c82cb733c9cdc0a3254f9f3 23-Aug-2012 rmistry@google.com <rmistry@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Result of running tools/sanitize_source_files.py (which was added in https://codereview.appspot.com/6465078/)

This CL is part I of IV (I broke down the 1280 files into 4 CLs).
Review URL: https://codereview.appspot.com/6485054

git-svn-id: http://skia.googlecode.com/svn/trunk@5262 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
2ea0a231a82b00e14c57806f6ae4664361d2ed16 23-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Refactored GrDLinkedList into SkTDLinkedList

http://codereview.appspot.com/6484045/



git-svn-id: http://skia.googlecode.com/svn/trunk@5247 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
521eaf8cc73cebebeaf54338c51c22922ac70951 22-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Scratch textures are no longer removed from the cache in Debug

http://codereview.appspot.com/6465079/



git-svn-id: http://skia.googlecode.com/svn/trunk@5221 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
5f9f2f574fe9b195f5f3e40edeb2e28b673511fd 22-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Added resource cache debug output to help track changes

http://codereview.appspot.com/6463079/



git-svn-id: http://skia.googlecode.com/svn/trunk@5220 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
1f47f4f7325971dd53991e2bb02da94fa7c6d962 16-Aug-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Replaced TextureCacheEntry with GrTexture* and a back pointer to GrResourceEntry (in GrTexture)

http://codereview.appspot.com/6460089/



git-svn-id: http://skia.googlecode.com/svn/trunk@5122 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
c377baf406996aed18d82d328029c82dbc3b8dda 09-Jul-2012 tomhudson@google.com <tomhudson@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Add placement new macros to SkPostConfig, call SkNEW* from Ganesh.

TODO: unify with the placement new implementation in SkTemplatesPriv.h,
once various issues there are overcome. reed@ should be taking the lead
there.

http://codereview.appspot.com/6384043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4492 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
386319eebb806f62a60b16826750f364edc94ce5 27-Jun-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Fixed Resource counting bug in AutoScratchTexture detach mechanism

http://codereview.appspot.com/6356043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4361 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
07fc0d178e20f74a88dd78384f817b53204e625f 22-Jun-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Revert r4287. Large numbers of textures created by random gradients can cause poor driver performance (at least on Mac)

BUG=670



git-svn-id: http://skia.googlecode.com/svn/trunk@4306 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
15c0fea699b25343fe6f49668a5632866e1a0306 22-Jun-2012 robertphillips@google.com <robertphillips@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> AutoScratchTexture can now release its texture and it will return to the texture cache when freed

http://codereview.appspot.com/6262043/



git-svn-id: http://skia.googlecode.com/svn/trunk@4301 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
8f7e1dac5c92bf1f53feb603a9bd249d53afa81a 21-Jun-2012 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove count budget from resource cache

Review URL: http://codereview.appspot.com/6312052/



git-svn-id: http://skia.googlecode.com/svn/trunk@4287 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
cf6285b89b8820641ffb6871d4b3275bfe783f51 06-Jun-2012 caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> fix warnings on Mac in src/gpu and include/gpu

Fix these class of warnings:
- unused functions
- unused locals
- sign mismatch
- missing function prototypes
- missing newline at end of file
- 64 to 32 bit truncation

The changes prefer to link in dead code in the debug build
with 'if (false)' than to comment it out, but trivial cases
are commented out or sometimes deleted if it appears to be
a copy/paste error.
Review URL: https://codereview.appspot.com/6296044

git-svn-id: http://skia.googlecode.com/svn/trunk@4180 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
0ec107f396a566bac2a7787b982a76c9c27c0d2f 21-Feb-2012 twiz@google.com <twiz@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Remove incorrect GrAssert calls in GrResourceCache::removeAll

The asserts in GrResourceCache are too aggressive, and assume that all resources are always purged. Locked resources will not be purged.

BUG=114861
Review URL: https://codereview.appspot.com/5674096

git-svn-id: http://skia.googlecode.com/svn/trunk@3226 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
fb30951cd9346a7a2d36e7d5f81f9e7ee792b669 30-Nov-2011 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> [GPU] tile when large bitmap pased drawBitmap and only a small fraction is used

Review URL: http://codereview.appspot.com/5450048/



git-svn-id: http://skia.googlecode.com/svn/trunk@2760 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp
d38f137e9b813f8193675ebd3dfbfe8bc42639e9 12-Oct-2011 bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> Move gpu/include/* to include/gpu and gpu/src/* to src/gpu
Review URL: http://codereview.appspot.com/5250070/



git-svn-id: http://skia.googlecode.com/svn/trunk@2471 2bbb7eff-a529-9590-31e7-b0007b416f81
/external/skia/src/gpu/GrResourceCache.cpp