Chromium Code Reviews| Index: cc/layers/heads_up_display_layer.cc |
| =================================================================== |
| --- cc/layers/heads_up_display_layer.cc (revision 221161) |
| +++ cc/layers/heads_up_display_layer.cc (working copy) |
| @@ -9,6 +9,7 @@ |
| #include "base/debug/trace_event.h" |
| #include "cc/layers/heads_up_display_layer_impl.h" |
| #include "cc/trees/layer_tree_host.h" |
| +#include "ui/gfx/size_conversions.h" |
| namespace cc { |
| @@ -26,6 +27,16 @@ |
| device_viewport.width() / device_scale_factor, |
| device_viewport.height() / device_scale_factor); |
| + if (parent()) { |
|
danakj
2013/09/19 17:07:45
I don't know how you'd get a HUD layer without a p
dgozman
2013/09/19 18:42:18
I saw some code like this around hud layer. I'm pr
|
| + // The root layer may have the transform set. As we still want to be shown |
| + // at the corner of visible viewport, apply inverted transform to it. |
| + gfx::Transform invert; |
| + gfx::RectF rect(device_viewport_in_layout_pixels); |
| + if (parent()->transform().TransformRectReverse(&rect)) { |
| + device_viewport_in_layout_pixels = gfx::ToFlooredSize(rect.size()); |
|
danakj
2013/09/19 17:07:45
You're projecting from the root surface to the roo
dgozman
2013/09/19 18:42:18
Yep, root layer has a scale transform. I'm not sur
aelias_OOO_until_Jul13
2013/09/19 21:35:28
The Blink-supplied root layer is the one and only
dgozman
2013/09/27 19:02:03
Filed a separate bug for this. I will look into mo
|
| + } |
| + } |
| + |
| gfx::Size bounds; |
| gfx::Transform matrix; |
| matrix.MakeIdentity(); |