OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ | 5 #ifndef CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ |
6 #define CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ | 6 #define CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "cc/base/cc_export.h" | |
11 #include "cc/output/viewport_selection_bound.h" | |
12 #include "ui/events/latency_info.h" | 10 #include "ui/events/latency_info.h" |
13 #include "ui/gfx/geometry/size_f.h" | 11 #include "ui/gfx/geometry/size_f.h" |
14 #include "ui/gfx/geometry/vector2d_f.h" | 12 #include "ui/gfx/geometry/vector2d_f.h" |
15 | 13 |
16 namespace cc { | 14 namespace cc { |
17 | 15 |
18 class CC_EXPORT CompositorFrameMetadata { | 16 class CompositorFrameMetadata { |
19 public: | 17 public: |
20 CompositorFrameMetadata(); | 18 CompositorFrameMetadata(); |
21 ~CompositorFrameMetadata(); | 19 ~CompositorFrameMetadata(); |
22 | 20 |
23 // The device scale factor used to generate this compositor frame. | 21 // The device scale factor used to generate this compositor frame. |
24 float device_scale_factor; | 22 float device_scale_factor; |
25 | 23 |
26 // Scroll offset and scale of the root layer. This can be used for tasks | 24 // Scroll offset and scale of the root layer. This can be used for tasks |
27 // like positioning windowed plugins. | 25 // like positioning windowed plugins. |
28 gfx::Vector2dF root_scroll_offset; | 26 gfx::Vector2dF root_scroll_offset; |
29 float page_scale_factor; | 27 float page_scale_factor; |
30 | 28 |
31 // These limits can be used together with the scroll/scale fields above to | 29 // These limits can be used together with the scroll/scale fields above to |
32 // determine if scrolling/scaling in a particular direction is possible. | 30 // determine if scrolling/scaling in a particular direction is possible. |
33 gfx::SizeF scrollable_viewport_size; | 31 gfx::SizeF scrollable_viewport_size; |
34 gfx::SizeF root_layer_size; | 32 gfx::SizeF root_layer_size; |
35 float min_page_scale_factor; | 33 float min_page_scale_factor; |
36 float max_page_scale_factor; | 34 float max_page_scale_factor; |
37 bool root_overflow_x_hidden; | 35 bool root_overflow_x_hidden; |
38 bool root_overflow_y_hidden; | 36 bool root_overflow_y_hidden; |
39 | 37 |
40 // Used to position the Android location top bar and page content, whose | 38 // Used to position the Android location top bar and page content, whose |
41 // precise position is computed by the renderer compositor. | 39 // precise position is computed by the renderer compositor. |
42 gfx::Vector2dF location_bar_offset; | 40 gfx::Vector2dF location_bar_offset; |
43 gfx::Vector2dF location_bar_content_translation; | 41 gfx::Vector2dF location_bar_content_translation; |
44 | 42 |
45 // Provides selection region updates relative to the current viewport. If the | |
46 // selection is empty or otherwise unused, the bound types will indicate such. | |
47 ViewportSelectionBound selection_start; | |
48 ViewportSelectionBound selection_end; | |
49 | |
50 std::vector<ui::LatencyInfo> latency_info; | 43 std::vector<ui::LatencyInfo> latency_info; |
51 | 44 |
52 // A set of SurfaceSequences that this frame satisfies (always in the same | 45 // A set of SurfaceSequences that this frame satisfies (always in the same |
53 // namespace as the current Surface). | 46 // namespace as the current Surface). |
54 std::vector<uint32_t> satisfies_sequences; | 47 std::vector<uint32_t> satisfies_sequences; |
55 }; | 48 }; |
56 | 49 |
57 } // namespace cc | 50 } // namespace cc |
58 | 51 |
59 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ | 52 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ |
OLD | NEW |