diff options
author | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-28 03:19:12 +0000 |
---|---|---|
committer | derat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-28 03:19:12 +0000 |
commit | da7584c4ac68c5828fafdedf055ae86e90bf4a3a (patch) | |
tree | 7131e828da36341a8cb86c0d984e923f4117b976 /ui/aura | |
parent | 44f3e79b95fd6225ab760a0442d4fb23a9bc41b5 (diff) | |
download | chromium_src-da7584c4ac68c5828fafdedf055ae86e90bf4a3a.zip chromium_src-da7584c4ac68c5828fafdedf055ae86e90bf4a3a.tar.gz chromium_src-da7584c4ac68c5828fafdedf055ae86e90bf4a3a.tar.bz2 |
aura: Add Layer::LAYER_SOLID_COLOR to compositor.
This adds a new layer type backed by
WebKit::WebSolidColorLayer. I'm using it for the power
button animation's background (which previously had a
fullscreen texture that it just painted black).
I'm also renaming LAYER_HAS_TEXTURE to LAYER_TEXTURED and
LAYER_HAS_NO_TEXTURE to LAYER_NOT_DRAWN.
BUG=109083
TEST=manual: checked that the power button animation looks the same as before
TBR=sky
Review URL: http://codereview.chromium.org/9289036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura')
-rw-r--r-- | ui/aura/demo/demo_main.cc | 6 | ||||
-rw-r--r-- | ui/aura/event_filter_unittest.cc | 2 | ||||
-rw-r--r-- | ui/aura/root_window.cc | 2 | ||||
-rw-r--r-- | ui/aura/test/test_windows.cc | 4 | ||||
-rw-r--r-- | ui/aura/window_unittest.cc | 22 |
5 files changed, 18 insertions, 18 deletions
diff --git a/ui/aura/demo/demo_main.cc b/ui/aura/demo/demo_main.cc index 4b0f0eb..2882032 100644 --- a/ui/aura/demo/demo_main.cc +++ b/ui/aura/demo/demo_main.cc @@ -94,7 +94,7 @@ int main(int argc, char** argv) { DemoWindowDelegate window_delegate1(SK_ColorBLUE); aura::Window window1(&window_delegate1); window1.set_id(1); - window1.Init(ui::Layer::LAYER_HAS_TEXTURE); + window1.Init(ui::Layer::LAYER_TEXTURED); window1.SetBounds(gfx::Rect(100, 100, 400, 400)); window1.Show(); window1.SetParent(NULL); @@ -102,7 +102,7 @@ int main(int argc, char** argv) { DemoWindowDelegate window_delegate2(SK_ColorRED); aura::Window window2(&window_delegate2); window2.set_id(2); - window2.Init(ui::Layer::LAYER_HAS_TEXTURE); + window2.Init(ui::Layer::LAYER_TEXTURED); window2.SetBounds(gfx::Rect(200, 200, 350, 350)); window2.Show(); window2.SetParent(NULL); @@ -110,7 +110,7 @@ int main(int argc, char** argv) { DemoWindowDelegate window_delegate3(SK_ColorGREEN); aura::Window window3(&window_delegate3); window3.set_id(3); - window3.Init(ui::Layer::LAYER_HAS_TEXTURE); + window3.Init(ui::Layer::LAYER_TEXTURED); window3.SetBounds(gfx::Rect(10, 10, 50, 50)); window3.Show(); window3.SetParent(&window2); diff --git a/ui/aura/event_filter_unittest.cc b/ui/aura/event_filter_unittest.cc index e0ea127..bd58faa 100644 --- a/ui/aura/event_filter_unittest.cc +++ b/ui/aura/event_filter_unittest.cc @@ -71,7 +71,7 @@ class TestEventFilterWindowDelegate : public TestWindowDelegate { Window* CreateWindow(int id, Window* parent, WindowDelegate* delegate) { Window* window = new Window(delegate ? delegate : new TestWindowDelegate); window->set_id(id); - window->Init(ui::Layer::LAYER_HAS_TEXTURE); + window->Init(ui::Layer::LAYER_TEXTURED); window->SetParent(parent); window->SetBounds(gfx::Rect(0, 0, 100, 100)); window->Show(); diff --git a/ui/aura/root_window.cc b/ui/aura/root_window.cc index 7720699..a7f36a5 100644 --- a/ui/aura/root_window.cc +++ b/ui/aura/root_window.cc @@ -699,7 +699,7 @@ bool RootWindow::IsFocusedWindow(const Window* window) const { } void RootWindow::Init() { - Window::Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + Window::Init(ui::Layer::LAYER_NOT_DRAWN); SetBounds(gfx::Rect(host_->GetSize())); Show(); compositor()->SetRootLayer(layer()); diff --git a/ui/aura/test/test_windows.cc b/ui/aura/test/test_windows.cc index 10aa994..1c8a540 100644 --- a/ui/aura/test/test_windows.cc +++ b/ui/aura/test/test_windows.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 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. @@ -47,7 +47,7 @@ Window* CreateTestWindowWithDelegateAndType(WindowDelegate* delegate, Window* window = new Window(delegate); window->set_id(id); window->SetType(type); - window->Init(ui::Layer::LAYER_HAS_TEXTURE); + window->Init(ui::Layer::LAYER_TEXTURED); window->SetBounds(bounds); window->Show(); window->SetParent(parent); diff --git a/ui/aura/window_unittest.cc b/ui/aura/window_unittest.cc index 2230c26..5bb0bbd 100644 --- a/ui/aura/window_unittest.cc +++ b/ui/aura/window_unittest.cc @@ -227,11 +227,11 @@ TEST_F(WindowTest, GetChildById) { // and not containing NULL or parents. TEST_F(WindowTest, Contains) { Window parent(NULL); - parent.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + parent.Init(ui::Layer::LAYER_NOT_DRAWN); Window child1(NULL); - child1.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + child1.Init(ui::Layer::LAYER_NOT_DRAWN); Window child2(NULL); - child2.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + child2.Init(ui::Layer::LAYER_NOT_DRAWN); child1.SetParent(&parent); child2.SetParent(&child1); @@ -259,7 +259,7 @@ TEST_F(WindowTest, ConvertPointToWindow) { TEST_F(WindowTest, HitTest) { Window w1(new ColorTestWindowDelegate(SK_ColorWHITE)); w1.set_id(1); - w1.Init(ui::Layer::LAYER_HAS_TEXTURE); + w1.Init(ui::Layer::LAYER_TEXTURED); w1.SetBounds(gfx::Rect(10, 10, 50, 50)); w1.Show(); w1.SetParent(NULL); @@ -387,11 +387,11 @@ TEST_F(WindowTest, OrphanedBeforeOnDestroyed) { // Make sure StackChildAtTop moves both the window and layer to the front. TEST_F(WindowTest, StackChildAtTop) { Window parent(NULL); - parent.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + parent.Init(ui::Layer::LAYER_NOT_DRAWN); Window child1(NULL); - child1.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + child1.Init(ui::Layer::LAYER_NOT_DRAWN); Window child2(NULL); - child2.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + child2.Init(ui::Layer::LAYER_NOT_DRAWN); child1.SetParent(&parent); child2.SetParent(&parent); @@ -414,13 +414,13 @@ TEST_F(WindowTest, StackChildAtTop) { // Various assertions for StackChildAbove. TEST_F(WindowTest, StackChildAbove) { Window parent(NULL); - parent.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + parent.Init(ui::Layer::LAYER_NOT_DRAWN); Window child1(NULL); - child1.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + child1.Init(ui::Layer::LAYER_NOT_DRAWN); Window child2(NULL); - child2.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + child2.Init(ui::Layer::LAYER_NOT_DRAWN); Window child3(NULL); - child3.Init(ui::Layer::LAYER_HAS_NO_TEXTURE); + child3.Init(ui::Layer::LAYER_NOT_DRAWN); child1.SetParent(&parent); child2.SetParent(&parent); |