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

Unified Diff: src/gpu/GrImageIDTextureAdjuster.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/gpu/GrImageIDTextureAdjuster.h ('k') | src/gpu/GrTextureParamsAdjuster.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrImageIDTextureAdjuster.cpp
diff --git a/src/gpu/GrImageIDTextureAdjuster.cpp b/src/gpu/GrImageIDTextureAdjuster.cpp
index 21c2f333589b9b1d913220c4063daa99a6475d60..4ff3ed5d956f4e4daec4ee597e175cab2d55d381 100644
--- a/src/gpu/GrImageIDTextureAdjuster.cpp
+++ b/src/gpu/GrImageIDTextureAdjuster.cpp
@@ -81,7 +81,8 @@ GrBitmapTextureMaker::GrBitmapTextureMaker(GrContext* context, const SkBitmap& b
}
}
-GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) {
+GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped,
+ SkSourceGammaTreatment gammaTreatment) {
GrTexture* tex = nullptr;
if (fOriginalKey.isValid()) {
@@ -91,7 +92,7 @@ GrTexture* GrBitmapTextureMaker::refOriginalTexture(bool willBeMipped) {
}
}
if (willBeMipped) {
- tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap);
+ tex = GrGenerateMipMapsAndUploadToTexture(this->context(), fBitmap, gammaTreatment);
}
if (!tex) {
tex = GrUploadBitmapToTexture(this->context(), fBitmap);
@@ -130,8 +131,10 @@ GrImageTextureMaker::GrImageTextureMaker(GrContext* context, SkImageCacherator*
}
}
-GrTexture* GrImageTextureMaker::refOriginalTexture(bool willBeMipped) {
- return fCacher->lockTexture(this->context(), fOriginalKey, fClient, fCachingHint, willBeMipped);
+GrTexture* GrImageTextureMaker::refOriginalTexture(bool willBeMipped,
+ SkSourceGammaTreatment gammaTreatment) {
+ return fCacher->lockTexture(this->context(), fOriginalKey, fClient, fCachingHint, willBeMipped,
+ gammaTreatment);
}
void GrImageTextureMaker::makeCopyKey(const CopyParams& stretch, GrUniqueKey* paramsCopyKey) {
« no previous file with comments | « src/gpu/GrImageIDTextureAdjuster.h ('k') | src/gpu/GrTextureParamsAdjuster.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698