1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_
6 #define CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_
8 #include "cc/base/cc_export.h"
9 #include "ui/gfx/size_f.h"
10 #include "ui/gfx/vector2d_f.h"
14 class CC_EXPORT CompositorFrameMetadata
{
16 CompositorFrameMetadata();
17 ~CompositorFrameMetadata();
19 // The device scale factor used to generate this compositor frame.
20 float device_scale_factor
;
22 // Scroll offset and scale of the root layer. This can be used for tasks
23 // like positioning windowed plugins.
24 gfx::Vector2dF root_scroll_offset
;
25 float page_scale_factor
;
27 // These limits can be used together with the scroll/scale fields above to
28 // determine if scrolling/scaling in a particular direction is possible.
29 gfx::SizeF viewport_size
;
30 gfx::SizeF root_layer_size
;
31 float min_page_scale_factor
;
32 float max_page_scale_factor
;
34 // Used to position the Android location top bar and page content, whose
35 // precise position is computed by the renderer compositor.
36 gfx::Vector2dF location_bar_offset
;
37 gfx::Vector2dF location_bar_content_translation
;
38 float overdraw_bottom_height
;
43 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_