diff options
author | Brian Osman <brianosman@google.com> | 2017-04-24 16:44:03 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-24 21:11:44 +0000 |
commit | a28e2b07b7a11fc14be7178a32ce6bf726d8b0bd (patch) | |
tree | 3a190a1ea705078f9a2358631590a3f455ba4933 /src/image | |
parent | 42a2a20b9114c904ce73d66d0105b81f19d93914 (diff) |
Simplify SkImageCacherator slightly
- lockAsBitmap supported reading back textures to a bitmap, but this was
only used by one GM. Removed all of that code, and merged the two bitmap
functions together.
- To make the GM cleaner, don't use SkImageCacherator directly - construct
actual images.
Bug: skia:
Change-Id: Iad17184a02a72f89ccc851fa158764d6c871befa
Reviewed-on: https://skia-review.googlesource.com/14192
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/image')
-rw-r--r-- | src/image/SkImage_Lazy.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/image/SkImage_Lazy.cpp b/src/image/SkImage_Lazy.cpp index b1f243b151..5fd0f61a53 100644 --- a/src/image/SkImage_Lazy.cpp +++ b/src/image/SkImage_Lazy.cpp @@ -80,7 +80,9 @@ SkData* SkImage_Lazy::onRefEncoded(GrContext* ctx) const { bool SkImage_Lazy::getROPixels(SkBitmap* bitmap, SkColorSpace* dstColorSpace, CachingHint chint) const { - return fCache.lockAsBitmap(nullptr, bitmap, this, dstColorSpace, chint); + SkImageCacherator::CachedFormat cacheFormat = fCache.chooseCacheFormat(dstColorSpace); + SkImageInfo cacheInfo = fCache.buildCacheInfo(cacheFormat); + return fCache.lockAsBitmap(bitmap, this, chint, cacheFormat, cacheInfo); } #if SK_SUPPORT_GPU |