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

Unified Diff: experimental/skpdiff/generate_pmetric_tables.py

Issue 19787006: ports for mac, ios, android, linux, windows (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 5 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: experimental/skpdiff/generate_pmetric_tables.py
diff --git a/experimental/skpdiff/generate_pmetric_tables.py b/experimental/skpdiff/generate_pmetric_tables.py
index 12c226347f5c2a3eccce8e8eaf993d8cc1e0b8d1..71c9114c06d0afd1f9f5b93ff0ff680fa1535cc5 100755
--- a/experimental/skpdiff/generate_pmetric_tables.py
+++ b/experimental/skpdiff/generate_pmetric_tables.py
@@ -60,7 +60,7 @@ def visual_mask(contrast):
# float gCubeRootTable[]
CUBE_ROOT_ACCESS_FUNCTION = '''
-float get_cube_root(float value) {
+static float get_cube_root(float value) {
SkASSERT(value >= 0.0f);
SkASSERT(value * 1023.0f < 1024.0f);
return gCubeRootTable[(int)(value * 1023.0f)];
@@ -78,7 +78,7 @@ def generate_cube_root_table(stream):
# float gGammaTable[]
GAMMA_ACCESS_FUNCTION = '''
-float get_gamma(unsigned char value) {
+static float get_gamma(unsigned char value) {
return gGammaTable[value];
}
'''
@@ -94,7 +94,7 @@ def generate_gamma_table(stream):
# float gTVITable[]
TVI_ACCESS_FUNCTION = '''
-float get_threshold_vs_intensity(float value) {
+static float get_threshold_vs_intensity(float value) {
SkASSERT(value >= 0.0f);
SkASSERT(value < 100.0f);
return gTVITable[(int)(value * 100.0f)];
@@ -113,7 +113,7 @@ def generate_tvi_table(stream):
# float gVisualMaskTable[]
VISUAL_MASK_DOMAIN = 4000
VISUAL_MASK_ACCESS_FUNCTION = '''
-float get_visual_mask(float value) {{
+static float get_visual_mask(float value) {{
SkASSERT(value >= 0.0f);
SkASSERT(value < {}.0f);
return gVisualMaskTable[(int)value];

Powered by Google App Engine
This is Rietveld 408576698