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

Unified Diff: src/image/SkImage_Raster.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: Remove leftover comments 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
Index: src/image/SkImage_Raster.cpp
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index a67128a6a3e800e7423968e0de8c6162b4f9cae7..fc73fd783568a7e156d703622e3951c14ea5a571 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -82,7 +82,7 @@ public:
bool onPeekPixels(SkPixmap*) const override;
SkData* onRefEncoded(GrContext*) const override;
bool getROPixels(SkBitmap*, CachingHint) const override;
- GrTexture* asTextureRef(GrContext*, const GrTextureParams&) const override;
+ GrTexture* asTextureRef(GrContext*, const GrTextureParams&, bool gammaCorrect) const override;
sk_sp<SkImage> onMakeSubset(const SkIRect&) const override;
// exposed for SkSurface_Raster via SkNewImageFromPixelRef
@@ -174,13 +174,14 @@ bool SkImage_Raster::getROPixels(SkBitmap* dst, CachingHint) const {
return true;
}
-GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, const GrTextureParams& params) const {
+GrTexture* SkImage_Raster::asTextureRef(GrContext* ctx, const GrTextureParams& params,
+ bool gammaCorrect) const {
#if SK_SUPPORT_GPU
if (!ctx) {
return nullptr;
}
- return GrRefCachedBitmapTexture(ctx, fBitmap, params);
+ return GrRefCachedBitmapTexture(ctx, fBitmap, params, gammaCorrect);
#endif
return nullptr;
« src/gpu/SkGr.cpp ('K') | « src/image/SkImage_Gpu.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698