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

Unified Diff: src/image/SkImageShader.cpp

Issue 2037413002: Add SkSourceGammaTreatment enum so we know how to create mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix DM compilation Created 4 years, 6 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/image/SkImageShader.h ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImageShader.cpp
diff --git a/src/image/SkImageShader.cpp b/src/image/SkImageShader.cpp
index d12ee030a2a19a921a75d778e5521626a0f8a589..b2fab39e11869291a8d3b854a7e46c779d261bb9 100644
--- a/src/image/SkImageShader.cpp
+++ b/src/image/SkImageShader.cpp
@@ -83,10 +83,12 @@ void SkImageShader::toString(SkString* str) const {
#include "effects/GrBicubicEffect.h"
#include "effects/GrSimpleTextureEffect.h"
-const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context,
- const SkMatrix& viewM,
- const SkMatrix* localMatrix,
- SkFilterQuality filterQuality) const {
+const GrFragmentProcessor* SkImageShader::asFragmentProcessor(
+ GrContext* context,
+ const SkMatrix& viewM,
+ const SkMatrix* localMatrix,
+ SkFilterQuality filterQuality,
+ SkSourceGammaTreatment gammaTreatment) const {
SkMatrix matrix;
matrix.setIDiv(fImage->width(), fImage->height());
@@ -113,7 +115,7 @@ const GrFragmentProcessor* SkImageShader::asFragmentProcessor(GrContext* context
GrTextureParams::FilterMode textureFilterMode =
GrSkFilterQualityToGrFilterMode(filterQuality, viewM, this->getLocalMatrix(), &doBicubic);
GrTextureParams params(tm, textureFilterMode);
- SkAutoTUnref<GrTexture> texture(as_IB(fImage)->asTextureRef(context, params));
+ SkAutoTUnref<GrTexture> texture(as_IB(fImage)->asTextureRef(context, params, gammaTreatment));
if (!texture) {
return nullptr;
}
« no previous file with comments | « src/image/SkImageShader.h ('k') | src/image/SkImage_Base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698