Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(702)

Unified Diff: ui/compositor/layer.cc

Issue 12342028: make menus, bubbles, etc. top level windows on aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/views/corewm/window_animations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index 21af90620918d02272745eab724e11d734fa44bd..f5e7f94c50d14f65012d3df333ccfea878f8c307 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -406,6 +406,22 @@ void Layer::ConvertPointToLayer(const Layer* source,
target->ConvertPointFromAncestor(root_layer, point);
}
+bool Layer::GetTargetTransformRelativeTo(const Layer* ancestor,
+ gfx::Transform* transform) const {
+ const Layer* p = this;
+ for (; p && p != ancestor; p = p->parent()) {
+ gfx::Transform translation;
+ translation.Translate(static_cast<float>(p->bounds().x()),
+ static_cast<float>(p->bounds().y()));
+ // Use target transform so that result will be correct once animation is
+ // finished.
+ if (!p->GetTargetTransform().IsIdentity())
+ transform->ConcatTransform(p->GetTargetTransform());
+ transform->ConcatTransform(translation);
+ }
+ return p == ancestor;
+}
+
// static
gfx::Transform Layer::ConvertTransformToCCTransform(
const gfx::Transform& transform,
@@ -680,22 +696,6 @@ bool Layer::ConvertPointFromAncestor(const Layer* ancestor,
return result;
}
-bool Layer::GetTargetTransformRelativeTo(const Layer* ancestor,
- gfx::Transform* transform) const {
- const Layer* p = this;
- for (; p && p != ancestor; p = p->parent()) {
- gfx::Transform translation;
- translation.Translate(static_cast<float>(p->bounds().x()),
- static_cast<float>(p->bounds().y()));
- // Use target transform so that result will be correct once animation is
- // finished.
- if (!p->GetTargetTransform().IsIdentity())
- transform->ConcatTransform(p->GetTargetTransform());
- transform->ConcatTransform(translation);
- }
- return p == ancestor;
-}
-
void Layer::SetBoundsImmediately(const gfx::Rect& bounds) {
if (bounds == bounds_)
return;
« no previous file with comments | « ui/compositor/layer.h ('k') | ui/views/corewm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698