Adds a mechanism for GrCacheable objects to notify the resource cache
authorcommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 5 May 2014 19:09:13 +0000 (19:09 +0000)
committercommit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>
Mon, 5 May 2014 19:09:13 +0000 (19:09 +0000)
commit11c6b39cfa24f812ceb115589f51a60a56ef14fe
treec485379fe950057e163ce2f41962d2607125e7e3
parent7e9fb8ddd63fecbc469a2eb011793e08fb0adea5
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
include/gpu/GrCacheable.h
include/gpu/GrTexture.h
src/gpu/GrResourceCache.cpp
src/gpu/GrResourceCache.h
src/gpu/GrTexture.cpp
tests/ResourceCacheTest.cpp