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()) { |
| + // The root layer may have the transform set. As we still want to be shown |
|
aelias_OOO_until_Jul13
2013/09/13 23:51:44
This should be addressed on the Blink side instead
dgozman
2013/09/19 10:17:11
AFAIK, blink doesn't know about the HUD layer. Ide
|
| + // 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()); |
| + } |
| + } |
| + |
| gfx::Size bounds; |
| gfx::Transform matrix; |
| matrix.MakeIdentity(); |