Store mipmap levels in deferred texture image
authorcblume <cblume@chromium.org>
Tue, 30 Aug 2016 19:09:23 +0000 (12:09 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 30 Aug 2016 19:09:23 +0000 (12:09 -0700)
commit33e0cb5e7f9926b96db209c825f1eeca7c15bb16
tree223df9287fcea04f9e686aee68a63f58ba34f3f0
parentfdf2986b1965dfc6a6067858e558914d6103d43a
Store mipmap levels in deferred texture image

This is a follow-up to https://codereview.chromium.org/2115023002/ and
https://codereview.chromium.org/2034933003/ which were reverted due to
an access violation and a memory leak, respectively.

When creating the deferred texture image, detect if using medium / high
quality. If so, generate and store mipmaps in the deferred texture
image.

When creating a texture from that be sure to read it back out.

BUG=578304
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2242883004

Review-Url: https://codereview.chromium.org/2242883004
gm/deferredtextureimage.cpp [new file with mode: 0644]
gm/deferredtextureimagedata.cpp [deleted file]
include/core/SkImage.h
src/image/SkImage.cpp
src/image/SkImage_Gpu.cpp
tests/ImageTest.cpp