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

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: 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/SkImage_Gpu.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/image/SkImage_Raster.cpp
diff --git a/src/image/SkImage_Raster.cpp b/src/image/SkImage_Raster.cpp
index a67128a6a3e800e7423968e0de8c6162b4f9cae7..338c778ad95f08f56ca1535da82d81dbd1e6a66d 100644
--- a/src/image/SkImage_Raster.cpp
+++ b/src/image/SkImage_Raster.cpp
@@ -82,7 +82,8 @@ 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&,
+ SkSourceGammaTreatment) const override;
sk_sp<SkImage> onMakeSubset(const SkIRect&) const override;
// exposed for SkSurface_Raster via SkNewImageFromPixelRef
@@ -174,13 +175,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,
+ SkSourceGammaTreatment gammaTreatment) const {
#if SK_SUPPORT_GPU
if (!ctx) {
return nullptr;
}
- return GrRefCachedBitmapTexture(ctx, fBitmap, params);
+ return GrRefCachedBitmapTexture(ctx, fBitmap, params, gammaTreatment);
#endif
return nullptr;
« no previous file with comments | « src/image/SkImage_Gpu.cpp ('k') | tests/ReadPixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698