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_
10 #include "cc/base/cc_export.h"
11 #include "cc/output/viewport_selection_bound.h"
12 #include "third_party/skia/include/core/SkColor.h"
13 #include "ui/events/latency_info.h"
14 #include "ui/gfx/geometry/size_f.h"
15 #include "ui/gfx/geometry/vector2d_f.h"
19 class CC_EXPORT CompositorFrameMetadata
{
21 CompositorFrameMetadata();
22 ~CompositorFrameMetadata();
24 // The device scale factor used to generate this compositor frame.
25 float device_scale_factor
;
27 // Scroll offset and scale of the root layer. This can be used for tasks
28 // like positioning windowed plugins.
29 gfx::Vector2dF root_scroll_offset
;
30 float page_scale_factor
;
32 // These limits can be used together with the scroll/scale fields above to
33 // determine if scrolling/scaling in a particular direction is possible.
34 gfx::SizeF scrollable_viewport_size
;
35 gfx::SizeF root_layer_size
;
36 float min_page_scale_factor
;
37 float max_page_scale_factor
;
38 bool root_overflow_x_hidden
;
39 bool root_overflow_y_hidden
;
41 // Used to position the Android location top bar and page content, whose
42 // precise position is computed by the renderer compositor.
43 gfx::Vector2dF location_bar_offset
;
44 gfx::Vector2dF location_bar_content_translation
;
46 // This color is usually obtained from the background color of the <body>
47 // element. It can be used for filling in gutter areas around the frame when
48 // it's too small to fill the box the parent reserved for it.
49 SkColor root_background_color
;
51 // Provides selection region updates relative to the current viewport. If the
52 // selection is empty or otherwise unused, the bound types will indicate such.
53 ViewportSelection selection
;
55 std::vector
<ui::LatencyInfo
> latency_info
;
57 // A set of SurfaceSequences that this frame satisfies (always in the same
58 // namespace as the current Surface).
59 std::vector
<uint32_t> satisfies_sequences
;
64 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_