Expand SkImage::getTextureHandle call
authorRobert Phillips <robertphillips@google.com>
Tue, 31 Jan 2017 22:53:34 +0000 (17:53 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Wed, 1 Feb 2017 16:04:41 +0000 (16:04 +0000)
commit3390e1526975e4250402e6642cd6875401abfc9e
tree85314856209b7a17aff0e001ae4a45bd952f693d
parent77b3f32936dd069fa6a27f870b3b30035733d940
Expand SkImage::getTextureHandle call

AFAICT cc/output/gl_renderer.cc only calls SkImage:getTexture to determine the origin of the backing GrTexture. What do y'all think of this CL as a means of removing that call to getTexture?

One alternative would be to add a new entry point like:

bool SkImage::getBackendTextureDesc(GrBackendTextureDesc* desc) const;

which fills in the entire desc and returns whether the image is texture backed.

Change-Id: Idd302c0a11d69ad08e0100bcf546b3bbaa7cf27e
Reviewed-on: https://skia-review.googlesource.com/7788
Reviewed-by: Mike Reed <reed@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
include/core/SkImage.h
src/image/SkImage.cpp
tests/ImageFilterCacheTest.cpp
tests/ImageTest.cpp