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

Unified Diff: src/gpu/SkGpuDevice.cpp

Issue 2163343002: Adding color space to SkSpecialImage (Closed) Base URL: https://skia.googlesource.com/skia.git@colorspace-on-image
Patch Set: Fix compile after rebase Created 4 years, 5 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/effects/SkXfermodeImageFilter.cpp ('k') | tests/ImageFilterCacheTest.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 b91a84a33a05ba7063e79eca56944d82a43137a3..f8033ec12f99406a6f6db3c14131860ed5464b75 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1240,7 +1240,8 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap,
sk_sp<SkSpecialImage> srcImg(SkSpecialImage::MakeFromGpu(srcRect,
bitmap.getGenerationID(),
- std::move(texture),
+ std::move(texture),
+ sk_ref_sp(bitmap.colorSpace()),
&this->surfaceProps()));
this->drawSpecial(draw, srcImg.get(), left, top, paint);
@@ -1406,7 +1407,8 @@ sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkBitmap& bitmap) {
return SkSpecialImage::MakeFromGpu(bitmap.bounds(),
bitmap.getGenerationID(),
- sk_ref_sp(texture),
+ sk_ref_sp(texture),
+ sk_ref_sp(bitmap.colorSpace()),
&this->surfaceProps());
}
@@ -1417,7 +1419,8 @@ sk_sp<SkSpecialImage> SkGpuDevice::makeSpecial(const SkImage* image) {
return SkSpecialImage::MakeFromGpu(SkIRect::MakeWH(image->width(), image->height()),
image->uniqueID(),
- sk_ref_sp(texture),
+ sk_ref_sp(texture),
+ sk_ref_sp(as_IB(image)->onImageInfo().colorSpace()),
&this->surfaceProps());
} else if (image->peekPixels(&pm)) {
SkBitmap bm;
@@ -1451,7 +1454,8 @@ sk_sp<SkSpecialImage> SkGpuDevice::snapSpecial() {
return SkSpecialImage::MakeFromGpu(srcRect,
kNeedNewImageUniqueID_SpecialImage,
- std::move(texture),
+ std::move(texture),
+ sk_ref_sp(ii.colorSpace()),
&this->surfaceProps());
}
« no previous file with comments | « src/effects/SkXfermodeImageFilter.cpp ('k') | tests/ImageFilterCacheTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698