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

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: add animation_host.* 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
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index b73c82832ece9195b8038d5bf5e53cb76a69a5c8..5009c31f62ad42450b8a1d2749b86a832451f54c 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -408,6 +408,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,
@@ -670,22 +686,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;

Powered by Google App Engine
This is Rietveld 408576698