aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image/SkImage_Gpu.h
diff options
context:
space:
mode:
authorGravatar brianosman <brianosman@google.com>2016-08-17 14:01:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-17 14:01:05 -0700
commit69c166d2ce3f4d2099f35f8e88f1aa56ceeaf960 (patch)
treeb4dd37edab6952e67c7362a247014016abac37a5 /src/image/SkImage_Gpu.h
parenta7eaf2e7e84ff10d1ed76b5d1e039c1a2d931392 (diff)
Add alphaType() to SkImage
Keep isOpaque as a convenience method -- many places really only need to know that for optimization purposes (SrcOver -> Src, etc...). In all the places where we pull data back out or convert to another object and need to supply an SkImageInfo, we can avoid losing information about premulness. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250663002 Review-Url: https://codereview.chromium.org/2250663002
Diffstat (limited to 'src/image/SkImage_Gpu.h')
-rw-r--r--src/image/SkImage_Gpu.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/image/SkImage_Gpu.h b/src/image/SkImage_Gpu.h
index 44949a13ac..a9d9c33f2d 100644
--- a/src/image/SkImage_Gpu.h
+++ b/src/image/SkImage_Gpu.h
@@ -28,6 +28,7 @@ public:
~SkImage_Gpu() override;
SkImageInfo onImageInfo() const override;
+ SkAlphaType onAlphaType() const override { return fAlphaType; }
void applyBudgetDecision() const {
if (SkBudgeted::kYes == fBudgeted) {
@@ -47,7 +48,6 @@ public:
*uniqueID = this->uniqueID();
return sk_ref_sp(fTexture.get());
}
- bool isOpaque() const override;
bool onReadPixels(const SkImageInfo&, void* dstPixels, size_t dstRowBytes,
int srcX, int srcY, CachingHint) const override;