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

Unified Diff: src/core/SkBitmapProcState.h

Issue 2029373004: respect srgb gamma when building mips (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix warning 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/core/SkBitmapProcShader.cpp ('k') | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapProcState.h
diff --git a/src/core/SkBitmapProcState.h b/src/core/SkBitmapProcState.h
index 40dc31a5e0c4528fa75974fe2a9d7f3ff9ca0a5c..e2e4f96951e8dd454036fc86ef84079d154a11fe 100644
--- a/src/core/SkBitmapProcState.h
+++ b/src/core/SkBitmapProcState.h
@@ -28,8 +28,10 @@ typedef SkFixed3232 SkFractionalInt;
class SkPaint;
struct SkBitmapProcInfo {
- SkBitmapProcInfo(const SkBitmapProvider&, SkShader::TileMode tmx, SkShader::TileMode tmy);
- SkBitmapProcInfo(const SkBitmap&, SkShader::TileMode tmx, SkShader::TileMode tmy);
+ SkBitmapProcInfo(const SkBitmapProvider&, SkShader::TileMode tmx, SkShader::TileMode tmy,
+ SkSourceGammaTreatment);
+ SkBitmapProcInfo(const SkBitmap&, SkShader::TileMode tmx, SkShader::TileMode tmy,
+ SkSourceGammaTreatment);
~SkBitmapProcInfo();
const SkBitmapProvider fProvider;
@@ -43,6 +45,7 @@ struct SkBitmapProcInfo {
SkShader::TileMode fTileModeY;
SkFilterQuality fFilterQuality;
SkMatrix::TypeMask fInvType;
+ SkSourceGammaTreatment fSrcGammaTreatment;
bool init(const SkMatrix& inverse, const SkPaint&);
@@ -55,10 +58,12 @@ private:
};
struct SkBitmapProcState : public SkBitmapProcInfo {
- SkBitmapProcState(const SkBitmapProvider& prov, SkShader::TileMode tmx, SkShader::TileMode tmy)
- : SkBitmapProcInfo(prov, tmx, tmy) {}
- SkBitmapProcState(const SkBitmap& bitmap, SkShader::TileMode tmx, SkShader::TileMode tmy)
- : SkBitmapProcInfo(bitmap, tmx, tmy) {}
+ SkBitmapProcState(const SkBitmapProvider& prov, SkShader::TileMode tmx, SkShader::TileMode tmy,
+ SkSourceGammaTreatment treatment)
+ : SkBitmapProcInfo(prov, tmx, tmy, treatment) {}
+ SkBitmapProcState(const SkBitmap& bitmap, SkShader::TileMode tmx, SkShader::TileMode tmy,
+ SkSourceGammaTreatment treatment)
+ : SkBitmapProcInfo(bitmap, tmx, tmy, treatment) {}
bool setup(const SkMatrix& inv, const SkPaint& paint) {
return this->init(inv, paint) && this->chooseProcs();
« no previous file with comments | « src/core/SkBitmapProcShader.cpp ('k') | src/core/SkBitmapProcState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698