Default fake gamma to sRGB.

No one appears to be using the default 2.2.
This makes SK_GAMMA_SRGB the default / a no-op, which seems more realistic.

Chrome's explicitly setting SK_GAMMA_EXPONENT or SK_GAMMA_SRGB.
We set Android platform explicitly to 1.4.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2198073002

Review-Url: https://codereview.chromium.org/2198073002
This commit is contained in:
mtklein 2016-08-01 09:22:12 -07:00 committed by Commit bot
parent 9be6866e95
commit 8d7f5c3f29
3 changed files with 5 additions and 14 deletions

View File

@ -13,10 +13,9 @@
'target_defaults': {
'defines': [
'SK_INTERNAL',
'SK_GAMMA_SRGB',
'SK_GAMMA_APPLY_TO_A8',
'QT_NO_KEYWORDS',
# The discardable resource cache is tested via a special bot. This is
# The discardable resource cache is tested via a special bot. This is
# disabled here so we test the non-discardable use case.
# 'SK_USE_DISCARDABLE_SCALEDIMAGECACHE',
],

View File

@ -10,7 +10,7 @@
'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)',
'SK_SUPPORT_GPU=<(skia_gpu)',
'SK_FORCE_DISTANCE_FIELD_TEXT=<(skia_force_distance_field_text)',
# Indicate that all dependency libraries are present. Clients that
# are missing some of the required decoding libraries may choose
# not to define these. This will disable some decoder and encoder
@ -630,14 +630,10 @@
'defines': [
'SK_BUILD_FOR_ANDROID',
# Android Text Tuning
# Android defines a fixed text gamma exponent instead of using SRGB
'SK_GAMMA_EXPONENT=1.4',
'SK_GAMMA_CONTRAST=0.0',
],
# Android defines a fixed gamma exponent instead of using SRGB
'defines!': [
'SK_GAMMA_SRGB',
],
'configurations': {
'Release': {
'cflags': ['-O2'],

View File

@ -318,12 +318,8 @@
//////////////////////////////////////////////////////////////////////
#if defined(SK_GAMMA_EXPONENT) && defined(SK_GAMMA_SRGB)
# error "cannot define both SK_GAMMA_EXPONENT and SK_GAMMA_SRGB"
#elif defined(SK_GAMMA_SRGB)
# define SK_GAMMA_EXPONENT (0.0f)
#elif !defined(SK_GAMMA_EXPONENT)
# define SK_GAMMA_EXPONENT (2.2f)
#if !defined(SK_GAMMA_EXPONENT)
#define SK_GAMMA_EXPONENT (0.0f) // SRGB
#endif
//////////////////////////////////////////////////////////////////////