aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2015-11-13 06:11:09 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-11-13 06:11:09 -0800
commit506e19a4c8395178e8da81576b3c37616593e560 (patch)
tree0877d660a91ef6322059269e7020988459e91ded
parent9c8605144a0f15e3e69a4e1dcd5d3e63f339380e (diff)
Move SkBitmapRegionDecoder to include/android and src/android
This will expose the BitmapRegionDecoder API as a public include and move the implementation to src. This makes this code more naturally exposed in Android and easier to test in DM and nanobench. BUG=skia: Review URL: https://codereview.chromium.org/1438873002
-rw-r--r--gyp/android_framework_lib.gyp2
-rw-r--r--gyp/bench.gypi2
-rw-r--r--gyp/codec_android.gyp41
-rw-r--r--gyp/dm.gypi2
-rw-r--r--gyp/skia_lib.gyp1
-rw-r--r--gyp/tools.gyp23
-rw-r--r--gyp/visualbench.gyp2
-rw-r--r--include/android/SkBRDAllocator.h (renamed from tools/android/SkBRDAllocator.h)2
-rw-r--r--include/android/SkBitmapRegionDecoder.h (renamed from tools/android/SkBitmapRegionDecoder.h)0
-rw-r--r--src/android/SkBitmapRegionCanvas.cpp (renamed from tools/android/SkBitmapRegionCanvas.cpp)0
-rw-r--r--src/android/SkBitmapRegionCanvas.h (renamed from tools/android/SkBitmapRegionCanvas.h)0
-rw-r--r--src/android/SkBitmapRegionCodec.cpp (renamed from tools/android/SkBitmapRegionCodec.cpp)0
-rw-r--r--src/android/SkBitmapRegionCodec.h (renamed from tools/android/SkBitmapRegionCodec.h)0
-rw-r--r--src/android/SkBitmapRegionDecoder.cpp (renamed from tools/android/SkBitmapRegionDecoder.cpp)0
-rw-r--r--src/android/SkBitmapRegionDecoderPriv.h (renamed from tools/android/SkBitmapRegionDecoderPriv.h)0
15 files changed, 48 insertions, 27 deletions
diff --git a/gyp/android_framework_lib.gyp b/gyp/android_framework_lib.gyp
index 43ffaa40c9..ebcdc11a11 100644
--- a/gyp/android_framework_lib.gyp
+++ b/gyp/android_framework_lib.gyp
@@ -9,6 +9,7 @@
'type': 'shared_library',
'dependencies': [
'codec.gyp:codec',
+ 'codec_android.gyp:codec_android',
'core.gyp:core',
'effects.gyp:effects',
'gpu.gyp:skgpu',
@@ -16,7 +17,6 @@
'opts.gyp:opts',
'pdf.gyp:pdf',
'ports.gyp:ports',
- 'tools.gyp:bitmap_region_decoder',
'utils.gyp:utils',
],
},
diff --git a/gyp/bench.gypi b/gyp/bench.gypi
index 075fae83a4..ae00e0cba6 100644
--- a/gyp/bench.gypi
+++ b/gyp/bench.gypi
@@ -7,6 +7,7 @@
'../bench/subset',
'../bench',
'../include/private',
+ '../src/android',
'../src/core',
'../src/effects',
'../src/gpu',
@@ -17,7 +18,6 @@
'dependencies': [
'etc1.gyp:libetc1',
'skia_lib.gyp:skia_lib',
- 'tools.gyp:bitmap_region_decoder',
'tools.gyp:resources',
'tools.gyp:sk_tool_utils',
],
diff --git a/gyp/codec_android.gyp b/gyp/codec_android.gyp
new file mode 100644
index 0000000000..ca9c7a36b5
--- /dev/null
+++ b/gyp/codec_android.gyp
@@ -0,0 +1,41 @@
+# Copyright 2015 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+# Copyright 2015 Google Inc.
+#
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+# GYP file for android specific codecs.
+{
+ 'targets': [
+ {
+ 'target_name': 'codec_android',
+ 'product_name': 'skia_codec_android',
+ 'type': 'static_library',
+ 'standalone_static_library': 1,
+ 'dependencies': [
+ 'codec.gyp:codec',
+ ],
+ 'include_dirs': [
+ '../include/android',
+ '../include/config',
+ '../include/core',
+ '../include/private',
+ '../src/android',
+ '../src/codec',
+ ],
+ 'sources': [
+ '../src/android/SkBitmapRegionCanvas.cpp',
+ '../src/android/SkBitmapRegionCodec.cpp',
+ '../src/android/SkBitmapRegionDecoder.cpp',
+ ],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '../include/android',
+ ],
+ },
+ },
+ ],
+}
diff --git a/gyp/dm.gypi b/gyp/dm.gypi
index 933fa9a967..2ff209369f 100644
--- a/gyp/dm.gypi
+++ b/gyp/dm.gypi
@@ -8,6 +8,7 @@
'../dm',
'../gm',
'../include/private',
+ '../src/android',
'../src/core',
'../src/effects',
'../src/images',
@@ -24,7 +25,6 @@
'libpng.gyp:libpng',
'skia_lib.gyp:skia_lib',
'svg.gyp:svg',
- 'tools.gyp:bitmap_region_decoder',
'tools.gyp:crash_handler',
'tools.gyp:proc_stats',
'tools.gyp:sk_tool_utils',
diff --git a/gyp/skia_lib.gyp b/gyp/skia_lib.gyp
index 8cb5fa1788..b82809df64 100644
--- a/gyp/skia_lib.gyp
+++ b/gyp/skia_lib.gyp
@@ -9,6 +9,7 @@
'component_libs': [
'core.gyp:core',
'codec.gyp:codec',
+ 'codec_android.gyp:codec_android',
'effects.gyp:effects',
'images.gyp:images',
'opts.gyp:opts',
diff --git a/gyp/tools.gyp b/gyp/tools.gyp
index 7e2279e04d..610eda622e 100644
--- a/gyp/tools.gyp
+++ b/gyp/tools.gyp
@@ -17,7 +17,6 @@
'target_name': 'tools',
'type': 'none',
'dependencies': [
- 'bitmap_region_decoder',
'chrome_fuzz',
'filter',
'gpuveto',
@@ -48,27 +47,6 @@
],
},
{
- 'target_name': 'bitmap_region_decoder',
- 'type': 'static_library',
- 'sources': [
- '../tools/android/SkBitmapRegionCanvas.cpp',
- '../tools/android/SkBitmapRegionCodec.cpp',
- '../tools/android/SkBitmapRegionDecoder.cpp',
- ],
- 'include_dirs': [
- '../include/private',
- '../src/codec',
- ],
- 'dependencies': [
- 'skia_lib.gyp:skia_lib',
- ],
- 'direct_dependent_settings': {
- 'include_dirs': [
- '../tools/android',
- ],
- },
- },
- {
'target_name': 'chrome_fuzz',
'type': 'executable',
'sources': [
@@ -577,6 +555,7 @@
'cflags!': [ '-Wno-unused-parameter' ],
'variables': {
'includes_to_test': [
+ '<(skia_include_path)/android',
'<(skia_include_path)/animator',
'<(skia_include_path)/c',
'<(skia_include_path)/codec',
diff --git a/gyp/visualbench.gyp b/gyp/visualbench.gyp
index 52b4c53f93..2d238305d3 100644
--- a/gyp/visualbench.gyp
+++ b/gyp/visualbench.gyp
@@ -18,6 +18,7 @@
'../bench',
'../include/gpu',
'../include/private',
+ '../src/android',
'../src/core',
'../src/effects',
'../src/images',
@@ -38,7 +39,6 @@
'jsoncpp.gyp:jsoncpp',
'gputest.gyp:skgputest',
'skia_lib.gyp:skia_lib',
- 'tools.gyp:bitmap_region_decoder',
'tools.gyp:proc_stats',
'tools.gyp:sk_tool_utils',
'tools.gyp:timer',
diff --git a/tools/android/SkBRDAllocator.h b/include/android/SkBRDAllocator.h
index f003af6f6f..3ca30c9b41 100644
--- a/tools/android/SkBRDAllocator.h
+++ b/include/android/SkBRDAllocator.h
@@ -26,4 +26,4 @@ public:
virtual SkCodec::ZeroInitialized zeroInit() const = 0;
};
-#endif
+#endif // SkBRDAllocator_DEFINED
diff --git a/tools/android/SkBitmapRegionDecoder.h b/include/android/SkBitmapRegionDecoder.h
index 575ad9dc01..575ad9dc01 100644
--- a/tools/android/SkBitmapRegionDecoder.h
+++ b/include/android/SkBitmapRegionDecoder.h
diff --git a/tools/android/SkBitmapRegionCanvas.cpp b/src/android/SkBitmapRegionCanvas.cpp
index bac5dc1ffc..bac5dc1ffc 100644
--- a/tools/android/SkBitmapRegionCanvas.cpp
+++ b/src/android/SkBitmapRegionCanvas.cpp
diff --git a/tools/android/SkBitmapRegionCanvas.h b/src/android/SkBitmapRegionCanvas.h
index 2edbf1ff3b..2edbf1ff3b 100644
--- a/tools/android/SkBitmapRegionCanvas.h
+++ b/src/android/SkBitmapRegionCanvas.h
diff --git a/tools/android/SkBitmapRegionCodec.cpp b/src/android/SkBitmapRegionCodec.cpp
index 415b60c5ab..415b60c5ab 100644
--- a/tools/android/SkBitmapRegionCodec.cpp
+++ b/src/android/SkBitmapRegionCodec.cpp
diff --git a/tools/android/SkBitmapRegionCodec.h b/src/android/SkBitmapRegionCodec.h
index 79774173b0..79774173b0 100644
--- a/tools/android/SkBitmapRegionCodec.h
+++ b/src/android/SkBitmapRegionCodec.h
diff --git a/tools/android/SkBitmapRegionDecoder.cpp b/src/android/SkBitmapRegionDecoder.cpp
index 7dc05059e1..7dc05059e1 100644
--- a/tools/android/SkBitmapRegionDecoder.cpp
+++ b/src/android/SkBitmapRegionDecoder.cpp
diff --git a/tools/android/SkBitmapRegionDecoderPriv.h b/src/android/SkBitmapRegionDecoderPriv.h
index d7423b05fd..d7423b05fd 100644
--- a/tools/android/SkBitmapRegionDecoderPriv.h
+++ b/src/android/SkBitmapRegionDecoderPriv.h