Hook in rough distance field support for fonts

R=bsalomon@google.com

Review URL: https://codereview.chromium.org/41213003

git-svn-id: http://skia.googlecode.com/svn/trunk/gyp@12229 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/common_conditions.gypi b/common_conditions.gypi
index 4aefdc1..770269f 100644
--- a/common_conditions.gypi
+++ b/common_conditions.gypi
@@ -27,6 +27,17 @@
         ],
       },
     ],
+    [ 'skia_distancefield_fonts == 1',
+      {
+        'defines': [
+          'SK_DISTANCEFIELD_FONTS=1',
+        ],
+      }, {
+        'defines': [
+          'SK_DISTANCEFIELD_FONTS=0',
+        ],
+      },
+    ],
     [ 'skia_os == "win"',
       {
         'defines': [
diff --git a/common_variables.gypi b/common_variables.gypi
index 23aaff9..425760e 100644
--- a/common_variables.gypi
+++ b/common_variables.gypi
@@ -94,6 +94,7 @@
       'skia_win_debuggers_path%': '',
       'skia_shared_lib%': 0,
       'skia_opencl%': 0,
+      'skia_distancefield_fonts%': 0,
 
       # These variables determine the default optimization level for different
       # compilers.
@@ -153,6 +154,7 @@
     'skia_profile_enabled%': '<(skia_profile_enabled)',
     'skia_shared_lib%': '<(skia_shared_lib)',
     'skia_opencl%': '<(skia_opencl)',
+    'skia_distancefield_fonts%': '<(skia_distancefield_fonts)',
     'skia_static_initializers%': '<(skia_static_initializers)',
     'ios_sdk_version%': '6.0',
     'skia_win_debuggers_path%': '<(skia_win_debuggers_path)',
diff --git a/edtaa.gyp b/edtaa.gyp
new file mode 100755
index 0000000..5c04ce1
--- /dev/null
+++ b/edtaa.gyp
@@ -0,0 +1,38 @@
+#
+# Copyright 2013 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+#
+
+
+{
+  'targets': [
+    {
+      'target_name': 'edtaa',
+      'type': 'none',
+      'conditions': [
+        [ 'skia_distancefield_fonts', {
+          'type': 'static_library',
+          'sources': [
+            '../third_party/edtaa/edtaa3func.cpp',
+          ],
+          'include_dirs': [
+            '../third_party/edtaa/',
+          ],
+          'all_dependent_settings': {
+            'include_dirs': [
+              '../third_party/edtaa/',
+            ],
+          },
+        }],
+      ],
+    },
+  ],
+}
+
+# Local Variables:
+# tab-width:2
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=2 shiftwidth=2:
diff --git a/gpu.gyp b/gpu.gyp
index 057c2fb..29889f1 100644
--- a/gpu.gyp
+++ b/gpu.gyp
@@ -83,6 +83,7 @@
       'dependencies': [
         'angle.gyp:*',
         'core.gyp:*',
+        'edtaa.gyp:*',
         'utils.gyp:*',
       ],
       'includes': [
@@ -132,6 +133,17 @@
             'GR_ANDROID_PATH_RENDERING=1',
           ],
         }],
+        [ 'skia_distancefield_fonts', {
+          'sources': [
+            '<(skia_include_path)/gpu/GrDistanceFieldTextContext.h',
+            '<(skia_src_path)/gpu/GrDistanceFieldTextContext.cpp',
+            '<(skia_src_path)/gpu/effects/GrDistanceFieldTextureEffect.cpp',
+            '<(skia_src_path)/gpu/effects/GrDistanceFieldTextureEffect.h',
+          ],
+          'defines': [
+            'GR_DISTANCEFIELD_FONTS=1',
+          ],
+        }],
         [ 'skia_os == "linux" or skia_os == "chromeos"', {
           'sources!': [
             '../src/gpu/gl/GrGLDefaultInterface_none.cpp',