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

Unified Diff: src/core/SkImageFilter.cpp

Issue 2164363002: Add SkColorSpace to GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Remove ':' from comment 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 | « samplecode/SampleApp.cpp ('k') | src/core/SkSpecialImage.cpp » ('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 18ebcc8e14731261615156a2b60e87f53c47f4a8..49278254c2e6b04805391c9870cd9037975058d2 100644
--- a/src/core/SkImageFilter.cpp
+++ b/src/core/SkImageFilter.cpp
@@ -283,7 +283,8 @@ sk_sp<SkSpecialImage> SkImageFilter::DrawWithFP(GrContext* context,
sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kApprox,
bounds.width(), bounds.height(),
- kRGBA_8888_GrPixelConfig));
+ kRGBA_8888_GrPixelConfig,
+ std::move(colorSpace)));
if (!drawContext) {
return nullptr;
}
@@ -294,9 +295,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(), std::move(colorSpace));
+ drawContext->asTexture(),
+ sk_ref_sp(drawContext->getColorSpace()));
}
#endif
« no previous file with comments | « samplecode/SampleApp.cpp ('k') | src/core/SkSpecialImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698