diff options
-rw-r--r-- | build/common.gypi | 16 | ||||
-rw-r--r-- | chrome/chrome_dll.gypi | 2 | ||||
-rw-r--r-- | content/content_tests.gypi | 2 | ||||
-rw-r--r-- | ui/gfx/compositor/compositor.gyp | 2 | ||||
-rw-r--r-- | ui/gfx/compositor/compositor_setup.h | 2 | ||||
-rw-r--r-- | ui/views/view.cc | 2 | ||||
-rw-r--r-- | ui/views/view_unittest.cc | 42 | ||||
-rw-r--r-- | ui/views/widget/native_widget_win.cc | 18 |
8 files changed, 8 insertions, 78 deletions
diff --git a/build/common.gypi b/build/common.gypi index 2000f9f..043591e 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -27,9 +27,6 @@ # Whether we are using Views Toolkit 'toolkit_views%': 0, - # Whether the compositor is enabled on views. - 'views_compositor%': 0, - # Whether or not we are using the Aura windowing framework. 'use_aura%': 0, @@ -48,7 +45,6 @@ }, # Copy conditionally-set variables out one scope. 'chromeos%': '<(chromeos)', - 'views_compositor%': '<(views_compositor)', 'use_aura%': '<(use_aura)', 'use_ash%': '<(use_ash)', 'use_openssl%': '<(use_openssl)', @@ -78,11 +74,6 @@ }, { 'toolkit_views%': 0, }], - - # Use the views compositor when using the Aura window manager. - ['use_aura==1', { - 'views_compositor%': 1, - }], ], }, @@ -90,7 +81,6 @@ 'chromeos%': '<(chromeos)', 'host_arch%': '<(host_arch)', 'toolkit_views%': '<(toolkit_views)', - 'views_compositor%': '<(views_compositor)', 'use_aura%': '<(use_aura)', 'use_ash%': '<(use_ash)', 'use_openssl%': '<(use_openssl)', @@ -376,7 +366,7 @@ # Use GPU accelerated cross process image transport by default # on linux builds with the Aura window manager - ['views_compositor==1 and OS=="linux"', { + ['use_aura==1 and OS=="linux"', { 'ui_compositor_image_transport%': 1, }, { 'ui_compositor_image_transport%': 0, @@ -402,7 +392,6 @@ 'host_arch%': '<(host_arch)', 'library%': 'static_library', 'toolkit_views%': '<(toolkit_views)', - 'views_compositor%': '<(views_compositor)', 'ui_compositor_image_transport%': '<(ui_compositor_image_transport)', 'use_webkit_compositor%': '<(use_webkit_compositor)', 'use_aura%': '<(use_aura)', @@ -1044,9 +1033,6 @@ ['toolkit_views==1', { 'defines': ['TOOLKIT_VIEWS=1'], }], - ['views_compositor==1', { - 'defines': ['VIEWS_COMPOSITOR=1'], - }], ['ui_compositor_image_transport==1', { 'defines': ['UI_COMPOSITOR_IMAGE_TRANSPORT'], }], diff --git a/chrome/chrome_dll.gypi b/chrome/chrome_dll.gypi index 75f8b21..7964ed5 100644 --- a/chrome/chrome_dll.gypi +++ b/chrome/chrome_dll.gypi @@ -48,7 +48,7 @@ 'app/policy/cloud_policy_codegen.gyp:policy', ], 'conditions': [ - ['views_compositor==1', { + ['use_aura==1', { 'dependencies': [ '../ui/gfx/compositor/compositor.gyp:compositor', ], diff --git a/content/content_tests.gypi b/content/content_tests.gypi index 9f3d2e7..f75d1a4 100644 --- a/content/content_tests.gypi +++ b/content/content_tests.gypi @@ -141,7 +141,7 @@ '../build/linux/system.gyp:glib', ], }], - ['views_compositor==1', { + ['use_aura==1', { 'dependencies': [ '../ui/gfx/compositor/compositor.gyp:compositor', ], diff --git a/ui/gfx/compositor/compositor.gyp b/ui/gfx/compositor/compositor.gyp index 82ede85..759d53b 100644 --- a/ui/gfx/compositor/compositor.gyp +++ b/ui/gfx/compositor/compositor.gyp @@ -56,7 +56,7 @@ 'test_web_graphics_context_3d.h', ], 'conditions': [ - ['OS == "win" and views_compositor == 1', { + ['OS == "win" and use_aura == 1', { # TODO(sky): before we make this real need to remove # IDR_BITMAP_BRUSH_IMAGE. 'dependencies': [ diff --git a/ui/gfx/compositor/compositor_setup.h b/ui/gfx/compositor/compositor_setup.h index 717fbf9..9978e7f 100644 --- a/ui/gfx/compositor/compositor_setup.h +++ b/ui/gfx/compositor/compositor_setup.h @@ -12,7 +12,7 @@ namespace ui { // Configures the compositor in such a way that it doesn't render anything. // Does nothing on platforms that aren't using the compositor. -#if !defined(VIEWS_COMPOSITOR) +#if !defined(USE_AURA) // To centralize the ifdef to this file we define the function as doing nothing // on all platforms that don't use a compositor. static inline void SetupTestCompositor() {} diff --git a/ui/views/view.cc b/ui/views/view.cc index ce35899..b900c2d 100644 --- a/ui/views/view.cc +++ b/ui/views/view.cc @@ -45,7 +45,7 @@ namespace { // Whether to use accelerated compositing when necessary (e.g. when a view has a // transformation). -#if defined(VIEWS_COMPOSITOR) +#if defined(USE_AURA) bool use_acceleration_when_possible = true; #else bool use_acceleration_when_possible = false; diff --git a/ui/views/view_unittest.cc b/ui/views/view_unittest.cc index ea383bc..9e55992 100644 --- a/ui/views/view_unittest.cc +++ b/ui/views/view_unittest.cc @@ -2536,7 +2536,7 @@ TEST_F(ViewTest, AddExistingChild) { // Layers //////////////////////////////////////////////////////////////////////////////// -#if defined(VIEWS_COMPOSITOR) +#if defined(USE_AURA) namespace { @@ -2575,14 +2575,10 @@ class ViewLayerTest : public ViewsTestBase { // Returns the Layer used by the RootView. ui::Layer* GetRootLayer() { -#if defined(USE_AURA) ui::Layer* root_layer = NULL; gfx::Point origin; widget()->CalculateOffsetToAncestorWithLayer(&origin, &root_layer); return root_layer; -#else - return widget()->GetRootView()->layer(); -#endif } virtual void SetUp() OVERRIDE { @@ -2612,45 +2608,13 @@ class ViewLayerTest : public ViewsTestBase { bool old_use_acceleration_; }; -#if !defined(USE_AURA) -// This test assumes a particular layer hierarchy that isn't valid for aura. -// Ensures the RootView has a layer and its set up correctly. -TEST_F(ViewLayerTest, RootState) { - ui::Layer* layer = widget()->GetRootView()->layer(); - ASSERT_TRUE(layer); - EXPECT_FALSE(layer->parent()); - EXPECT_EQ(0u, layer->children().size()); - EXPECT_FALSE(layer->transform().HasChange()); - EXPECT_EQ(widget()->GetRootView()->bounds(), layer->bounds()); - EXPECT_TRUE(layer->GetCompositor() != NULL); -} - -// Verifies that the complete bounds of a texture are updated if the texture -// needs to be refreshed and paint with a clip is invoked. -// This test invokes OnNativeWidgetPaintAccelerated, which is not used by aura. -TEST_F(ViewLayerTest, PaintAll) { - View* view = widget()->GetRootView(); - ui::Layer* layer = GetRootLayer(); - view->SetBounds(0, 0, 200, 200); - widget()->OnNativeWidgetPaintAccelerated(gfx::Rect(0, 0, 1, 1)); - ASSERT_TRUE(layer != NULL); - const ui::TestTexture* texture = - static_cast<const ui::TestTexture*>(layer->texture()); - ASSERT_TRUE(texture != NULL); - EXPECT_EQ(view->GetLocalBounds(), texture->bounds_of_last_paint()); -} -#endif TEST_F(ViewLayerTest, LayerToggling) { // Because we lazily create textures the calls to DrawTree are necessary to // ensure we trigger creation of textures. -#if defined(USE_AURA) ui::Layer* root_layer = NULL; gfx::Point origin; widget()->CalculateOffsetToAncestorWithLayer(&origin, &root_layer); -#else - ui::Layer* root_layer = widget()->GetRootView()->layer(); -#endif View* content_view = new View; widget()->SetContentsView(content_view); @@ -2982,7 +2946,6 @@ TEST_F(ViewLayerTest, FLAKY_ViewLayerTreesInSync) { EXPECT_TRUE(ViewAndLayerTreeAreConsistent(content, content->layer())); } -#if defined(USE_AURA) // Verifies when views are reordered the layer is also reordered. The widget is // providing the parent layer. TEST_F(ViewLayerTest, ReorderUnderWidget) { @@ -3006,8 +2969,7 @@ TEST_F(ViewLayerTest, ReorderUnderWidget) { EXPECT_EQ(c1->layer(), parent_layer->children()[1]); EXPECT_EQ(c2->layer(), parent_layer->children()[0]); } -#endif -#endif // VIEWS_COMPOSITOR +#endif // USE_AURA } // namespace views diff --git a/ui/views/widget/native_widget_win.cc b/ui/views/widget/native_widget_win.cc index 43581ff..8ce9e92 100644 --- a/ui/views/widget/native_widget_win.cc +++ b/ui/views/widget/native_widget_win.cc @@ -1297,24 +1297,6 @@ LRESULT NativeWidgetWin::OnCreate(CREATESTRUCT* create_struct) { // creation time. ClientAreaSizeChanged(); -#if defined(VIEWS_COMPOSITOR) - if (View::get_use_acceleration_when_possible()) { - if (ui::Compositor::compositor_factory()) { - compositor_ = (*Widget::compositor_factory())(this); - } else { - CRect window_rect; - GetClientRect(&window_rect); - compositor_ = ui::Compositor::Create(this, - hwnd(), - gfx::Size(window_rect.Width(), window_rect.Height())); - } - if (compositor_.get()) { - delegate_->AsWidget()->GetRootView()->SetPaintToLayer(true); - compositor_->SetRootLayer(delegate_->AsWidget()->GetRootView()->layer()); - } - } -#endif - delegate_->OnNativeWidgetCreated(); // Get access to a modifiable copy of the system menu. |