diff options
author | Robert Phillips <robertphillips@google.com> | 2017-03-09 16:36:32 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-03-10 15:02:11 +0000 |
commit | b726d58efc91c4eefa5cea0881a823ee108db8fd (patch) | |
tree | 2d43fa8827137d7491f6030c8f99d138e7100d5d /tools | |
parent | f7005200725f1a96c7174be3e9a3175f9aa19151 (diff) |
Partially defer SkImage_Gpu
One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.
Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d
Reviewed-on: https://skia-review.googlesource.com/9488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpu/GrTest.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp index fa0556d11f..15faffadac 100644 --- a/tools/gpu/GrTest.cpp +++ b/tools/gpu/GrTest.cpp @@ -130,15 +130,9 @@ sk_sp<SkImage> GrContext::getFontAtlasImage_ForTesting(GrMaskFormat format) { return nullptr; } - GrTexture* tex = proxy->instantiate(this->resourceProvider()); - if (!tex) { - return nullptr; - } - - // MDB TODO: add proxy-backed SkImage_Gpu's - sk_sp<SkImage> image(new SkImage_Gpu(tex->width(), tex->height(), - kNeedNewImageUniqueID, kPremul_SkAlphaType, - sk_ref_sp(tex), nullptr, SkBudgeted::kNo)); + SkASSERT(proxy->priv().isExact()); + sk_sp<SkImage> image(new SkImage_Gpu(this, kNeedNewImageUniqueID, kPremul_SkAlphaType, + std::move(proxy), nullptr, SkBudgeted::kNo)); return image; } |