diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-19 02:47:18 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-08-19 02:48:29 +0000 |
commit | 38564621b3363efe786f4f24000e663d832e4b9b (patch) | |
tree | 24e1efd151b4c718682a6cc3dc6a30cc829889cd | |
parent | 5d19fee72e4c6147fee799406b6b438002162b1f (diff) | |
download | chromium_src-38564621b3363efe786f4f24000e663d832e4b9b.zip chromium_src-38564621b3363efe786f4f24000e663d832e4b9b.tar.gz chromium_src-38564621b3363efe786f4f24000e663d832e4b9b.tar.bz2 |
Move blink<->cc bindings to cc/blink
These files provide the implementations of the public Blink API that
bind to the cc implementation. This moves them out of content/ into a
subdirectory of cc/ so that we can reuse these files in mojo which
can depend on cc/ and on blink but not on content/. To make sure we
don't introduce dependencies from cc/ on blink proper, cc/DEPS forbids
including cc/blink/ and cc/blink/DEPS allows using the blink headers.
cc_blink is built as a separate component to avoid linking anything from
blink into targets that don't care about the blink bindings (such as
the browser compositor).
R=darin@chromium.org
Review URL: https://codereview.chromium.org/470983004
Cr-Commit-Position: refs/heads/master@{#290464}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@290464 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | BUILD.gn | 2 | ||||
-rw-r--r-- | android_webview/browser/DEPS | 1 | ||||
-rw-r--r-- | build/all.gyp | 9 | ||||
-rw-r--r-- | cc/DEPS | 1 | ||||
-rw-r--r-- | cc/blink/BUILD.gn | 86 | ||||
-rw-r--r-- | cc/blink/DEPS | 3 | ||||
-rw-r--r-- | cc/blink/cc_blink.gyp | 70 | ||||
-rw-r--r-- | cc/blink/cc_blink_export.h | 29 | ||||
-rw-r--r-- | cc/blink/cc_blink_tests.gyp | 50 | ||||
-rw-r--r-- | cc/blink/scrollbar_impl.cc (renamed from content/renderer/compositor_bindings/scrollbar_impl.cc) | 7 | ||||
-rw-r--r-- | cc/blink/scrollbar_impl.h (renamed from content/renderer/compositor_bindings/scrollbar_impl.h) | 11 | ||||
-rw-r--r-- | cc/blink/web_animation_curve_common.cc (renamed from content/renderer/compositor_bindings/web_animation_curve_common.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_animation_curve_common.h (renamed from content/renderer/compositor_bindings/web_animation_curve_common.h) | 11 | ||||
-rw-r--r-- | cc/blink/web_animation_impl.cc (renamed from content/renderer/compositor_bindings/web_animation_impl.cc) | 15 | ||||
-rw-r--r-- | cc/blink/web_animation_impl.h (renamed from content/renderer/compositor_bindings/web_animation_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_animation_unittest.cc (renamed from content/renderer/compositor_bindings/web_animation_unittest.cc) | 9 | ||||
-rw-r--r-- | cc/blink/web_blend_mode.h (renamed from content/renderer/compositor_bindings/web_blend_mode.h) | 12 | ||||
-rw-r--r-- | cc/blink/web_compositor_support_impl.cc (renamed from content/renderer/compositor_bindings/web_compositor_support_impl.cc) | 33 | ||||
-rw-r--r-- | cc/blink/web_compositor_support_impl.h (renamed from content/renderer/compositor_bindings/web_compositor_support_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_content_layer_impl.cc (renamed from content/renderer/compositor_bindings/web_content_layer_impl.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_content_layer_impl.h (renamed from content/renderer/compositor_bindings/web_content_layer_impl.h) | 18 | ||||
-rw-r--r-- | cc/blink/web_external_bitmap_impl.cc (renamed from content/renderer/compositor_bindings/web_external_bitmap_impl.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_external_bitmap_impl.h (renamed from content/renderer/compositor_bindings/web_external_bitmap_impl.h) | 17 | ||||
-rw-r--r-- | cc/blink/web_external_texture_layer_impl.cc (renamed from content/renderer/compositor_bindings/web_external_texture_layer_impl.cc) | 15 | ||||
-rw-r--r-- | cc/blink/web_external_texture_layer_impl.h (renamed from content/renderer/compositor_bindings/web_external_texture_layer_impl.h) | 25 | ||||
-rw-r--r-- | cc/blink/web_filter_animation_curve_impl.cc (renamed from content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc) | 11 | ||||
-rw-r--r-- | cc/blink/web_filter_animation_curve_impl.h (renamed from content/renderer/compositor_bindings/web_filter_animation_curve_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_filter_operations_impl.cc (renamed from content/renderer/compositor_bindings/web_filter_operations_impl.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_filter_operations_impl.h (renamed from content/renderer/compositor_bindings/web_filter_operations_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_float_animation_curve_impl.cc (renamed from content/renderer/compositor_bindings/web_float_animation_curve_impl.cc) | 9 | ||||
-rw-r--r-- | cc/blink/web_float_animation_curve_impl.h (renamed from content/renderer/compositor_bindings/web_float_animation_curve_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_float_animation_curve_unittest.cc (renamed from content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_image_layer_impl.cc (renamed from content/renderer/compositor_bindings/web_image_layer_impl.cc) | 15 | ||||
-rw-r--r-- | cc/blink/web_image_layer_impl.h (renamed from content/renderer/compositor_bindings/web_image_layer_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_layer_impl.cc (renamed from content/renderer/compositor_bindings/web_layer_impl.cc) | 31 | ||||
-rw-r--r-- | cc/blink/web_layer_impl.h (renamed from content/renderer/compositor_bindings/web_layer_impl.h) | 42 | ||||
-rw-r--r-- | cc/blink/web_layer_impl_fixed_bounds.cc (renamed from content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_layer_impl_fixed_bounds.h (renamed from content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h) | 20 | ||||
-rw-r--r-- | cc/blink/web_layer_impl_fixed_bounds_unittest.cc (renamed from content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc) | 10 | ||||
-rw-r--r-- | cc/blink/web_nine_patch_layer_impl.cc (renamed from content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc) | 11 | ||||
-rw-r--r-- | cc/blink/web_nine_patch_layer_impl.h (renamed from content/renderer/compositor_bindings/web_nine_patch_layer_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_scroll_offset_animation_curve_impl.cc (renamed from content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc) | 9 | ||||
-rw-r--r-- | cc/blink/web_scroll_offset_animation_curve_impl.h (renamed from content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_scrollbar_layer_impl.cc (renamed from content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc) | 11 | ||||
-rw-r--r-- | cc/blink/web_scrollbar_layer_impl.h (renamed from content/renderer/compositor_bindings/web_scrollbar_layer_impl.h) | 16 | ||||
-rw-r--r-- | cc/blink/web_to_cc_animation_delegate_adapter.cc (renamed from content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_to_cc_animation_delegate_adapter.h (renamed from content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h) | 11 | ||||
-rw-r--r-- | cc/blink/web_transform_animation_curve_impl.cc (renamed from content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc) | 11 | ||||
-rw-r--r-- | cc/blink/web_transform_animation_curve_impl.h (renamed from content/renderer/compositor_bindings/web_transform_animation_curve_impl.h) | 15 | ||||
-rw-r--r-- | cc/blink/web_transform_operations_impl.cc (renamed from content/renderer/compositor_bindings/web_transform_operations_impl.cc) | 7 | ||||
-rw-r--r-- | cc/blink/web_transform_operations_impl.h (renamed from content/renderer/compositor_bindings/web_transform_operations_impl.h) | 15 | ||||
-rw-r--r-- | content/DEPS | 1 | ||||
-rw-r--r-- | content/content_renderer.gypi | 39 | ||||
-rw-r--r-- | content/content_shell.gypi | 1 | ||||
-rw-r--r-- | content/content_tests.gypi | 4 | ||||
-rw-r--r-- | content/renderer/BUILD.gn | 1 | ||||
-rw-r--r-- | content/renderer/DEPS | 1 | ||||
-rw-r--r-- | content/renderer/child_frame_compositing_helper.cc | 4 | ||||
-rw-r--r-- | content/renderer/compositor_bindings/OWNERS | 2 | ||||
-rw-r--r-- | content/renderer/compositor_bindings/PRESUBMIT.py | 33 | ||||
-rw-r--r-- | content/renderer/gpu/render_widget_compositor.cc | 17 | ||||
-rw-r--r-- | content/renderer/media/android/webmediaplayer_android.cc | 4 | ||||
-rw-r--r-- | content/renderer/media/android/webmediaplayer_android.h | 7 | ||||
-rw-r--r-- | content/renderer/media/webmediaplayer_impl.cc | 4 | ||||
-rw-r--r-- | content/renderer/media/webmediaplayer_impl.h | 7 | ||||
-rw-r--r-- | content/renderer/media/webmediaplayer_ms.cc | 4 | ||||
-rw-r--r-- | content/renderer/media/webmediaplayer_ms.h | 6 | ||||
-rw-r--r-- | content/renderer/npapi/webplugin_impl.cc | 4 | ||||
-rw-r--r-- | content/renderer/pepper/pepper_plugin_instance_impl.cc | 6 | ||||
-rw-r--r-- | content/renderer/render_thread_impl.cc | 9 | ||||
-rw-r--r-- | content/renderer/renderer_webkitplatformsupport_impl.h | 4 | ||||
-rw-r--r-- | content/test/DEPS | 1 | ||||
-rw-r--r-- | content/test/layouttest_support.cc | 4 | ||||
-rw-r--r-- | content/test/test_webkit_platform_support.h | 4 | ||||
-rw-r--r-- | content/test/web_layer_tree_view_impl_for_testing.cc | 15 | ||||
-rw-r--r-- | mojo/aura/DEPS | 1 | ||||
-rw-r--r-- | mojo/cc/DEPS | 1 | ||||
-rw-r--r-- | mojo/examples/aura_demo/DEPS | 1 | ||||
-rw-r--r-- | mojo/examples/browser/DEPS | 1 | ||||
-rw-r--r-- | mojo/examples/compositor_app/DEPS | 1 | ||||
-rw-r--r-- | mojo/examples/keyboard/DEPS | 1 | ||||
-rw-r--r-- | mojo/examples/surfaces_app/DEPS | 3 | ||||
-rw-r--r-- | mojo/services/surfaces/DEPS | 1 | ||||
-rw-r--r-- | mojo/services/view_manager/DEPS | 1 | ||||
-rw-r--r-- | ui/aura/bench/DEPS | 1 | ||||
-rw-r--r-- | ui/base/DEPS | 1 | ||||
-rw-r--r-- | ui/compositor/DEPS | 1 | ||||
-rw-r--r-- | ui/snapshot/DEPS | 1 |
88 files changed, 588 insertions, 446 deletions
@@ -20,6 +20,7 @@ group("root") { #"//base(//build/toolchain/nacl:x86_newlib)", "//ash", "//cc", + "//cc/blink", "//chrome/browser", "//chrome/browser/devtools", "//chrome/browser/ui", @@ -162,6 +163,7 @@ group("root") { ] deps -= [ + "//cc/blink", # Blocked on blink "//chrome/browser", # Blocked on content. "//chrome/browser/devtools", # Blocked on content. "//chrome/browser/ui", # Blocked on content. diff --git a/android_webview/browser/DEPS b/android_webview/browser/DEPS index 2ee68db..644c67b 100644 --- a/android_webview/browser/DEPS +++ b/android_webview/browser/DEPS @@ -6,6 +6,7 @@ include_rules = [ "+android_webview/public/browser", "+cc", + "-cc/blink", "-cc/surfaces", "+components/auto_login_parser", diff --git a/build/all.gyp b/build/all.gyp index e4448b4..41d44ca 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -79,6 +79,7 @@ 'dependencies': [ '../third_party/re2/re2.gyp:re2', '../chrome/chrome.gyp:*', + '../cc/blink/cc_blink_tests.gyp:*', '../cc/cc_tests.gyp:*', '../device/bluetooth/bluetooth.gyp:*', '../device/device_tests.gyp:*', @@ -276,6 +277,7 @@ 'conditions': [ ['OS!="ios" and OS!="android"', { 'dependencies': [ + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_unittests', '../chrome/chrome.gyp:browser_tests', '../chrome/chrome.gyp:chromedriver_tests', @@ -743,6 +745,7 @@ '../breakpad/breakpad.gyp:minidump_dump#host', '../breakpad/breakpad.gyp:minidump_stackwalk#host', '../build/android/tests/multiple_proguards/multiple_proguards.gyp:multiple_proguards_test_apk', + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_perftests_apk', '../cc/cc_tests.gyp:cc_unittests', '../chrome/chrome.gyp:unit_tests', @@ -773,6 +776,7 @@ '../android_webview/android_webview.gyp:android_webview_test_apk', '../android_webview/android_webview.gyp:android_webview_unittests_apk', '../base/base.gyp:base_unittests_apk', + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests_apk', '../cc/cc_tests.gyp:cc_unittests_apk', '../chrome/chrome.gyp:chrome_shell_test_apk', '../chrome/chrome.gyp:chrome_shell_uiautomator_tests', @@ -845,6 +849,7 @@ 'target_name': 'chromium_builder_dbg', 'type': 'none', 'dependencies': [ + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_unittests', '../chrome/chrome.gyp:browser_tests', '../chrome/chrome.gyp:interactive_ui_tests', @@ -882,6 +887,7 @@ 'target_name': 'chromium_builder_rel', 'type': 'none', 'dependencies': [ + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_unittests', '../chrome/chrome.gyp:browser_tests', '../chrome/chrome.gyp:performance_browser_tests', @@ -972,6 +978,7 @@ 'target_name': 'chromium_builder', 'type': 'none', 'dependencies': [ + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_unittests', '../chrome/chrome.gyp:browser_tests', '../chrome/chrome.gyp:crash_service', @@ -1064,6 +1071,7 @@ '../ash/ash.gyp:ash_shell_unittests', '../ash/ash.gyp:ash_unittests', '../base/base.gyp:base_unittests', + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_unittests', '../chrome/chrome.gyp:browser_tests', '../chrome/chrome.gyp:chrome_app_unittests', @@ -1177,6 +1185,7 @@ 'target_name': 'aura_builder', 'type': 'none', 'dependencies': [ + '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests', '../cc/cc_tests.gyp:cc_unittests', '../chrome/chrome.gyp:browser_tests', '../chrome/chrome.gyp:chrome', @@ -15,4 +15,5 @@ include_rules = [ "+ui/events/latency_info.h", "+ui/gfx", "+ui/gl", + "-cc/blink", ] diff --git a/cc/blink/BUILD.gn b/cc/blink/BUILD.gn new file mode 100644 index 0000000..b0e9a59 --- /dev/null +++ b/cc/blink/BUILD.gn @@ -0,0 +1,86 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# GYP version: //cc/blink/cc_blink.gyp:cc_blink +component("blink") { + output_name = "cc_blink" + + deps = [ + "//base", + "//base/third_party/dynamic_annotations", + "//cc", + "//gpu", + "//skia", + "//third_party/WebKit/public:blink", + "//ui/gfx", + "//ui/gfx/geometry", + ] + + defines = [ "CC_BLINK_IMPLEMENTATION" ] + + forward_dependent_configs_from = [ "//skia" ] + + sources = [ + "cc_blink_export.h", + "scrollbar_impl.cc", + "scrollbar_impl.h", + "web_animation_curve_common.cc", + "web_animation_curve_common.h", + "web_animation_impl.cc", + "web_animation_impl.h", + "web_compositor_support_impl.cc", + "web_compositor_support_impl.h", + "web_content_layer_impl.cc", + "web_content_layer_impl.h", + "web_external_bitmap_impl.cc", + "web_external_bitmap_impl.h", + "web_external_texture_layer_impl.cc", + "web_external_texture_layer_impl.h", + "web_filter_animation_curve_impl.cc", + "web_filter_animation_curve_impl.h", + "web_filter_operations_impl.cc", + "web_filter_operations_impl.h", + "web_float_animation_curve_impl.cc", + "web_float_animation_curve_impl.h", + "web_image_layer_impl.cc", + "web_image_layer_impl.h", + "web_layer_impl.cc", + "web_layer_impl.h", + "web_layer_impl_fixed_bounds.cc", + "web_layer_impl_fixed_bounds.h", + "web_nine_patch_layer_impl.cc", + "web_nine_patch_layer_impl.h", + "web_scroll_offset_animation_curve_impl.cc", + "web_scroll_offset_animation_curve_impl.h", + "web_scrollbar_layer_impl.cc", + "web_scrollbar_layer_impl.h", + "web_to_cc_animation_delegate_adapter.cc", + "web_to_cc_animation_delegate_adapter.h", + "web_transform_animation_curve_impl.cc", + "web_transform_animation_curve_impl.h", + "web_transform_operations_impl.cc", + "web_transform_operations_impl.h", + ] +} + +# GYP version: //cc/blink/cc_blink_tests.gyp:cc_blink_unittests +test("cc_blink_unittests") { + deps = [ + ":blink", + "//base/test:run_all_unittests", + "//base/third_party/dynamic_annotations", + "//skia", + "//testing/gtest", + "//ui/gfx/geometry", + "//ui/gfx:test_support", + "//cc", + "//cc:test_support", + ] + + sources = [ + "web_animation_unittest.cc", + "web_float_animation_curve_unittest.cc", + "web_layer_impl_fixed_bounds_unittest.cc", + ] +} diff --git a/cc/blink/DEPS b/cc/blink/DEPS new file mode 100644 index 0000000..3054d92 --- /dev/null +++ b/cc/blink/DEPS @@ -0,0 +1,3 @@ +include_rules = [ + "+third_party/WebKit/public/platform" +] diff --git a/cc/blink/cc_blink.gyp b/cc/blink/cc_blink.gyp new file mode 100644 index 0000000..d9f19ea --- /dev/null +++ b/cc/blink/cc_blink.gyp @@ -0,0 +1,70 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + # GN version: //cc/blink + 'target_name': 'cc_blink', + 'type': '<(component)', + 'dependencies': [ + '../../gpu/gpu.gyp:command_buffer_common', + '../../base/base.gyp:base', + '../../third_party/WebKit/public/blink.gyp:blink', + '../../skia/skia.gyp:skia', + '../cc.gyp:cc', + '../../ui/gfx/gfx.gyp:gfx', + '../../ui/gfx/gfx.gyp:gfx_geometry', + ], + 'defines': [ + 'CC_BLINK_IMPLEMENTATION', + ], + 'export_dependent_settings': [ + '../../skia/skia.gyp:skia', + ], + # This sources list is duplicated in //cc/blink/BUILD.gn + 'sources': [ + 'cc_blink_export.h', + 'scrollbar_impl.cc', + 'scrollbar_impl.h', + 'web_animation_curve_common.cc', + 'web_animation_curve_common.h', + 'web_animation_impl.cc', + 'web_animation_impl.h', + 'web_compositor_support_impl.cc', + 'web_compositor_support_impl.h', + 'web_content_layer_impl.cc', + 'web_content_layer_impl.h', + 'web_external_bitmap_impl.cc', + 'web_external_bitmap_impl.h', + 'web_external_texture_layer_impl.cc', + 'web_external_texture_layer_impl.h', + 'web_filter_animation_curve_impl.cc', + 'web_filter_animation_curve_impl.h', + 'web_filter_operations_impl.cc', + 'web_filter_operations_impl.h', + 'web_float_animation_curve_impl.cc', + 'web_float_animation_curve_impl.h', + 'web_image_layer_impl.cc', + 'web_image_layer_impl.h', + 'web_layer_impl.cc', + 'web_layer_impl.h', + 'web_layer_impl_fixed_bounds.cc', + 'web_layer_impl_fixed_bounds.h', + 'web_nine_patch_layer_impl.cc', + 'web_nine_patch_layer_impl.h', + 'web_scroll_offset_animation_curve_impl.cc', + 'web_scroll_offset_animation_curve_impl.h', + 'web_scrollbar_layer_impl.cc', + 'web_scrollbar_layer_impl.h', + 'web_to_cc_animation_delegate_adapter.cc', + 'web_to_cc_animation_delegate_adapter.h', + 'web_transform_animation_curve_impl.cc', + 'web_transform_animation_curve_impl.h', + 'web_transform_operations_impl.cc', + 'web_transform_operations_impl.h', + ], + }, + ] +} diff --git a/cc/blink/cc_blink_export.h b/cc/blink/cc_blink_export.h new file mode 100644 index 0000000..44ce527 --- /dev/null +++ b/cc/blink/cc_blink_export.h @@ -0,0 +1,29 @@ +// Copyright 2014 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CC_BLINK_CC_BLINK_EXPORT_H_ +#define CC_BLINK_CC_BLINK_EXPORT_H_ + +#if defined(COMPONENT_BUILD) +#if defined(WIN32) + +#if defined(CC_BLINK_IMPLEMENTATION) +#define CC_BLINK_EXPORT __declspec(dllexport) +#else +#define CC_BLINK_EXPORT __declspec(dllimport) +#endif // defined(CC_BLINK_IMPLEMENTATION) + +#else // defined(WIN32) +#if defined(CC_BLINK_IMPLEMENTATION) +#define CC_BLINK_EXPORT __attribute__((visibility("default"))) +#else +#define CC_BLINK_EXPORT +#endif +#endif + +#else // defined(COMPONENT_BUILD) +#define CC_BLINK_EXPORT +#endif + +#endif // CC_BLINK_CC_BLINK_EXPORT_H_ diff --git a/cc/blink/cc_blink_tests.gyp b/cc/blink/cc_blink_tests.gyp new file mode 100644 index 0000000..003d126 --- /dev/null +++ b/cc/blink/cc_blink_tests.gyp @@ -0,0 +1,50 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +{ + 'targets': [ + { + # GN version: //cc/blink/cc_blink_unittests + 'target_name': 'cc_blink_unittests', + 'type': '<(gtest_target_type)', + 'dependencies': [ + '../../base/base.gyp:test_support_base', + '../../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../../skia/skia.gyp:skia', + '../../testing/gtest.gyp:gtest', + '../../ui/gfx/gfx.gyp:gfx_geometry', + '../../ui/gfx/gfx.gyp:gfx_test_support', + '../cc.gyp:cc', + '../cc_tests.gyp:cc_test_support', + 'cc_blink.gyp:cc_blink', + ], + 'sources': [ + 'web_animation_unittest.cc', + 'web_float_animation_curve_unittest.cc', + 'web_layer_impl_fixed_bounds_unittest.cc', + '../../base/test/run_all_unittests.cc', + ], + } + ], + 'conditions': [ + ['OS == "android"', + { + 'targets': [ + { + 'target_name': 'cc_blink_unittests_apk', + 'type': 'none', + 'dependencies': [ + 'cc_blink_unittests', + ], + 'variables': { + 'test_suite_name': 'cc_blink_unittests', + }, + 'includes': [ '../../build/apk_test.gypi' ], + }, + ], + } + ] + ], + +} diff --git a/content/renderer/compositor_bindings/scrollbar_impl.cc b/cc/blink/scrollbar_impl.cc index 6ee82d4..e7c21b8a 100644 --- a/content/renderer/compositor_bindings/scrollbar_impl.cc +++ b/cc/blink/scrollbar_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/scrollbar_impl.h" +#include "cc/blink/scrollbar_impl.h" #include "base/logging.h" #include "third_party/WebKit/public/platform/WebScrollbar.h" @@ -10,7 +10,7 @@ using blink::WebScrollbar; -namespace content { +namespace cc_blink { ScrollbarImpl::ScrollbarImpl( scoped_ptr<WebScrollbar> scrollbar, @@ -105,5 +105,4 @@ void ScrollbarImpl::PaintPart(SkCanvas* canvas, painter_.paintTickmarks(canvas, track_paint_rect); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/scrollbar_impl.h b/cc/blink/scrollbar_impl.h index 9159d0a..fe7bf59 100644 --- a/content/renderer/compositor_bindings/scrollbar_impl.h +++ b/cc/blink/scrollbar_impl.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ +#ifndef CC_BLINK_SCROLLBAR_IMPL_H_ +#define CC_BLINK_SCROLLBAR_IMPL_H_ #include "base/basictypes.h" #include "base/memory/scoped_ptr.h" @@ -15,7 +15,7 @@ class WebScrollbar; class WebScrollbarThemeGeometry; } -namespace content { +namespace cc_blink { class ScrollbarImpl : public cc::Scrollbar { public: @@ -45,7 +45,6 @@ class ScrollbarImpl : public cc::Scrollbar { DISALLOW_COPY_AND_ASSIGN(ScrollbarImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_SCROLLBAR_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_SCROLLBAR_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_animation_curve_common.cc b/cc/blink/web_animation_curve_common.cc index ea3b904..5abcf10 100644 --- a/content/renderer/compositor_bindings/web_animation_curve_common.cc +++ b/cc/blink/web_animation_curve_common.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_animation_curve_common.h" +#include "cc/blink/web_animation_curve_common.h" #include "cc/animation/timing_function.h" -namespace content { +namespace cc_blink { scoped_ptr<cc::TimingFunction> CreateTimingFunction( blink::WebCompositorAnimationCurve::TimingFunctionType type) { @@ -25,5 +25,4 @@ scoped_ptr<cc::TimingFunction> CreateTimingFunction( return scoped_ptr<cc::TimingFunction>(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_animation_curve_common.h b/cc/blink/web_animation_curve_common.h index b1df003..604515b 100644 --- a/content/renderer/compositor_bindings/web_animation_curve_common.h +++ b/cc/blink/web_animation_curve_common.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ +#ifndef CC_BLINK_WEB_ANIMATION_CURVE_COMMON_H_ +#define CC_BLINK_WEB_ANIMATION_CURVE_COMMON_H_ #include "base/memory/scoped_ptr.h" #include "third_party/WebKit/public/platform/WebCompositorAnimationCurve.h" @@ -12,10 +12,9 @@ namespace cc { class TimingFunction; } -namespace content { +namespace cc_blink { scoped_ptr<cc::TimingFunction> CreateTimingFunction( blink::WebCompositorAnimationCurve::TimingFunctionType); -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_CURVE_COMMON_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_ANIMATION_CURVE_COMMON_H_ diff --git a/content/renderer/compositor_bindings/web_animation_impl.cc b/cc/blink/web_animation_impl.cc index 9e9092b..5e16f07 100644 --- a/content/renderer/compositor_bindings/web_animation_impl.cc +++ b/cc/blink/web_animation_impl.cc @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_animation_impl.h" +#include "cc/blink/web_animation_impl.h" #include "cc/animation/animation.h" #include "cc/animation/animation_curve.h" #include "cc/animation/animation_id_provider.h" -#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h" -#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" -#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" -#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h" +#include "cc/blink/web_filter_animation_curve_impl.h" +#include "cc/blink/web_float_animation_curve_impl.h" +#include "cc/blink/web_scroll_offset_animation_curve_impl.h" +#include "cc/blink/web_transform_animation_curve_impl.h" #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" using cc::Animation; @@ -19,7 +19,7 @@ using cc::AnimationIdProvider; using blink::WebCompositorAnimation; using blink::WebCompositorAnimationCurve; -namespace content { +namespace cc_blink { WebCompositorAnimationImpl::WebCompositorAnimationImpl( const WebCompositorAnimationCurve& web_curve, @@ -166,5 +166,4 @@ scoped_ptr<cc::Animation> WebCompositorAnimationImpl::PassAnimation() { return animation_.Pass(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_animation_impl.h b/cc/blink/web_animation_impl.h index 460b6f5..49f4ea1 100644 --- a/content/renderer/compositor_bindings/web_animation_impl.h +++ b/cc/blink/web_animation_impl.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ +#ifndef CC_BLINK_WEB_ANIMATION_IMPL_H_ +#define CC_BLINK_WEB_ANIMATION_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" #include "third_party/WebKit/public/platform/WebCompositorAnimationCurve.h" @@ -14,11 +14,11 @@ namespace cc { class Animation; } -namespace content { +namespace cc_blink { class WebCompositorAnimationImpl : public blink::WebCompositorAnimation { public: - CONTENT_EXPORT WebCompositorAnimationImpl( + CC_BLINK_EXPORT WebCompositorAnimationImpl( const blink::WebCompositorAnimationCurve& curve, TargetProperty target, int animation_id, @@ -55,7 +55,6 @@ class WebCompositorAnimationImpl : public blink::WebCompositorAnimation { DISALLOW_COPY_AND_ASSIGN(WebCompositorAnimationImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_ANIMATION_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_ANIMATION_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_animation_unittest.cc b/cc/blink/web_animation_unittest.cc index f2f99c9..cf9e05c 100644 --- a/content/renderer/compositor_bindings/web_animation_unittest.cc +++ b/cc/blink/web_animation_unittest.cc @@ -3,15 +3,15 @@ // found in the LICENSE file. #include "base/memory/scoped_ptr.h" -#include "content/renderer/compositor_bindings/web_animation_impl.h" -#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" +#include "cc/blink/web_animation_impl.h" +#include "cc/blink/web_float_animation_curve_impl.h" #include "testing/gtest/include/gtest/gtest.h" using blink::WebCompositorAnimation; using blink::WebCompositorAnimationCurve; using blink::WebFloatAnimationCurve; -namespace content { +namespace cc_blink { namespace { TEST(WebCompositorAnimationTest, DefaultSettings) { @@ -57,5 +57,4 @@ TEST(WebCompositorAnimationTest, ModifiedSettings) { } } // namespace -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_blend_mode.h b/cc/blink/web_blend_mode.h index 6ab6ade..95c48d0 100644 --- a/content/renderer/compositor_bindings/web_blend_mode.h +++ b/cc/blink/web_blend_mode.h @@ -2,12 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ +#ifndef CC_BLINK_WEB_BLEND_MODE_H_ +#define CC_BLINK_WEB_BLEND_MODE_H_ #include "third_party/WebKit/public/platform/WebBlendMode.h" +#include "third_party/skia/include/core/SkXfermode.h" -namespace content { +namespace cc_blink { inline SkXfermode::Mode BlendModeToSkia(blink::WebBlendMode blend_mode) { switch (blend_mode) { @@ -101,7 +102,6 @@ inline blink::WebBlendMode BlendModeFromSkia(SkXfermode::Mode blend_mode) { return blink::WebBlendModeNormal; } -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_BLEND_MODE_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_BLEND_MODE_H_ diff --git a/content/renderer/compositor_bindings/web_compositor_support_impl.cc b/cc/blink/web_compositor_support_impl.cc index c5156cb..8073846 100644 --- a/content/renderer/compositor_bindings/web_compositor_support_impl.cc +++ b/cc/blink/web_compositor_support_impl.cc @@ -2,26 +2,26 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_compositor_support_impl.h" +#include "cc/blink/web_compositor_support_impl.h" #include "base/memory/scoped_ptr.h" #include "base/message_loop/message_loop_proxy.h" #include "cc/animation/transform_operations.h" +#include "cc/blink/web_animation_impl.h" +#include "cc/blink/web_content_layer_impl.h" +#include "cc/blink/web_external_texture_layer_impl.h" +#include "cc/blink/web_filter_animation_curve_impl.h" +#include "cc/blink/web_filter_operations_impl.h" +#include "cc/blink/web_float_animation_curve_impl.h" +#include "cc/blink/web_image_layer_impl.h" +#include "cc/blink/web_layer_impl.h" +#include "cc/blink/web_nine_patch_layer_impl.h" +#include "cc/blink/web_scroll_offset_animation_curve_impl.h" +#include "cc/blink/web_scrollbar_layer_impl.h" +#include "cc/blink/web_transform_animation_curve_impl.h" +#include "cc/blink/web_transform_operations_impl.h" #include "cc/output/output_surface.h" #include "cc/output/software_output_device.h" -#include "content/renderer/compositor_bindings/web_animation_impl.h" -#include "content/renderer/compositor_bindings/web_content_layer_impl.h" -#include "content/renderer/compositor_bindings/web_external_texture_layer_impl.h" -#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h" -#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" -#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" -#include "content/renderer/compositor_bindings/web_image_layer_impl.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" -#include "content/renderer/compositor_bindings/web_nine_patch_layer_impl.h" -#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" -#include "content/renderer/compositor_bindings/web_scrollbar_layer_impl.h" -#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h" -#include "content/renderer/compositor_bindings/web_transform_operations_impl.h" using blink::WebCompositorAnimation; using blink::WebCompositorAnimationCurve; @@ -43,7 +43,7 @@ using blink::WebScrollOffsetAnimationCurve; using blink::WebTransformAnimationCurve; using blink::WebTransformOperations; -namespace content { +namespace cc_blink { WebCompositorSupportImpl::WebCompositorSupportImpl() { } @@ -127,5 +127,4 @@ WebFilterOperations* WebCompositorSupportImpl::createFilterOperations() { return new WebFilterOperationsImpl(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_compositor_support_impl.h b/cc/blink/web_compositor_support_impl.h index 8bfdce2..2cf21ee 100644 --- a/content/renderer/compositor_bindings/web_compositor_support_impl.h +++ b/cc/blink/web_compositor_support_impl.h @@ -2,12 +2,12 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ +#ifndef CC_BLINK_WEB_COMPOSITOR_SUPPORT_IMPL_H_ +#define CC_BLINK_WEB_COMPOSITOR_SUPPORT_IMPL_H_ #include "base/memory/ref_counted.h" #include "base/message_loop/message_loop_proxy.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebCompositorAnimationCurve.h" #include "third_party/WebKit/public/platform/WebCompositorSupport.h" #include "third_party/WebKit/public/platform/WebLayer.h" @@ -17,9 +17,9 @@ namespace blink { class WebGraphicsContext3D; } -namespace content { +namespace cc_blink { -class CONTENT_EXPORT WebCompositorSupportImpl +class CC_BLINK_EXPORT WebCompositorSupportImpl : public NON_EXPORTED_BASE(blink::WebCompositorSupport) { public: WebCompositorSupportImpl(); @@ -60,7 +60,6 @@ class CONTENT_EXPORT WebCompositorSupportImpl DISALLOW_COPY_AND_ASSIGN(WebCompositorSupportImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_COMPOSITOR_SUPPORT_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_COMPOSITOR_SUPPORT_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_content_layer_impl.cc b/cc/blink/web_content_layer_impl.cc index 1a1eb43..62dc515 100644 --- a/content/renderer/compositor_bindings/web_content_layer_impl.cc +++ b/cc/blink/web_content_layer_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_content_layer_impl.h" +#include "cc/blink/web_content_layer_impl.h" #include "cc/layers/content_layer.h" #include "cc/layers/picture_layer.h" @@ -16,7 +16,7 @@ using cc::ContentLayer; using cc::PictureLayer; -namespace content { +namespace cc_blink { WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client) : client_(client), ignore_lcd_text_change_(false) { @@ -86,5 +86,4 @@ bool WebContentLayerImpl::FillsBoundsCompletely() const { return false; } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_content_layer_impl.h b/cc/blink/web_content_layer_impl.h index 435acfd..913fa39 100644 --- a/content/renderer/compositor_bindings/web_content_layer_impl.h +++ b/cc/blink/web_content_layer_impl.h @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ +#ifndef CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_ +#define CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" +#include "cc/blink/cc_blink_export.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/content_layer_client.h" -#include "content/common/content_export.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "third_party/WebKit/public/platform/WebContentLayer.h" namespace cc { @@ -20,13 +20,12 @@ namespace blink { class WebContentLayerClient; } -namespace content { +namespace cc_blink { class WebContentLayerImpl : public blink::WebContentLayer, public cc::ContentLayerClient { public: - CONTENT_EXPORT explicit WebContentLayerImpl( - blink::WebContentLayerClient*); + CC_BLINK_EXPORT explicit WebContentLayerImpl(blink::WebContentLayerClient*); // WebContentLayer implementation. virtual blink::WebLayer* layer(); @@ -56,7 +55,6 @@ class WebContentLayerImpl : public blink::WebContentLayer, DISALLOW_COPY_AND_ASSIGN(WebContentLayerImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_CONTENT_LAYER_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_CONTENT_LAYER_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_external_bitmap_impl.cc b/cc/blink/web_external_bitmap_impl.cc index bf3d853..a101079 100644 --- a/content/renderer/compositor_bindings/web_external_bitmap_impl.cc +++ b/cc/blink/web_external_bitmap_impl.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h" +#include "cc/blink/web_external_bitmap_impl.h" #include "base/memory/shared_memory.h" -namespace content { +namespace cc_blink { namespace { @@ -43,5 +43,4 @@ uint8* WebExternalBitmapImpl::pixels() { return static_cast<uint8*>(shared_memory_->memory()); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_external_bitmap_impl.h b/cc/blink/web_external_bitmap_impl.h index 4d7769e..905c098 100644 --- a/content/renderer/compositor_bindings/web_external_bitmap_impl.h +++ b/cc/blink/web_external_bitmap_impl.h @@ -2,29 +2,29 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ +#ifndef CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_ +#define CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_ #include "base/bind.h" #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebExternalBitmap.h" namespace base { class SharedMemory; } -namespace content { +namespace cc_blink { typedef scoped_ptr<base::SharedMemory>(*SharedMemoryAllocationFunction)(size_t); // Sets the function that this will use to allocate shared memory. -CONTENT_EXPORT void SetSharedMemoryAllocationFunction( +CC_BLINK_EXPORT void SetSharedMemoryAllocationFunction( SharedMemoryAllocationFunction); class WebExternalBitmapImpl : public blink::WebExternalBitmap { public: - CONTENT_EXPORT explicit WebExternalBitmapImpl(); + CC_BLINK_EXPORT explicit WebExternalBitmapImpl(); virtual ~WebExternalBitmapImpl(); // blink::WebExternalBitmap implementation. @@ -41,7 +41,6 @@ class WebExternalBitmapImpl : public blink::WebExternalBitmap { DISALLOW_COPY_AND_ASSIGN(WebExternalBitmapImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_BITMAP_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_EXTERNAL_BITMAP_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc b/cc/blink/web_external_texture_layer_impl.cc index a759e5c..e6c8a64 100644 --- a/content/renderer/compositor_bindings/web_external_texture_layer_impl.cc +++ b/cc/blink/web_external_texture_layer_impl.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_external_texture_layer_impl.h" +#include "cc/blink/web_external_texture_layer_impl.h" +#include "cc/blink/web_external_bitmap_impl.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/texture_layer.h" #include "cc/resources/resource_update_queue.h" #include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" -#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "third_party/WebKit/public/platform/WebExternalTextureLayerClient.h" #include "third_party/WebKit/public/platform/WebExternalTextureMailbox.h" #include "third_party/WebKit/public/platform/WebFloatRect.h" @@ -20,7 +20,7 @@ using cc::TextureLayer; using cc::ResourceUpdateQueue; -namespace content { +namespace cc_blink { WebExternalTextureLayerImpl::WebExternalTextureLayerImpl( blink::WebExternalTextureLayerClient* client) @@ -50,8 +50,8 @@ void WebExternalTextureLayerImpl::setOpaque(bool opaque) { void WebExternalTextureLayerImpl::setPremultipliedAlpha( bool premultiplied_alpha) { - static_cast<TextureLayer*>(layer_->layer())->SetPremultipliedAlpha( - premultiplied_alpha); + static_cast<TextureLayer*>(layer_->layer()) + ->SetPremultipliedAlpha(premultiplied_alpha); } void WebExternalTextureLayerImpl::setBlendBackgroundColor(bool blend) { @@ -122,5 +122,4 @@ void WebExternalTextureLayerImpl::DidReleaseMailbox( layer->client_->mailboxReleased(available_mailbox, lost_resource); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_external_texture_layer_impl.h b/cc/blink/web_external_texture_layer_impl.h index bc46b93..044be1a 100644 --- a/content/renderer/compositor_bindings/web_external_texture_layer_impl.h +++ b/cc/blink/web_external_texture_layer_impl.h @@ -2,27 +2,27 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ +#ifndef CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ +#define CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ #include "base/bind.h" #include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" +#include "cc/blink/cc_blink_export.h" #include "cc/layers/texture_layer_client.h" -#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebExternalTextureLayer.h" -namespace cc { -class SingleReleaseCallback; -class TextureMailbox; -} - namespace blink { struct WebFloatRect; struct WebExternalTextureMailbox; } -namespace content { +namespace cc { +class SingleReleaseCallback; +class TextureMailbox; +} + +namespace cc_blink { class WebLayerImpl; class WebExternalBitmapImpl; @@ -32,7 +32,7 @@ class WebExternalTextureLayerImpl public cc::TextureLayerClient, public base::SupportsWeakPtr<WebExternalTextureLayerImpl> { public: - CONTENT_EXPORT explicit WebExternalTextureLayerImpl( + CC_BLINK_EXPORT explicit WebExternalTextureLayerImpl( blink::WebExternalTextureLayerClient*); virtual ~WebExternalTextureLayerImpl(); @@ -67,7 +67,6 @@ class WebExternalTextureLayerImpl DISALLOW_COPY_AND_ASSIGN(WebExternalTextureLayerImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_EXTERNAL_TEXTURE_LAYER_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc b/cc/blink/web_filter_animation_curve_impl.cc index c208303..cfbe191 100644 --- a/content/renderer/compositor_bindings/web_filter_animation_curve_impl.cc +++ b/cc/blink/web_filter_animation_curve_impl.cc @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_filter_animation_curve_impl.h" +#include "cc/blink/web_filter_animation_curve_impl.h" #include "cc/animation/keyframed_animation_curve.h" #include "cc/animation/timing_function.h" +#include "cc/blink/web_animation_curve_common.h" +#include "cc/blink/web_filter_operations_impl.h" #include "cc/output/filter_operations.h" -#include "content/renderer/compositor_bindings/web_animation_curve_common.h" -#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" using blink::WebFilterKeyframe; -namespace content { +namespace cc_blink { WebFilterAnimationCurveImpl::WebFilterAnimationCurveImpl() : curve_(cc::KeyframedFilterAnimationCurve::Create()) { @@ -55,5 +55,4 @@ WebFilterAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h b/cc/blink/web_filter_animation_curve_impl.h index e36825a..0454cce 100644 --- a/content/renderer/compositor_bindings/web_filter_animation_curve_impl.h +++ b/cc/blink/web_filter_animation_curve_impl.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ +#ifndef CC_BLINK_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ +#define CC_BLINK_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebFilterAnimationCurve.h" namespace cc { @@ -18,11 +18,11 @@ namespace blink { class WebFilterKeyframe; } -namespace content { +namespace cc_blink { class WebFilterAnimationCurveImpl : public blink::WebFilterAnimationCurve { public: - CONTENT_EXPORT WebFilterAnimationCurveImpl(); + CC_BLINK_EXPORT WebFilterAnimationCurveImpl(); virtual ~WebFilterAnimationCurveImpl(); // blink::WebCompositorAnimationCurve implementation. @@ -45,7 +45,6 @@ class WebFilterAnimationCurveImpl : public blink::WebFilterAnimationCurve { DISALLOW_COPY_AND_ASSIGN(WebFilterAnimationCurveImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_FILTER_ANIMATION_CURVE_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_filter_operations_impl.cc b/cc/blink/web_filter_operations_impl.cc index 2a11ea8..acabe0f 100644 --- a/content/renderer/compositor_bindings/web_filter_operations_impl.cc +++ b/cc/blink/web_filter_operations_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" +#include "cc/blink/web_filter_operations_impl.h" #include "base/basictypes.h" #include "skia/ext/refptr.h" @@ -10,7 +10,7 @@ #include "third_party/WebKit/public/platform/WebPoint.h" #include "third_party/skia/include/core/SkScalar.h" -namespace content { +namespace cc_blink { WebFilterOperationsImpl::WebFilterOperationsImpl() { } @@ -92,5 +92,4 @@ void WebFilterOperationsImpl::clear() { filter_operations_.Clear(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_filter_operations_impl.h b/cc/blink/web_filter_operations_impl.h index d3020e6..7a9dcf3 100644 --- a/content/renderer/compositor_bindings/web_filter_operations_impl.h +++ b/cc/blink/web_filter_operations_impl.h @@ -2,18 +2,18 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ +#ifndef CC_BLINK_WEB_FILTER_OPERATIONS_IMPL_H_ +#define CC_BLINK_WEB_FILTER_OPERATIONS_IMPL_H_ #include "cc/output/filter_operations.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebFilterOperations.h" -namespace content { +namespace cc_blink { class WebFilterOperationsImpl : public blink::WebFilterOperations { public: - CONTENT_EXPORT WebFilterOperationsImpl(); + CC_BLINK_EXPORT WebFilterOperationsImpl(); virtual ~WebFilterOperationsImpl(); const cc::FilterOperations& AsFilterOperations() const; @@ -44,7 +44,6 @@ class WebFilterOperationsImpl : public blink::WebFilterOperations { DISALLOW_COPY_AND_ASSIGN(WebFilterOperationsImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FILTER_OPERATIONS_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_FILTER_OPERATIONS_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc b/cc/blink/web_float_animation_curve_impl.cc index d593f50..e4c5fa9 100644 --- a/content/renderer/compositor_bindings/web_float_animation_curve_impl.cc +++ b/cc/blink/web_float_animation_curve_impl.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" +#include "cc/blink/web_float_animation_curve_impl.h" #include "cc/animation/animation_curve.h" #include "cc/animation/keyframed_animation_curve.h" #include "cc/animation/timing_function.h" -#include "content/renderer/compositor_bindings/web_animation_curve_common.h" +#include "cc/blink/web_animation_curve_common.h" using blink::WebFloatKeyframe; -namespace content { +namespace cc_blink { WebFloatAnimationCurveImpl::WebFloatAnimationCurveImpl() : curve_(cc::KeyframedFloatAnimationCurve::Create()) { @@ -56,5 +56,4 @@ WebFloatAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_float_animation_curve_impl.h b/cc/blink/web_float_animation_curve_impl.h index 49e42a4..09cadb8 100644 --- a/content/renderer/compositor_bindings/web_float_animation_curve_impl.h +++ b/cc/blink/web_float_animation_curve_impl.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ +#ifndef CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ +#define CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebFloatAnimationCurve.h" namespace cc { @@ -18,11 +18,11 @@ namespace blink { struct WebFloatKeyframe; } -namespace content { +namespace cc_blink { class WebFloatAnimationCurveImpl : public blink::WebFloatAnimationCurve { public: - CONTENT_EXPORT WebFloatAnimationCurveImpl(); + CC_BLINK_EXPORT WebFloatAnimationCurveImpl(); virtual ~WebFloatAnimationCurveImpl(); // WebCompositorAnimationCurve implementation. @@ -48,7 +48,6 @@ class WebFloatAnimationCurveImpl : public blink::WebFloatAnimationCurve { DISALLOW_COPY_AND_ASSIGN(WebFloatAnimationCurveImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_FLOAT_ANIMATION_CURVE_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc b/cc/blink/web_float_animation_curve_unittest.cc index 49fc3f8f..14afdd0 100644 --- a/content/renderer/compositor_bindings/web_float_animation_curve_unittest.cc +++ b/cc/blink/web_float_animation_curve_unittest.cc @@ -4,14 +4,14 @@ #include "base/memory/scoped_ptr.h" #include "cc/animation/timing_function.h" -#include "content/renderer/compositor_bindings/web_float_animation_curve_impl.h" +#include "cc/blink/web_float_animation_curve_impl.h" #include "testing/gtest/include/gtest/gtest.h" using blink::WebCompositorAnimationCurve; using blink::WebFloatAnimationCurve; using blink::WebFloatKeyframe; -namespace content { +namespace cc_blink { namespace { // Tests that a float animation with one keyframe works as expected. @@ -231,5 +231,4 @@ TEST(WebFloatAnimationCurveTest, DefaultTimingFunction) { } } // namespace -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_image_layer_impl.cc b/cc/blink/web_image_layer_impl.cc index ecbfbd0..b31d890 100644 --- a/content/renderer/compositor_bindings/web_image_layer_impl.cc +++ b/cc/blink/web_image_layer_impl.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_image_layer_impl.h" +#include "cc/blink/web_image_layer_impl.h" +#include "cc/blink/web_layer_impl.h" +#include "cc/blink/web_layer_impl_fixed_bounds.h" #include "cc/layers/image_layer.h" #include "cc/layers/picture_image_layer.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" -#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" -namespace content { +namespace cc_blink { WebImageLayerImpl::WebImageLayerImpl() { if (WebLayerImpl::UsingPictureLayer()) @@ -28,12 +28,11 @@ blink::WebLayer* WebImageLayerImpl::layer() { void WebImageLayerImpl::setBitmap(SkBitmap bitmap) { if (WebLayerImpl::UsingPictureLayer()) { static_cast<cc::PictureImageLayer*>(layer_->layer())->SetBitmap(bitmap); - static_cast<WebLayerImplFixedBounds*>(layer_.get())->SetFixedBounds( - gfx::Size(bitmap.width(), bitmap.height())); + static_cast<WebLayerImplFixedBounds*>(layer_.get()) + ->SetFixedBounds(gfx::Size(bitmap.width(), bitmap.height())); } else { static_cast<cc::ImageLayer*>(layer_->layer())->SetBitmap(bitmap); } } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_image_layer_impl.h b/cc/blink/web_image_layer_impl.h index 359cfa5..85540af 100644 --- a/content/renderer/compositor_bindings/web_image_layer_impl.h +++ b/cc/blink/web_image_layer_impl.h @@ -2,21 +2,21 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ +#ifndef CC_BLINK_WEB_IMAGE_LAYER_IMPL_H_ +#define CC_BLINK_WEB_IMAGE_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebImageLayer.h" #include "third_party/skia/include/core/SkBitmap.h" -namespace content { +namespace cc_blink { class WebLayerImpl; class WebImageLayerImpl : public blink::WebImageLayer { public: - CONTENT_EXPORT WebImageLayerImpl(); + CC_BLINK_EXPORT WebImageLayerImpl(); virtual ~WebImageLayerImpl(); // blink::WebImageLayer implementation. @@ -29,7 +29,6 @@ class WebImageLayerImpl : public blink::WebImageLayer { DISALLOW_COPY_AND_ASSIGN(WebImageLayerImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_IMAGE_LAYER_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_IMAGE_LAYER_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_layer_impl.cc b/cc/blink/web_layer_impl.cc index aeb7e0e..c1f67fb 100644 --- a/content/renderer/compositor_bindings/web_layer_impl.cc +++ b/cc/blink/web_layer_impl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_layer_impl.h" +#include "cc/blink/web_layer_impl.h" #include "base/bind.h" #include "base/debug/trace_event_impl.h" @@ -12,13 +12,13 @@ #include "cc/animation/animation.h" #include "cc/base/region.h" #include "cc/base/switches.h" +#include "cc/blink/web_animation_impl.h" +#include "cc/blink/web_blend_mode.h" +#include "cc/blink/web_filter_operations_impl.h" +#include "cc/blink/web_to_cc_animation_delegate_adapter.h" #include "cc/layers/layer.h" #include "cc/layers/layer_position_constraint.h" #include "cc/trees/layer_tree_host.h" -#include "content/renderer/compositor_bindings/web_animation_impl.h" -#include "content/renderer/compositor_bindings/web_blend_mode.h" -#include "content/renderer/compositor_bindings/web_filter_operations_impl.h" -#include "content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h" #include "third_party/WebKit/public/platform/WebFloatPoint.h" #include "third_party/WebKit/public/platform/WebFloatRect.h" #include "third_party/WebKit/public/platform/WebGraphicsLayerDebugInfo.h" @@ -38,7 +38,7 @@ using blink::WebSize; using blink::WebColor; using blink::WebFilterOperations; -namespace content { +namespace cc_blink { namespace { bool g_impl_side_painting_enabled = false; @@ -104,7 +104,9 @@ void WebLayerImpl::removeAllChildren() { layer_->RemoveAllChildren(); } -void WebLayerImpl::setBounds(const WebSize& size) { layer_->SetBounds(size); } +void WebLayerImpl::setBounds(const WebSize& size) { + layer_->SetBounds(size); +} WebSize WebLayerImpl::bounds() const { return layer_->bounds(); @@ -183,18 +185,6 @@ blink::WebFloatPoint3D WebLayerImpl::transformOrigin() const { return layer_->transform_origin(); } -void WebLayerImpl::setAnchorPoint(const blink::WebFloatPoint&) {} - -blink::WebFloatPoint WebLayerImpl::anchorPoint() const { - return blink::WebFloatPoint(); -} - -void WebLayerImpl::setAnchorPointZ(float) {} - -float WebLayerImpl::anchorPointZ() const { - return 0.f; -} - SkMatrix44 WebLayerImpl::transform() const { return layer_->transform().matrix(); } @@ -486,5 +476,4 @@ Layer* WebLayerImpl::layer() const { return layer_.get(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_layer_impl.h b/cc/blink/web_layer_impl.h index f77439a..3a8130e 100644 --- a/content/renderer/compositor_bindings/web_layer_impl.h +++ b/cc/blink/web_layer_impl.h @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ +#ifndef CC_BLINK_WEB_LAYER_IMPL_H_ +#define CC_BLINK_WEB_LAYER_IMPL_H_ #include <string> #include "base/memory/ref_counted.h" #include "base/memory/scoped_ptr.h" +#include "cc/blink/cc_blink_export.h" #include "cc/layers/layer_client.h" -#include "content/common/content_export.h" #include "third_party/WebKit/public/platform/WebCString.h" #include "third_party/WebKit/public/platform/WebColor.h" #include "third_party/WebKit/public/platform/WebCompositorAnimation.h" @@ -23,10 +23,6 @@ #include "third_party/WebKit/public/platform/WebVector.h" #include "third_party/skia/include/utils/SkMatrix44.h" -namespace cc { -class Layer; -} - namespace blink { class WebFilterOperations; class WebLayerClient; @@ -39,22 +35,24 @@ class ConvertableToTraceFormat; } } -namespace content { +namespace cc { +class Layer; +} + +namespace cc_blink { class WebToCCAnimationDelegateAdapter; class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { public: - CONTENT_EXPORT WebLayerImpl(); - CONTENT_EXPORT explicit WebLayerImpl( - scoped_refptr<cc::Layer>); + CC_BLINK_EXPORT WebLayerImpl(); + CC_BLINK_EXPORT explicit WebLayerImpl(scoped_refptr<cc::Layer>); virtual ~WebLayerImpl(); static bool UsingPictureLayer(); - CONTENT_EXPORT static void SetImplSidePaintingEnabled( - bool enabled); + CC_BLINK_EXPORT static void SetImplSidePaintingEnabled(bool enabled); - CONTENT_EXPORT cc::Layer* layer() const; + CC_BLINK_EXPORT cc::Layer* layer() const; // WebLayer implementation. virtual int id() const; @@ -85,13 +83,6 @@ class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { virtual void setTransform(const SkMatrix44& transform); virtual void setTransformOrigin(const blink::WebFloatPoint3D& point); virtual blink::WebFloatPoint3D transformOrigin() const; - - // FIXME: get rid of these once Blink is no longer using them. - virtual void setAnchorPoint(const blink::WebFloatPoint&); - virtual blink::WebFloatPoint anchorPoint() const; - virtual void setAnchorPointZ(float); - virtual float anchorPointZ() const; - virtual SkMatrix44 transform() const; virtual void setDrawsContent(bool draws_content); virtual bool drawsContent() const; @@ -140,8 +131,8 @@ class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { virtual void setWebLayerClient(blink::WebLayerClient* client); // LayerClient implementation. - virtual scoped_refptr<base::debug::ConvertableToTraceFormat> - TakeDebugInfo() OVERRIDE; + virtual scoped_refptr<base::debug::ConvertableToTraceFormat> TakeDebugInfo() + OVERRIDE; virtual void setScrollParent(blink::WebLayer* parent); virtual void setClipParent(blink::WebLayer* parent); @@ -156,7 +147,6 @@ class WebLayerImpl : public blink::WebLayer, public cc::LayerClient { DISALLOW_COPY_AND_ASSIGN(WebLayerImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_LAYER_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc b/cc/blink/web_layer_impl_fixed_bounds.cc index b3195f9..5ffb660 100644 --- a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc +++ b/cc/blink/web_layer_impl_fixed_bounds.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" +#include "cc/blink/web_layer_impl_fixed_bounds.h" #include "cc/layers/layer.h" #include "third_party/WebKit/public/platform/WebFloatPoint.h" @@ -11,7 +11,7 @@ using cc::Layer; -namespace content { +namespace cc_blink { WebLayerImplFixedBounds::WebLayerImplFixedBounds() { } @@ -97,5 +97,4 @@ void WebLayerImplFixedBounds::UpdateLayerBoundsAndTransform() { layer_->SetTransform(transform_with_bounds_scale); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h b/cc/blink/web_layer_impl_fixed_bounds.h index 2048666f..07c461c 100644 --- a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h +++ b/cc/blink/web_layer_impl_fixed_bounds.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ +#ifndef CC_BLINK_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ +#define CC_BLINK_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ -#include "content/renderer/compositor_bindings/web_layer_impl.h" +#include "cc/blink/web_layer_impl.h" #include "ui/gfx/size.h" #include "ui/gfx/transform.h" -namespace content { +namespace cc_blink { // A special implementation of WebLayerImpl for layers that its contents // need to be automatically scaled when the bounds changes. The compositor @@ -18,9 +18,8 @@ namespace content { // transformation scales. class WebLayerImplFixedBounds : public WebLayerImpl { public: - CONTENT_EXPORT WebLayerImplFixedBounds(); - CONTENT_EXPORT explicit WebLayerImplFixedBounds( - scoped_refptr<cc::Layer>); + CC_BLINK_EXPORT WebLayerImplFixedBounds(); + CC_BLINK_EXPORT explicit WebLayerImplFixedBounds(scoped_refptr<cc::Layer>); virtual ~WebLayerImplFixedBounds(); // WebLayerImpl overrides. @@ -32,7 +31,7 @@ class WebLayerImplFixedBounds : public WebLayerImpl { virtual void setTransform(const SkMatrix44& transform); virtual SkMatrix44 transform() const; - CONTENT_EXPORT void SetFixedBounds(gfx::Size bounds); + CC_BLINK_EXPORT void SetFixedBounds(gfx::Size bounds); protected: void SetTransformInternal(const gfx::Transform& transform); @@ -46,7 +45,6 @@ class WebLayerImplFixedBounds : public WebLayerImpl { DISALLOW_COPY_AND_ASSIGN(WebLayerImplFixedBounds); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_LAYER_IMPL_FIXED_BOUNDS_H_ diff --git a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc b/cc/blink/web_layer_impl_fixed_bounds_unittest.cc index 1ab52f0..e8f4835 100644 --- a/content/renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc +++ b/cc/blink/web_layer_impl_fixed_bounds_unittest.cc @@ -3,11 +3,11 @@ // found in the LICENSE file. #include <vector> +#include "cc/blink/web_layer_impl_fixed_bounds.h" #include "cc/layers/picture_image_layer.h" #include "cc/test/fake_layer_tree_host.h" #include "cc/test/geometry_test_utils.h" #include "cc/trees/layer_tree_host_common.h" -#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" #include "testing/gtest/include/gtest/gtest.h" #include "third_party/WebKit/public/platform/WebFloatPoint.h" #include "third_party/WebKit/public/platform/WebSize.h" @@ -17,12 +17,11 @@ using blink::WebFloatPoint; using blink::WebSize; -namespace content { +namespace cc_blink { namespace { TEST(WebLayerImplFixedBoundsTest, IdentityBounds) { scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds()); - layer->setAnchorPoint(WebFloatPoint(0, 0)); layer->SetFixedBounds(gfx::Size(100, 100)); layer->setBounds(WebSize(100, 100)); EXPECT_EQ(WebSize(100, 100), layer->bounds()); @@ -61,7 +60,6 @@ void CheckBoundsScaleSimple(WebLayerImplFixedBounds* layer, TEST(WebLayerImplFixedBoundsTest, BoundsScaleSimple) { scoped_ptr<WebLayerImplFixedBounds> layer(new WebLayerImplFixedBounds()); - layer->setAnchorPoint(WebFloatPoint(0, 0)); CheckBoundsScaleSimple(layer.get(), WebSize(100, 200), gfx::Size(150, 250)); // Change fixed_bounds. CheckBoundsScaleSimple(layer.get(), WebSize(100, 200), gfx::Size(75, 100)); @@ -95,7 +93,6 @@ void CompareFixedBoundsLayerAndNormalLayer(const WebFloatPoint& anchor_point, new WebLayerImplFixedBounds(cc::PictureImageLayer::Create()); fixed_bounds_layer->setBounds(bounds); fixed_bounds_layer->SetFixedBounds(fixed_bounds); - fixed_bounds_layer->setAnchorPoint(anchor_point); fixed_bounds_layer->setTransform(transform.matrix()); fixed_bounds_layer->setPosition(position); root_layer->addChild(fixed_bounds_layer); @@ -103,7 +100,6 @@ void CompareFixedBoundsLayerAndNormalLayer(const WebFloatPoint& anchor_point, WebLayerImpl* normal_layer(new WebLayerImpl(cc::PictureImageLayer::Create())); normal_layer->setBounds(bounds); - normal_layer->setAnchorPoint(anchor_point); normal_layer->setTransform(transform.matrix()); normal_layer->setPosition(position); root_layer->addChild(normal_layer); @@ -178,4 +174,4 @@ TEST(WebLayerImplFixedBoundsTest, MAYBE_CompareToWebLayerImplComplex) { } } // namespace -} // namespace content +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc b/cc/blink/web_nine_patch_layer_impl.cc index 55a7501..6b3eacf 100644 --- a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc +++ b/cc/blink/web_nine_patch_layer_impl.cc @@ -2,16 +2,16 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_nine_patch_layer_impl.h" +#include "cc/blink/web_nine_patch_layer_impl.h" #include "base/command_line.h" #include "cc/base/switches.h" +#include "cc/blink/web_layer_impl.h" +#include "cc/blink/web_layer_impl_fixed_bounds.h" #include "cc/layers/nine_patch_layer.h" #include "cc/layers/picture_image_layer.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" -#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h" -namespace content { +namespace cc_blink { WebNinePatchLayerImpl::WebNinePatchLayerImpl() { layer_.reset(new WebLayerImpl(cc::NinePatchLayer::Create())); @@ -58,5 +58,4 @@ void WebNinePatchLayerImpl::setFillCenter(bool fill_center) { nine_patch->SetFillCenter(fill_center); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h b/cc/blink/web_nine_patch_layer_impl.h index cad69d7..bfdb32a 100644 --- a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.h +++ b/cc/blink/web_nine_patch_layer_impl.h @@ -2,21 +2,21 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ +#ifndef CC_BLINK_WEB_NINE_PATCH_LAYER_IMPL_H_ +#define CC_BLINK_WEB_NINE_PATCH_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebNinePatchLayer.h" #include "third_party/skia/include/core/SkBitmap.h" -namespace content { +namespace cc_blink { class WebLayerImpl; class WebNinePatchLayerImpl : public blink::WebNinePatchLayer { public: - CONTENT_EXPORT WebNinePatchLayerImpl(); + CC_BLINK_EXPORT WebNinePatchLayerImpl(); virtual ~WebNinePatchLayerImpl(); // blink::WebNinePatchLayer implementation. @@ -36,7 +36,6 @@ class WebNinePatchLayerImpl : public blink::WebNinePatchLayer { DISALLOW_COPY_AND_ASSIGN(WebNinePatchLayerImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_NINE_PATCH_LAYER_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_NINE_PATCH_LAYER_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc b/cc/blink/web_scroll_offset_animation_curve_impl.cc index b876a90..e1f1bfd 100644 --- a/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc +++ b/cc/blink/web_scroll_offset_animation_curve_impl.cc @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h" +#include "cc/blink/web_scroll_offset_animation_curve_impl.h" #include "cc/animation/scroll_offset_animation_curve.h" #include "cc/animation/timing_function.h" -#include "content/renderer/compositor_bindings/web_animation_curve_common.h" +#include "cc/blink/web_animation_curve_common.h" using blink::WebFloatPoint; -namespace content { +namespace cc_blink { WebScrollOffsetAnimationCurveImpl::WebScrollOffsetAnimationCurveImpl( WebFloatPoint target_value, @@ -47,5 +47,4 @@ WebScrollOffsetAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h b/cc/blink/web_scroll_offset_animation_curve_impl.h index 2d40efa..8266780c 100644 --- a/content/renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h +++ b/cc/blink/web_scroll_offset_animation_curve_impl.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ +#ifndef CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ +#define CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebScrollOffsetAnimationCurve.h" namespace cc { @@ -14,12 +14,12 @@ class AnimationCurve; class ScrollOffsetAnimationCurve; } -namespace content { +namespace cc_blink { class WebScrollOffsetAnimationCurveImpl : public blink::WebScrollOffsetAnimationCurve { public: - CONTENT_EXPORT WebScrollOffsetAnimationCurveImpl( + CC_BLINK_EXPORT WebScrollOffsetAnimationCurveImpl( blink::WebFloatPoint target_value, TimingFunctionType timing_function); virtual ~WebScrollOffsetAnimationCurveImpl(); @@ -40,7 +40,6 @@ class WebScrollOffsetAnimationCurveImpl DISALLOW_COPY_AND_ASSIGN(WebScrollOffsetAnimationCurveImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_SCROLL_OFFSET_ANIMATION_CURVE_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc b/cc/blink/web_scrollbar_layer_impl.cc index 0d3be19..dcc8d6f 100644 --- a/content/renderer/compositor_bindings/web_scrollbar_layer_impl.cc +++ b/cc/blink/web_scrollbar_layer_impl.cc @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_scrollbar_layer_impl.h" +#include "cc/blink/web_scrollbar_layer_impl.h" +#include "cc/blink/scrollbar_impl.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/layer.h" #include "cc/layers/painted_scrollbar_layer.h" #include "cc/layers/scrollbar_layer_interface.h" #include "cc/layers/solid_color_scrollbar_layer.h" -#include "content/renderer/compositor_bindings/scrollbar_impl.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" using cc::PaintedScrollbarLayer; using cc::SolidColorScrollbarLayer; @@ -24,7 +24,7 @@ cc::ScrollbarOrientation ConvertOrientation( } // namespace -namespace content { +namespace cc_blink { WebScrollbarLayerImpl::WebScrollbarLayerImpl( blink::WebScrollbar* scrollbar, @@ -70,5 +70,4 @@ void WebScrollbarLayerImpl::setClipLayer(blink::WebLayer* layer) { layer_->layer()->ToScrollbarLayer()->SetClipLayer(clip_layer->id()); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h b/cc/blink/web_scrollbar_layer_impl.h index 47719e1..14ed66e 100644 --- a/content/renderer/compositor_bindings/web_scrollbar_layer_impl.h +++ b/cc/blink/web_scrollbar_layer_impl.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ +#ifndef CC_BLINK_WEB_SCROLLBAR_LAYER_IMPL_H_ +#define CC_BLINK_WEB_SCROLLBAR_LAYER_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebScrollbar.h" #include "third_party/WebKit/public/platform/WebScrollbarLayer.h" @@ -15,17 +15,17 @@ class WebScrollbarThemeGeometry; class WebScrollbarThemePainter; } -namespace content { +namespace cc_blink { class WebLayerImpl; class WebScrollbarLayerImpl : public blink::WebScrollbarLayer { public: - CONTENT_EXPORT WebScrollbarLayerImpl( + CC_BLINK_EXPORT WebScrollbarLayerImpl( blink::WebScrollbar* scrollbar, blink::WebScrollbarThemePainter painter, blink::WebScrollbarThemeGeometry* geometry); - CONTENT_EXPORT WebScrollbarLayerImpl( + CC_BLINK_EXPORT WebScrollbarLayerImpl( blink::WebScrollbar::Orientation orientation, int thumb_thickness, int track_start, @@ -43,6 +43,6 @@ class WebScrollbarLayerImpl : public blink::WebScrollbarLayer { DISALLOW_COPY_AND_ASSIGN(WebScrollbarLayerImpl); }; -} // namespace content +} // namespace cc_blink -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_SCROLLBAR_LAYER_IMPL_H_ +#endif // CC_BLINK_WEB_SCROLLBAR_LAYER_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc b/cc/blink/web_to_cc_animation_delegate_adapter.cc index 4287f34..95a52b4 100644 --- a/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc +++ b/cc/blink/web_to_cc_animation_delegate_adapter.cc @@ -2,9 +2,9 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h" +#include "cc/blink/web_to_cc_animation_delegate_adapter.h" -namespace content { +namespace cc_blink { WebToCCAnimationDelegateAdapter::WebToCCAnimationDelegateAdapter( blink::WebCompositorAnimationDelegate* delegate) @@ -29,5 +29,4 @@ void WebToCCAnimationDelegateAdapter::NotifyAnimationFinished( target_property)); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h b/cc/blink/web_to_cc_animation_delegate_adapter.h index 9213531..ac894a0 100644 --- a/content/renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h +++ b/cc/blink/web_to_cc_animation_delegate_adapter.h @@ -2,15 +2,15 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ +#ifndef CC_BLINK_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ +#define CC_BLINK_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ #include "base/basictypes.h" #include "base/compiler_specific.h" #include "cc/animation/animation_delegate.h" #include "third_party/WebKit/public/platform/WebCompositorAnimationDelegate.h" -namespace content { +namespace cc_blink { class WebToCCAnimationDelegateAdapter : public cc::AnimationDelegate { public: @@ -30,7 +30,6 @@ class WebToCCAnimationDelegateAdapter : public cc::AnimationDelegate { DISALLOW_COPY_AND_ASSIGN(WebToCCAnimationDelegateAdapter); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_TO_CC_ANIMATION_DELEGATE_ADAPTER_H_ diff --git a/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc b/cc/blink/web_transform_animation_curve_impl.cc index 78718ee..a6d19da 100644 --- a/content/renderer/compositor_bindings/web_transform_animation_curve_impl.cc +++ b/cc/blink/web_transform_animation_curve_impl.cc @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_transform_animation_curve_impl.h" +#include "cc/blink/web_transform_animation_curve_impl.h" #include "cc/animation/keyframed_animation_curve.h" #include "cc/animation/timing_function.h" #include "cc/animation/transform_operations.h" -#include "content/renderer/compositor_bindings/web_animation_curve_common.h" -#include "content/renderer/compositor_bindings/web_transform_operations_impl.h" +#include "cc/blink/web_animation_curve_common.h" +#include "cc/blink/web_transform_operations_impl.h" using blink::WebTransformKeyframe; -namespace content { +namespace cc_blink { WebTransformAnimationCurveImpl::WebTransformAnimationCurveImpl() : curve_(cc::KeyframedTransformAnimationCurve::Create()) { @@ -59,5 +59,4 @@ WebTransformAnimationCurveImpl::CloneToAnimationCurve() const { return curve_->Clone(); } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h b/cc/blink/web_transform_animation_curve_impl.h index 524fe41..95ca902 100644 --- a/content/renderer/compositor_bindings/web_transform_animation_curve_impl.h +++ b/cc/blink/web_transform_animation_curve_impl.h @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ +#ifndef CC_BLINK_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ +#define CC_BLINK_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ #include "base/memory/scoped_ptr.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebTransformAnimationCurve.h" namespace cc { @@ -18,12 +18,12 @@ namespace blink { class WebTransformKeyframe; } -namespace content { +namespace cc_blink { class WebTransformAnimationCurveImpl : public blink::WebTransformAnimationCurve { public: - CONTENT_EXPORT WebTransformAnimationCurveImpl(); + CC_BLINK_EXPORT WebTransformAnimationCurveImpl(); virtual ~WebTransformAnimationCurveImpl(); // blink::WebCompositorAnimationCurve implementation. @@ -47,7 +47,6 @@ class WebTransformAnimationCurveImpl DISALLOW_COPY_AND_ASSIGN(WebTransformAnimationCurveImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_TRANSFORM_ANIMATION_CURVE_IMPL_H_ diff --git a/content/renderer/compositor_bindings/web_transform_operations_impl.cc b/cc/blink/web_transform_operations_impl.cc index cfec1b4..0efc243 100644 --- a/content/renderer/compositor_bindings/web_transform_operations_impl.cc +++ b/cc/blink/web_transform_operations_impl.cc @@ -2,13 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/renderer/compositor_bindings/web_transform_operations_impl.h" +#include "cc/blink/web_transform_operations_impl.h" #include <algorithm> #include "ui/gfx/transform.h" -namespace content { +namespace cc_blink { WebTransformOperationsImpl::WebTransformOperationsImpl() { } @@ -65,5 +65,4 @@ bool WebTransformOperationsImpl::isIdentity() const { WebTransformOperationsImpl::~WebTransformOperationsImpl() { } -} // namespace content - +} // namespace cc_blink diff --git a/content/renderer/compositor_bindings/web_transform_operations_impl.h b/cc/blink/web_transform_operations_impl.h index f0f7b47..0c91e06 100644 --- a/content/renderer/compositor_bindings/web_transform_operations_impl.h +++ b/cc/blink/web_transform_operations_impl.h @@ -2,19 +2,19 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ -#define CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ +#ifndef CC_BLINK_WEB_TRANSFORM_OPERATIONS_IMPL_H_ +#define CC_BLINK_WEB_TRANSFORM_OPERATIONS_IMPL_H_ #include "base/memory/scoped_ptr.h" #include "cc/animation/transform_operations.h" -#include "content/common/content_export.h" +#include "cc/blink/cc_blink_export.h" #include "third_party/WebKit/public/platform/WebTransformOperations.h" -namespace content { +namespace cc_blink { class WebTransformOperationsImpl : public blink::WebTransformOperations { public: - CONTENT_EXPORT WebTransformOperationsImpl(); + CC_BLINK_EXPORT WebTransformOperationsImpl(); virtual ~WebTransformOperationsImpl(); const cc::TransformOperations& AsTransformOperations() const; @@ -36,7 +36,6 @@ class WebTransformOperationsImpl : public blink::WebTransformOperations { DISALLOW_COPY_AND_ASSIGN(WebTransformOperationsImpl); }; -} // namespace content - -#endif // CONTENT_RENDERER_COMPOSITOR_BINDINGS_WEB_TRANSFORM_OPERATIONS_IMPL_H_ +} // namespace cc_blink +#endif // CC_BLINK_WEB_TRANSFORM_OPERATIONS_IMPL_H_ diff --git a/content/DEPS b/content/DEPS index bce04c1..34616a4 100644 --- a/content/DEPS +++ b/content/DEPS @@ -18,6 +18,7 @@ include_rules = [ "+blink", "+cc", + "-cc/blink", # If you want to use any of these files, move them to src/base first. "-cc/base/scoped_ptr_algorithm.h", "-cc/base/scoped_ptr_deque.h", diff --git a/content/content_renderer.gypi b/content/content_renderer.gypi index 1d63e16..a6cfedc 100644 --- a/content/content_renderer.gypi +++ b/content/content_renderer.gypi @@ -8,6 +8,7 @@ '../base/base.gyp:base', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', '../cc/cc.gyp:cc', + '../cc/blink/cc_blink.gyp:cc_blink', '../gin/gin.gyp:gin', '../gpu/gpu.gyp:gpu', '../jingle/jingle.gyp:jingle_glue', @@ -113,44 +114,6 @@ 'renderer/clipboard_utils.h', 'renderer/child_frame_compositing_helper.cc', 'renderer/child_frame_compositing_helper.h', - 'renderer/compositor_bindings/scrollbar_impl.cc', - 'renderer/compositor_bindings/scrollbar_impl.h', - 'renderer/compositor_bindings/web_animation_curve_common.cc', - 'renderer/compositor_bindings/web_animation_curve_common.h', - 'renderer/compositor_bindings/web_animation_impl.cc', - 'renderer/compositor_bindings/web_animation_impl.h', - 'renderer/compositor_bindings/web_compositor_support_impl.cc', - 'renderer/compositor_bindings/web_compositor_support_impl.h', - 'renderer/compositor_bindings/web_content_layer_impl.cc', - 'renderer/compositor_bindings/web_content_layer_impl.h', - 'renderer/compositor_bindings/web_external_bitmap_impl.cc', - 'renderer/compositor_bindings/web_external_bitmap_impl.h', - 'renderer/compositor_bindings/web_external_texture_layer_impl.cc', - 'renderer/compositor_bindings/web_external_texture_layer_impl.h', - 'renderer/compositor_bindings/web_filter_animation_curve_impl.cc', - 'renderer/compositor_bindings/web_filter_animation_curve_impl.h', - 'renderer/compositor_bindings/web_filter_operations_impl.cc', - 'renderer/compositor_bindings/web_filter_operations_impl.h', - 'renderer/compositor_bindings/web_float_animation_curve_impl.cc', - 'renderer/compositor_bindings/web_float_animation_curve_impl.h', - 'renderer/compositor_bindings/web_image_layer_impl.cc', - 'renderer/compositor_bindings/web_image_layer_impl.h', - 'renderer/compositor_bindings/web_layer_impl.cc', - 'renderer/compositor_bindings/web_layer_impl.h', - 'renderer/compositor_bindings/web_layer_impl_fixed_bounds.cc', - 'renderer/compositor_bindings/web_layer_impl_fixed_bounds.h', - 'renderer/compositor_bindings/web_nine_patch_layer_impl.cc', - 'renderer/compositor_bindings/web_nine_patch_layer_impl.h', - 'renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.cc', - 'renderer/compositor_bindings/web_scroll_offset_animation_curve_impl.h', - 'renderer/compositor_bindings/web_scrollbar_layer_impl.cc', - 'renderer/compositor_bindings/web_scrollbar_layer_impl.h', - 'renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.cc', - 'renderer/compositor_bindings/web_to_cc_animation_delegate_adapter.h', - 'renderer/compositor_bindings/web_transform_animation_curve_impl.cc', - 'renderer/compositor_bindings/web_transform_animation_curve_impl.h', - 'renderer/compositor_bindings/web_transform_operations_impl.cc', - 'renderer/compositor_bindings/web_transform_operations_impl.h', 'renderer/context_menu_params_builder.cc', 'renderer/context_menu_params_builder.h', 'renderer/cursor_utils.cc', diff --git a/content/content_shell.gypi b/content/content_shell.gypi index e0969dd..15b3623 100644 --- a/content/content_shell.gypi +++ b/content/content_shell.gypi @@ -43,6 +43,7 @@ '../base/base.gyp:base', '../base/base.gyp:base_static', '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + '../cc/blink/cc_blink.gyp:cc_blink', '../cc/cc.gyp:cc', '../components/components.gyp:breakpad_component', '../gin/gin.gyp:gin', diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 0a4dddc7..76cc068 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -269,6 +269,7 @@ 'content.gyp:content_ppapi_plugin', 'content.gyp:content_renderer', 'content.gyp:content_utility', + '../cc/blink/cc_blink.gyp:cc_blink', '../cc/cc.gyp:cc', '../cc/cc_tests.gyp:cc_test_support', '../media/media.gyp:media', @@ -672,9 +673,6 @@ 'renderer/android/phone_number_detector_unittest.cc', 'renderer/battery_status/battery_status_dispatcher_unittest.cc', 'renderer/bmp_image_decoder_unittest.cc', - 'renderer/compositor_bindings/web_animation_unittest.cc', - 'renderer/compositor_bindings/web_float_animation_curve_unittest.cc', - 'renderer/compositor_bindings/web_layer_impl_fixed_bounds_unittest.cc', 'renderer/device_sensors/device_light_event_pump_unittest.cc', 'renderer/device_sensors/device_motion_event_pump_unittest.cc', 'renderer/device_sensors/device_orientation_event_pump_unittest.cc', diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn index f2fef67..014aa16 100644 --- a/content/renderer/BUILD.gn +++ b/content/renderer/BUILD.gn @@ -24,6 +24,7 @@ source_set("renderer") { "//crypto:platform", "//base/allocator", + "//cc/blink", "//content:resources", "//content/common:mojo_bindings", "//gin", diff --git a/content/renderer/DEPS b/content/renderer/DEPS index 27cce10..59810a0 100644 --- a/content/renderer/DEPS +++ b/content/renderer/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+cc/blink", "+content/public/renderer", "+content/child", "+gin", diff --git a/content/renderer/child_frame_compositing_helper.cc b/content/renderer/child_frame_compositing_helper.cc index 480d3c0..ff9b49a 100644 --- a/content/renderer/child_frame_compositing_helper.cc +++ b/content/renderer/child_frame_compositing_helper.cc @@ -4,6 +4,7 @@ #include "content/renderer/child_frame_compositing_helper.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/delegated_frame_provider.h" #include "cc/layers/delegated_frame_resource_collection.h" #include "cc/layers/delegated_renderer_layer.h" @@ -18,7 +19,6 @@ #include "content/common/gpu/client/context_provider_command_buffer.h" #include "content/renderer/browser_plugin/browser_plugin.h" #include "content/renderer/browser_plugin/browser_plugin_manager.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_frame_proxy.h" #include "content/renderer/render_thread_impl.h" @@ -187,7 +187,7 @@ void ChildFrameCompositingHelper::EnableCompositing(bool enable) { background_layer_->SetMasksToBounds(true); background_layer_->SetBackgroundColor( SkColorSetARGBInline(255, 255, 255, 255)); - web_layer_.reset(new WebLayerImpl(background_layer_)); + web_layer_.reset(new cc_blink::WebLayerImpl(background_layer_)); } if (GetContainer()) { diff --git a/content/renderer/compositor_bindings/OWNERS b/content/renderer/compositor_bindings/OWNERS deleted file mode 100644 index d42bb39..0000000 --- a/content/renderer/compositor_bindings/OWNERS +++ /dev/null @@ -1,2 +0,0 @@ -enne@chromium.org -nduca@chromium.org diff --git a/content/renderer/compositor_bindings/PRESUBMIT.py b/content/renderer/compositor_bindings/PRESUBMIT.py deleted file mode 100644 index 8e4e571..0000000 --- a/content/renderer/compositor_bindings/PRESUBMIT.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -""" -See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for -details on the presubmit API built into gcl. -""" - -SOURCE_FILES = (r'^.*\.(cc|h)$') - -def CheckChangeLintsClean(input_api, output_api): - input_api.cpplint._cpplint_state.ResetErrorCounts() # reset global state - source_filter = lambda x: input_api.FilterSourceFile( - x, white_list=SOURCE_FILES, black_list=None) - files = [f.AbsoluteLocalPath() for f in - input_api.AffectedSourceFiles(source_filter)] - level = 1 # strict, but just warn - - for file_name in files: - input_api.cpplint.ProcessFile(file_name, level) - - if not input_api.cpplint._cpplint_state.error_count: - return [] - - return [output_api.PresubmitPromptWarning( - 'Changelist failed cpplint.py check.')] - - -def CheckChangeOnUpload(input_api, output_api): - results = [] - results += CheckChangeLintsClean(input_api, output_api) - return results diff --git a/content/renderer/gpu/render_widget_compositor.cc b/content/renderer/gpu/render_widget_compositor.cc index d21b85b..dc007a2 100644 --- a/content/renderer/gpu/render_widget_compositor.cc +++ b/content/renderer/gpu/render_widget_compositor.cc @@ -18,6 +18,7 @@ #include "cc/base/latency_info_swap_promise_monitor.h" #include "cc/base/swap_promise.h" #include "cc/base/switches.h" +#include "cc/blink/web_layer_impl.h" #include "cc/debug/layer_tree_debug_state.h" #include "cc/debug/micro_benchmark.h" #include "cc/input/layer_selection_bound.h" @@ -31,7 +32,6 @@ #include "content/common/content_switches_internal.h" #include "content/common/gpu/client/context_provider_command_buffer.h" #include "content/public/common/content_switches.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/input/input_handler_manager.h" #include "content/renderer/render_thread_impl.h" #include "gpu/command_buffer/client/gles2_interface.h" @@ -552,7 +552,7 @@ void RenderWidgetCompositor::setSurfaceReady() { void RenderWidgetCompositor::setRootLayer(const blink::WebLayer& layer) { layer_tree_host_->SetRootLayer( - static_cast<const WebLayerImpl*>(&layer)->layer()); + static_cast<const cc_blink::WebLayerImpl*>(&layer)->layer()); } void RenderWidgetCompositor::clearRootLayer() { @@ -645,7 +645,7 @@ void RenderWidgetCompositor::didStopFlinging() { } void RenderWidgetCompositor::registerForAnimations(blink::WebLayer* layer) { - cc::Layer* cc_layer = static_cast<WebLayerImpl*>(layer)->layer(); + cc::Layer* cc_layer = static_cast<cc_blink::WebLayerImpl*>(layer)->layer(); cc_layer->layer_animation_controller()->SetAnimationRegistrar( layer_tree_host_->animation_registrar()); } @@ -655,13 +655,14 @@ void RenderWidgetCompositor::registerViewportLayers( const blink::WebLayer* innerViewportScrollLayer, const blink::WebLayer* outerViewportScrollLayer) { layer_tree_host_->RegisterViewportLayers( - static_cast<const WebLayerImpl*>(pageScaleLayer)->layer(), - static_cast<const WebLayerImpl*>(innerViewportScrollLayer)->layer(), + static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(), + static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer) + ->layer(), // The outer viewport layer will only exist when using pinch virtual // viewports. - outerViewportScrollLayer - ? static_cast<const WebLayerImpl*>(outerViewportScrollLayer)->layer() - : NULL); + outerViewportScrollLayer ? static_cast<const cc_blink::WebLayerImpl*>( + outerViewportScrollLayer)->layer() + : NULL); } void RenderWidgetCompositor::clearViewportLayers() { diff --git a/content/renderer/media/android/webmediaplayer_android.cc b/content/renderer/media/android/webmediaplayer_android.cc index 930ea6d..068a13d 100644 --- a/content/renderer/media/android/webmediaplayer_android.cc +++ b/content/renderer/media/android/webmediaplayer_android.cc @@ -16,11 +16,11 @@ #include "base/metrics/histogram.h" #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/video_layer.h" #include "content/public/common/content_client.h" #include "content/public/common/content_switches.h" #include "content/public/renderer/render_frame.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/media/android/renderer_demuxer_android.h" #include "content/renderer/media/android/renderer_media_player_manager.h" #include "content/renderer/media/crypto/key_systems.h" @@ -823,7 +823,7 @@ void WebMediaPlayerAndroid::OnVideoSizeChanged(int width, int height) { // Lazily allocate compositing layer. if (!video_weblayer_) { - video_weblayer_.reset(new WebLayerImpl( + video_weblayer_.reset(new cc_blink::WebLayerImpl( cc::VideoLayer::Create(this, media::VIDEO_ROTATION_0))); client_->setWebLayer(video_weblayer_.get()); } diff --git a/content/renderer/media/android/webmediaplayer_android.h b/content/renderer/media/android/webmediaplayer_android.h index c994b52..6f74ae5 100644 --- a/content/renderer/media/android/webmediaplayer_android.h +++ b/content/renderer/media/android/webmediaplayer_android.h @@ -45,6 +45,10 @@ class WebFrame; class WebURL; } +namespace cc_blink { +class WebLayerImpl; +} + namespace gpu { struct MailboxHolder; } @@ -57,7 +61,6 @@ namespace content { class RendererCdmManager; class RendererMediaPlayerManager; class WebContentDecryptionModuleImpl; -class WebLayerImpl; class WebMediaPlayerDelegate; // This class implements blink::WebMediaPlayer by keeping the android @@ -414,7 +417,7 @@ class WebMediaPlayerAndroid : public blink::WebMediaPlayer, // not NULL while the compositor is actively using this webmediaplayer. cc::VideoFrameProvider::Client* video_frame_provider_client_; - scoped_ptr<WebLayerImpl> video_weblayer_; + scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; #if defined(VIDEO_HOLE) // A rectangle represents the geometry of video frame, when computed last diff --git a/content/renderer/media/webmediaplayer_impl.cc b/content/renderer/media/webmediaplayer_impl.cc index cd5f9ef..9d516c9 100644 --- a/content/renderer/media/webmediaplayer_impl.cc +++ b/content/renderer/media/webmediaplayer_impl.cc @@ -21,10 +21,10 @@ #include "base/strings/string_number_conversions.h" #include "base/strings/utf_string_conversions.h" #include "base/synchronization/waitable_event.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/video_layer.h" #include "content/public/common/content_switches.h" #include "content/public/renderer/render_frame.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/media/buffered_data_source.h" #include "content/renderer/media/crypto/key_systems.h" #include "content/renderer/media/render_media_log.h" @@ -1017,7 +1017,7 @@ void WebMediaPlayerImpl::OnPipelineMetadata( pipeline_metadata_.natural_size = gfx::Size(size.height(), size.width()); } - video_weblayer_.reset(new WebLayerImpl(layer)); + video_weblayer_.reset(new cc_blink::WebLayerImpl(layer)); video_weblayer_->setOpaque(opaque_); client_->setWebLayer(video_weblayer_.get()); } diff --git a/content/renderer/media/webmediaplayer_impl.h b/content/renderer/media/webmediaplayer_impl.h index 89f84df..f30bfe2 100644 --- a/content/renderer/media/webmediaplayer_impl.h +++ b/content/renderer/media/webmediaplayer_impl.h @@ -42,6 +42,10 @@ namespace base { class MessageLoopProxy; } +namespace cc_blink { +class WebLayerImpl; +} + namespace media { class ChunkDemuxer; class GpuVideoAcceleratorFactories; @@ -54,7 +58,6 @@ class BufferedDataSource; class VideoFrameCompositor; class WebAudioSourceProviderImpl; class WebContentDecryptionModuleImpl; -class WebLayerImpl; class WebMediaPlayerDelegate; class WebMediaPlayerParams; class WebTextTrackImpl; @@ -342,7 +345,7 @@ class WebMediaPlayerImpl // The compositor layer for displaying the video content when using composited // playback. - scoped_ptr<WebLayerImpl> video_weblayer_; + scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; // Text track objects get a unique index value when they're created. int text_track_index_; diff --git a/content/renderer/media/webmediaplayer_ms.cc b/content/renderer/media/webmediaplayer_ms.cc index be498bb..e216686 100644 --- a/content/renderer/media/webmediaplayer_ms.cc +++ b/content/renderer/media/webmediaplayer_ms.cc @@ -10,9 +10,9 @@ #include "base/callback.h" #include "base/message_loop/message_loop.h" #include "base/metrics/histogram.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/video_layer.h" #include "content/public/renderer/render_view.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/media/media_stream_audio_renderer.h" #include "content/renderer/media/media_stream_renderer_factory.h" #include "content/renderer/media/video_frame_provider.h" @@ -418,7 +418,7 @@ void WebMediaPlayerMS::OnFrameAvailable( GetClient()->sizeChanged(); if (video_frame_provider_) { - video_weblayer_.reset(new WebLayerImpl( + video_weblayer_.reset(new cc_blink::WebLayerImpl( cc::VideoLayer::Create(this, media::VIDEO_ROTATION_0))); video_weblayer_->setOpaque(true); GetClient()->setWebLayer(video_weblayer_.get()); diff --git a/content/renderer/media/webmediaplayer_ms.h b/content/renderer/media/webmediaplayer_ms.h index 0bbfec5..9370c62 100644 --- a/content/renderer/media/webmediaplayer_ms.h +++ b/content/renderer/media/webmediaplayer_ms.h @@ -25,12 +25,14 @@ namespace media { class MediaLog; } +namespace cc_blink { +class WebLayerImpl; +} namespace content { class MediaStreamAudioRenderer; class MediaStreamRendererFactory; class VideoFrameProvider; -class WebLayerImpl; class WebMediaPlayerDelegate; // WebMediaPlayerMS delegates calls from WebCore::MediaPlayerPrivate to @@ -168,7 +170,7 @@ class WebMediaPlayerMS base::Lock current_frame_lock_; bool pending_repaint_; - scoped_ptr<WebLayerImpl> video_weblayer_; + scoped_ptr<cc_blink::WebLayerImpl> video_weblayer_; // A pointer back to the compositor to inform it about state changes. This is // not NULL while the compositor is actively using this webmediaplayer. diff --git a/content/renderer/npapi/webplugin_impl.cc b/content/renderer/npapi/webplugin_impl.cc index 2206b11..b2ad323 100644 --- a/content/renderer/npapi/webplugin_impl.cc +++ b/content/renderer/npapi/webplugin_impl.cc @@ -14,6 +14,7 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" #include "base/strings/utf_string_conversions.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/io_surface_layer.h" #include "content/child/appcache/web_application_cache_host_impl.h" #include "content/child/multipart_response_delegate.h" @@ -25,7 +26,6 @@ #include "content/public/common/content_constants.h" #include "content/public/common/content_switches.h" #include "content/public/renderer/content_renderer_client.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/npapi/webplugin_delegate_proxy.h" #include "content/renderer/render_frame_impl.h" #include "content/renderer/render_process.h" @@ -851,7 +851,7 @@ void WebPluginImpl::AcceleratedPluginSwappedIOSurface() { if (next_io_surface_id_) { if (!io_surface_layer_.get()) { io_surface_layer_ = cc::IOSurfaceLayer::Create(); - web_layer_.reset(new WebLayerImpl(io_surface_layer_)); + web_layer_.reset(new cc_blink::WebLayerImpl(io_surface_layer_)); container_->setWebLayer(web_layer_.get()); } io_surface_layer_->SetIOSurfaceProperties( diff --git a/content/renderer/pepper/pepper_plugin_instance_impl.cc b/content/renderer/pepper/pepper_plugin_instance_impl.cc index 8c3db52..682a6da 100644 --- a/content/renderer/pepper/pepper_plugin_instance_impl.cc +++ b/content/renderer/pepper/pepper_plugin_instance_impl.cc @@ -17,6 +17,7 @@ #include "base/strings/utf_string_conversions.h" #include "base/time/time.h" #include "cc/base/latency_info_swap_promise.h" +#include "cc/blink/web_layer_impl.h" #include "cc/layers/texture_layer.h" #include "cc/trees/layer_tree_host.h" #include "content/common/content_constants_internal.h" @@ -24,7 +25,6 @@ #include "content/public/common/content_switches.h" #include "content/public/common/page_zoom.h" #include "content/public/renderer/content_renderer_client.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/gpu/render_widget_compositor.h" #include "content/renderer/pepper/content_decryptor_delegate.h" #include "content/renderer/pepper/event_conversion.h" @@ -2083,10 +2083,10 @@ void PepperPluginInstanceImpl::UpdateLayer(bool device_changed) { // wmode=transparent was specified. opaque = opaque || fullscreen_container_; texture_layer_->SetContentsOpaque(opaque); - web_layer_.reset(new WebLayerImpl(texture_layer_)); + web_layer_.reset(new cc_blink::WebLayerImpl(texture_layer_)); } else if (want_compositor_layer) { compositor_layer_ = bound_compositor_->layer(); - web_layer_.reset(new WebLayerImpl(compositor_layer_)); + web_layer_.reset(new cc_blink::WebLayerImpl(compositor_layer_)); } if (web_layer_) { diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index 930d476..44cdf12 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -29,6 +29,8 @@ #include "base/threading/thread_restrictions.h" #include "base/values.h" #include "cc/base/switches.h" +#include "cc/blink/web_external_bitmap_impl.h" +#include "cc/blink/web_layer_impl.h" #include "cc/resources/raster_worker_pool.h" #include "content/child/appcache/appcache_dispatcher.h" #include "content/child/appcache/appcache_frontend_impl.h" @@ -66,8 +68,6 @@ #include "content/public/renderer/content_renderer_client.h" #include "content/public/renderer/render_process_observer.h" #include "content/public/renderer/render_view_visitor.h" -#include "content/renderer/compositor_bindings/web_external_bitmap_impl.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/devtools/devtools_agent_filter.h" #include "content/renderer/dom_storage/dom_storage_dispatcher.h" #include "content/renderer/dom_storage/webstoragearea_impl.h" @@ -482,7 +482,8 @@ void RenderThreadImpl::Init() { is_impl_side_painting_enabled_ = command_line.HasSwitch(switches::kEnableImplSidePainting); - WebLayerImpl::SetImplSidePaintingEnabled(is_impl_side_painting_enabled_); + cc_blink::WebLayerImpl::SetImplSidePaintingEnabled( + is_impl_side_painting_enabled_); is_zero_copy_enabled_ = command_line.HasSwitch(switches::kEnableZeroCopy) && !command_line.HasSwitch(switches::kDisableZeroCopy); @@ -922,7 +923,7 @@ void RenderThreadImpl::EnsureWebKitInitialized() { if (GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) ScheduleIdleHandler(kLongIdleHandlerDelayMs); - SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction); + cc_blink::SetSharedMemoryAllocationFunction(AllocateSharedMemoryFunction); // Limit use of the scaled image cache to when deferred image decoding is // enabled. diff --git a/content/renderer/renderer_webkitplatformsupport_impl.h b/content/renderer/renderer_webkitplatformsupport_impl.h index 209da82..69dac01 100644 --- a/content/renderer/renderer_webkitplatformsupport_impl.h +++ b/content/renderer/renderer_webkitplatformsupport_impl.h @@ -7,9 +7,9 @@ #include "base/compiler_specific.h" #include "base/memory/scoped_ptr.h" +#include "cc/blink/web_compositor_support_impl.h" #include "content/child/blink_platform_impl.h" #include "content/common/content_export.h" -#include "content/renderer/compositor_bindings/web_compositor_support_impl.h" #include "content/renderer/webpublicsuffixlist_impl.h" #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" #include "third_party/WebKit/public/platform/WebIDBFactory.h" @@ -227,7 +227,7 @@ class CONTENT_EXPORT RendererWebKitPlatformSupportImpl scoped_ptr<WebDatabaseObserverImpl> web_database_observer_impl_; - WebCompositorSupportImpl compositor_support_; + cc_blink::WebCompositorSupportImpl compositor_support_; scoped_ptr<blink::WebScrollbarBehavior> web_scrollbar_behavior_; diff --git a/content/test/DEPS b/content/test/DEPS index fb2a8f8..dc9be12 100644 --- a/content/test/DEPS +++ b/content/test/DEPS @@ -1,4 +1,5 @@ include_rules = [ + "+cc/blink", # Testing utilities can access anything in content/ "+content", "+media/audio", # For AudioParameters in WebRTC tests. diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc index 016d459..b2effb5 100644 --- a/content/test/layouttest_support.cc +++ b/content/test/layouttest_support.cc @@ -6,10 +6,10 @@ #include "base/callback.h" #include "base/lazy_instance.h" +#include "cc/blink/web_layer_impl.h" #include "content/browser/renderer_host/render_widget_host_impl.h" #include "content/common/gpu/image_transport_surface.h" #include "content/public/common/page_state.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/renderer/history_entry.h" #include "content/renderer/history_serialization.h" #include "content/renderer/render_frame_impl.h" @@ -353,7 +353,7 @@ std::string DumpBackForwardList(std::vector<PageState>& page_state, } blink::WebLayer* InstantiateWebLayer(scoped_refptr<cc::TextureLayer> layer) { - return new WebLayerImpl(layer); + return new cc_blink::WebLayerImpl(layer); } } // namespace content diff --git a/content/test/test_webkit_platform_support.h b/content/test/test_webkit_platform_support.h index ddfcf0b..2bda542 100644 --- a/content/test/test_webkit_platform_support.h +++ b/content/test/test_webkit_platform_support.h @@ -7,10 +7,10 @@ #include "base/compiler_specific.h" #include "base/files/scoped_temp_dir.h" +#include "cc/blink/web_compositor_support_impl.h" #include "content/child/blink_platform_impl.h" #include "content/child/simple_webmimeregistry_impl.h" #include "content/child/webfileutilities_impl.h" -#include "content/renderer/compositor_bindings/web_compositor_support_impl.h" #include "content/test/mock_webblob_registry_impl.h" #include "content/test/mock_webclipboard_impl.h" #include "content/test/weburl_loader_mock_factory.h" @@ -97,7 +97,7 @@ class TestWebKitPlatformSupport WebFileUtilitiesImpl file_utilities_; base::ScopedTempDir file_system_root_; scoped_ptr<WebURLLoaderMockFactory> url_loader_factory_; - WebCompositorSupportImpl compositor_support_; + cc_blink::WebCompositorSupportImpl compositor_support_; scoped_ptr<base::StatsTable> stats_table_; #if defined(OS_WIN) || defined(OS_MACOSX) diff --git a/content/test/web_layer_tree_view_impl_for_testing.cc b/content/test/web_layer_tree_view_impl_for_testing.cc index e3f5fd5..e183c2a 100644 --- a/content/test/web_layer_tree_view_impl_for_testing.cc +++ b/content/test/web_layer_tree_view_impl_for_testing.cc @@ -8,12 +8,12 @@ #include "base/strings/string_number_conversions.h" #include "base/synchronization/lock.h" #include "cc/base/switches.h" +#include "cc/blink/web_layer_impl.h" #include "cc/input/input_handler.h" #include "cc/layers/layer.h" #include "cc/output/output_surface.h" #include "cc/test/test_context_provider.h" #include "cc/trees/layer_tree_host.h" -#include "content/renderer/compositor_bindings/web_layer_impl.h" #include "content/test/test_webkit_platform_support.h" #include "third_party/WebKit/public/platform/Platform.h" #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" @@ -54,7 +54,7 @@ void WebLayerTreeViewImplForTesting::setSurfaceReady() { void WebLayerTreeViewImplForTesting::setRootLayer( const blink::WebLayer& root) { layer_tree_host_->SetRootLayer( - static_cast<const WebLayerImpl*>(&root)->layer()); + static_cast<const cc_blink::WebLayerImpl*>(&root)->layer()); } void WebLayerTreeViewImplForTesting::clearRootLayer() { @@ -152,13 +152,14 @@ void WebLayerTreeViewImplForTesting::registerViewportLayers( const blink::WebLayer* innerViewportScrollLayer, const blink::WebLayer* outerViewportScrollLayer) { layer_tree_host_->RegisterViewportLayers( - static_cast<const WebLayerImpl*>(pageScaleLayer)->layer(), - static_cast<const WebLayerImpl*>(innerViewportScrollLayer)->layer(), + static_cast<const cc_blink::WebLayerImpl*>(pageScaleLayer)->layer(), + static_cast<const cc_blink::WebLayerImpl*>(innerViewportScrollLayer) + ->layer(), // The outer viewport layer will only exist when using pinch virtual // viewports. - outerViewportScrollLayer - ? static_cast<const WebLayerImpl*>(outerViewportScrollLayer)->layer() - : NULL); + outerViewportScrollLayer ? static_cast<const cc_blink::WebLayerImpl*>( + outerViewportScrollLayer)->layer() + : NULL); } void WebLayerTreeViewImplForTesting::clearViewportLayers() { diff --git a/mojo/aura/DEPS b/mojo/aura/DEPS index ad60823..f7c275b 100644 --- a/mojo/aura/DEPS +++ b/mojo/aura/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+skia", "+ui/aura", "+ui/compositor", diff --git a/mojo/cc/DEPS b/mojo/cc/DEPS index 1d0b887..f789994 100644 --- a/mojo/cc/DEPS +++ b/mojo/cc/DEPS @@ -1,3 +1,4 @@ include_rules = [ "+cc", + "-cc/blink", ] diff --git a/mojo/examples/aura_demo/DEPS b/mojo/examples/aura_demo/DEPS index 5cbfbf1..eb8dd8f 100644 --- a/mojo/examples/aura_demo/DEPS +++ b/mojo/examples/aura_demo/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+skia/ext", "+ui/aura", "+ui/base/hit_test.h", diff --git a/mojo/examples/browser/DEPS b/mojo/examples/browser/DEPS index b65676e..02dd6ea 100644 --- a/mojo/examples/browser/DEPS +++ b/mojo/examples/browser/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+skia/ext", "+ui/aura", "+ui/base/hit_test.h", diff --git a/mojo/examples/compositor_app/DEPS b/mojo/examples/compositor_app/DEPS index 8ea9d7b..70688d6 100644 --- a/mojo/examples/compositor_app/DEPS +++ b/mojo/examples/compositor_app/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+ui/gfx", "+gpu/command_buffer/client", ] diff --git a/mojo/examples/keyboard/DEPS b/mojo/examples/keyboard/DEPS index b65676e..02dd6ea 100644 --- a/mojo/examples/keyboard/DEPS +++ b/mojo/examples/keyboard/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+skia/ext", "+ui/aura", "+ui/base/hit_test.h", diff --git a/mojo/examples/surfaces_app/DEPS b/mojo/examples/surfaces_app/DEPS index edcc6c6..0f87b30 100644 --- a/mojo/examples/surfaces_app/DEPS +++ b/mojo/examples/surfaces_app/DEPS @@ -1,6 +1,7 @@ include_rules = [ "+cc", - "+ui/gfx", + "-cc/blink", "+gpu/command_buffer/client", "+third_party/skia/include", + "+ui/gfx", ] diff --git a/mojo/services/surfaces/DEPS b/mojo/services/surfaces/DEPS index 200f2a5e..fc1c262 100644 --- a/mojo/services/surfaces/DEPS +++ b/mojo/services/surfaces/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+mojo/cc", "+mojo/services/gles2", "+mojo/services/public", diff --git a/mojo/services/view_manager/DEPS b/mojo/services/view_manager/DEPS index 5933b40..b2183cd 100644 --- a/mojo/services/view_manager/DEPS +++ b/mojo/services/view_manager/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+mojo/aura", "+mojo/cc", "+mojo/geometry", diff --git a/ui/aura/bench/DEPS b/ui/aura/bench/DEPS index 7fa58f9..315ad72c 100644 --- a/ui/aura/bench/DEPS +++ b/ui/aura/bench/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "-cc/surfaces", "+gpu/command_buffer/client/gles2_interface.h", "+third_party/khronos", diff --git a/ui/base/DEPS b/ui/base/DEPS index 38bd908..d0b1d7a 100644 --- a/ui/base/DEPS +++ b/ui/base/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+grit/app_locale_settings.h", "+grit/ui_strings.h", "+grit/ui_unscaled_resources.h", diff --git a/ui/compositor/DEPS b/ui/compositor/DEPS index 80761f9..e234d55 100644 --- a/ui/compositor/DEPS +++ b/ui/compositor/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "+gpu/command_buffer/client/gles2_interface.h", "+third_party/skia", "+ui/gfx", diff --git a/ui/snapshot/DEPS b/ui/snapshot/DEPS index f6768d1..f5fd947 100644 --- a/ui/snapshot/DEPS +++ b/ui/snapshot/DEPS @@ -1,5 +1,6 @@ include_rules = [ "+cc", + "-cc/blink", "-cc/surfaces", "+skia/ext", "+third_party/skia", |