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

Unified Diff: src/core/SkImageFilter.cpp

Issue 2163343002: Adding color space to SkSpecialImage (Closed) Base URL: https://skia.googlesource.com/skia.git@colorspace-on-image
Patch Set: 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
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 9e215258fdab2657b4bfafd055d9beb603f19ffb..c519bcdfac63ebd881cf011ef65427ccc9143969 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -275,7 +275,8 @@ bool SkImageFilter::canComputeFastBounds() const {
#if SK_SUPPORT_GPU
sk_sp<SkSpecialImage> SkImageFilter::DrawWithFP(GrContext* context,
sk_sp<GrFragmentProcessor> fp,
- const SkIRect& bounds) {
+ const SkIRect& bounds,
+ sk_sp<SkColorSpace> colorSpace) {
GrPaint paint;
paint.addColorFragmentProcessor(std::move(fp));
paint.setPorterDuffXPFactory(SkXfermode::kSrc_Mode);
@@ -294,7 +295,7 @@ sk_sp<SkSpecialImage> SkImageFilter::DrawWithFP(GrContext* context,
drawContext->fillRectToRect(clip, paint, SkMatrix::I(), dstRect, srcRect);
robertphillips 2016/07/20 19:44:39 // TODO: get the colorSpace from the drawContext (
return SkSpecialImage::MakeFromGpu(dstIRect, kNeedNewImageUniqueID_SpecialImage,
- drawContext->asTexture());
+ drawContext->asTexture(), std::move(colorSpace));
}
#endif

Powered by Google App Engine
This is Rietveld 408576698