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

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: 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 | « include/core/SkImageFilter.h ('k') | src/core/SkSpecialImage.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkImageFilter.cpp
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp
index 9e215258fdab2657b4bfafd055d9beb603f19ffb..18ebcc8e14731261615156a2b60e87f53c47f4a8 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);
@@ -293,8 +294,9 @@ sk_sp<SkSpecialImage> SkImageFilter::DrawWithFP(GrContext* context,
GrFixedClip clip(dstIRect);
drawContext->fillRectToRect(clip, paint, SkMatrix::I(), dstRect, srcRect);
+ // TODO: Get the colorSpace from the drawContext (once it has one)
return SkSpecialImage::MakeFromGpu(dstIRect, kNeedNewImageUniqueID_SpecialImage,
- drawContext->asTexture());
+ drawContext->asTexture(), std::move(colorSpace));
}
#endif
« no previous file with comments | « include/core/SkImageFilter.h ('k') | src/core/SkSpecialImage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698