Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(291)

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 2250403003: Add alpha type to texture producer (Closed) Base URL: https://skia.googlesource.com/skia.git@image-alpha-type
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/SkGpuDevice.cpp
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 44d4354d45e0bef72414d7cbd924095c7ce7eb0c..ce7299e755dbfce2567bbca04c8ca00ff3ec2a47 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1318,7 +1318,7 @@ void SkGpuDevice::drawImage(const SkDraw& draw, const SkImage* image, SkScalar x
uint32_t pinnedUniqueID;
if (sk_sp<GrTexture> tex = as_IB(image)->refPinnedTexture(&pinnedUniqueID)) {
CHECK_SHOULD_DRAW(draw);
- GrTextureAdjuster adjuster(tex.get(), image->bounds(), pinnedUniqueID,
+ GrTextureAdjuster adjuster(tex.get(), image->alphaType(), image->bounds(), pinnedUniqueID,
as_IB(image)->onImageInfo().colorSpace());
this->drawTextureProducer(&adjuster, nullptr, nullptr, SkCanvas::kFast_SrcRectConstraint,
viewMatrix, fClip, paint);
@@ -1350,7 +1350,7 @@ void SkGpuDevice::drawImageRect(const SkDraw& draw, const SkImage* image, const
uint32_t pinnedUniqueID;
if (sk_sp<GrTexture> tex = as_IB(image)->refPinnedTexture(&pinnedUniqueID)) {
CHECK_SHOULD_DRAW(draw);
- GrTextureAdjuster adjuster(tex.get(), image->bounds(), pinnedUniqueID,
+ GrTextureAdjuster adjuster(tex.get(), image->alphaType(), image->bounds(), pinnedUniqueID,
as_IB(image)->onImageInfo().colorSpace());
this->drawTextureProducer(&adjuster, src, &dst, constraint, *draw.fMatrix, fClip, paint);
return;
@@ -1421,7 +1421,7 @@ void SkGpuDevice::drawImageNine(const SkDraw& draw, const SkImage* image,
uint32_t pinnedUniqueID;
if (sk_sp<GrTexture> tex = as_IB(image)->refPinnedTexture(&pinnedUniqueID)) {
CHECK_SHOULD_DRAW(draw);
- GrTextureAdjuster adjuster(tex.get(), image->bounds(), pinnedUniqueID,
+ GrTextureAdjuster adjuster(tex.get(), image->alphaType(), image->bounds(), pinnedUniqueID,
as_IB(image)->onImageInfo().colorSpace());
this->drawProducerNine(draw, &adjuster, center, dst, paint);
} else {
« no previous file with comments | « src/gpu/GrTextureParamsAdjuster.cpp ('k') | src/image/SkImage_Gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698