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

Unified Diff: src/gpu/SkGpuDevice_drawTexture.cpp

Issue 2182603003: Just pass the draw context to paint conversion (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
Index: src/gpu/SkGpuDevice_drawTexture.cpp
diff --git a/src/gpu/SkGpuDevice_drawTexture.cpp b/src/gpu/SkGpuDevice_drawTexture.cpp
index 6014e952139c1bfb606a670b18a378fbeaa7942d..da0a4acd4526bf8d8b4ae9e6d2c17549a344b6bb 100644
--- a/src/gpu/SkGpuDevice_drawTexture.cpp
+++ b/src/gpu/SkGpuDevice_drawTexture.cpp
@@ -201,19 +201,16 @@ void SkGpuDevice::drawTextureProducerImpl(GrTextureProducer* producer,
}
textureMatrix = &tempMatrix;
}
- bool gammaCorrect = this->surfaceProps().isGammaCorrect();
- SkSourceGammaTreatment gammaTreatment = gammaCorrect
- ? SkSourceGammaTreatment::kRespect : SkSourceGammaTreatment::kIgnore;
sk_sp<GrFragmentProcessor> fp(producer->createFragmentProcessor(
*textureMatrix, clippedSrcRect, constraintMode, coordsAllInsideSrcRect, filterMode,
- fDrawContext->getColorSpace(), gammaTreatment));
+ fDrawContext->getColorSpace(), fDrawContext->sourceGammaTreatment()));
if (!fp) {
return;
}
GrPaint grPaint;
- if (!SkPaintToGrPaintWithTexture(fContext, paint, viewMatrix, fp, producer->isAlphaOnly(),
- gammaCorrect, fDrawContext->getColorSpace(), &grPaint)) {
+ if (!SkPaintToGrPaintWithTexture(fContext, fDrawContext.get(), paint, viewMatrix, fp,
+ producer->isAlphaOnly(), &grPaint)) {
return;
}
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | src/gpu/SkGr.cpp » ('j') | src/gpu/text/GrAtlasTextContext.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698