Revert of remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/)
Reason for revert:
does not address all legacy callsites in chrome.
e.g.
[13:45:32.091872] ../../ui/native_theme/native_theme_base.cc:608:76: error: no matching function for call to ‘SkGradientShader::CreateLinear(SkPoint [3], SkColor [3], NULL, int, SkShader::TileMode, NULL)’
[13:45:32.091919] gradient_bounds, colors, NULL, 3, SkShader::kClamp_TileMode, NULL));
Original issue's description:
> remove unused (by clients) SkUnitMapper
>
> BUG=skia:
>
> Committed: http://code.google.com/p/skia/source/detail?r=14761
R=robertphillips@google.com, scroggo@google.com, george@mozilla.com
TBR=george@mozilla.com, robertphillips@google.com, scroggo@google.com
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Author: reed@google.com
Review URL: https://codereview.chromium.org/287063009
git-svn-id: http://skia.googlecode.com/svn/trunk@14763 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/SampleApp.gyp b/gyp/SampleApp.gyp
index 3eb735f..edcba10 100644
--- a/gyp/SampleApp.gyp
+++ b/gyp/SampleApp.gyp
@@ -106,6 +106,7 @@
'../samplecode/SampleTextureDomain.cpp',
'../samplecode/SampleTiling.cpp',
'../samplecode/SampleTinyBitmap.cpp',
+ '../samplecode/SampleUnitMapper.cpp',
'../samplecode/SampleUnpremul.cpp',
'../samplecode/SampleVertices.cpp',
'../samplecode/SampleXfermodesBlur.cpp',
@@ -272,6 +273,7 @@
[ 'skia_os == "android"', {
'sources!': [
'../samplecode/SampleAnimator.cpp',
+ '../samplecode/SampleUnitMapper.cpp',
],
'dependencies!': [
'animator.gyp:animator',
diff --git a/gyp/core.gypi b/gyp/core.gypi
index c5d3b00..4676432 100644
--- a/gyp/core.gypi
+++ b/gyp/core.gypi
@@ -307,6 +307,7 @@
'<(skia_include_path)/core/SkTypeface.h',
'<(skia_include_path)/core/SkTypes.h',
'<(skia_include_path)/core/SkUnPreMultiply.h',
+ '<(skia_include_path)/core/SkUnitMapper.h',
'<(skia_include_path)/core/SkUtils.h',
'<(skia_include_path)/core/SkWeakRefCnt.h',
'<(skia_include_path)/core/SkWriter32.h',
diff --git a/gyp/public_headers.gypi b/gyp/public_headers.gypi
index 7432d4c..bffcf7d 100644
--- a/gyp/public_headers.gypi
+++ b/gyp/public_headers.gypi
@@ -117,6 +117,7 @@
'utils/win/SkIStream.h',
'utils/win/SkTScopedComPtr.h',
'utils/SkBoundaryPatch.h',
+ 'utils/SkUnitMappers.h',
'utils/SkPictureUtils.h',
'utils/SkRandom.h',
'utils/SkMeshUtils.h',
@@ -257,6 +258,7 @@
'core/SkWriter32.h',
'core/SkError.h',
'core/SkPath.h',
+ 'core/SkUnitMapper.h',
'core/SkFlattenable.h',
'core/SkTSearch.h',
'core/SkRect.h',
diff --git a/gyp/skia_for_chromium_defines.gypi b/gyp/skia_for_chromium_defines.gypi
index b83f3ad..f2ed5c3 100644
--- a/gyp/skia_for_chromium_defines.gypi
+++ b/gyp/skia_for_chromium_defines.gypi
@@ -13,7 +13,6 @@
# If these become 'permanent', they should be moved into skia_common.gypi
#
'skia_for_chromium_defines': [
- 'SK_SUPPORT_LEGACY_DEADUNITMAPPERTYPE',
'SK_SUPPORT_LEGACY_GETTOPDEVICE',
'SK_SUPPORT_LEGACY_N32_NAME',
'SK_SUPPORT_LEGACY_BUILDMIPMAP',
diff --git a/gyp/utils.gyp b/gyp/utils.gyp
index 9009ad9..5b3d9ea 100644
--- a/gyp/utils.gyp
+++ b/gyp/utils.gyp
@@ -56,6 +56,7 @@
'../include/utils/SkRandom.h',
'../include/utils/SkRTConf.h',
'../include/utils/SkProxyCanvas.h',
+ '../include/utils/SkUnitMappers.h',
'../include/utils/SkWGL.h',
'../src/utils/SkBase64.cpp',
@@ -109,6 +110,7 @@
'../src/utils/SkThreadUtils_win.h',
'../src/utils/SkTFitsIn.h',
'../src/utils/SkTLogic.h',
+ '../src/utils/SkUnitMappers.cpp',
#mac
'../include/utils/mac/SkCGUtils.h',