| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 public: | 24 public: |
| 25 CompositorFrameMetadata(); | 25 CompositorFrameMetadata(); |
| 26 CompositorFrameMetadata(CompositorFrameMetadata&& other); | 26 CompositorFrameMetadata(CompositorFrameMetadata&& other); |
| 27 ~CompositorFrameMetadata(); | 27 ~CompositorFrameMetadata(); |
| 28 | 28 |
| 29 CompositorFrameMetadata& operator=(CompositorFrameMetadata&& other); | 29 CompositorFrameMetadata& operator=(CompositorFrameMetadata&& other); |
| 30 | 30 |
| 31 CompositorFrameMetadata Clone() const; | 31 CompositorFrameMetadata Clone() const; |
| 32 | 32 |
| 33 // The device scale factor used to generate this compositor frame. | 33 // The device scale factor used to generate this compositor frame. |
| 34 float device_scale_factor; | 34 float device_scale_factor = 0.f; |
| 35 | 35 |
| 36 // Scroll offset and scale of the root layer. This can be used for tasks | 36 // Scroll offset and scale of the root layer. This can be used for tasks |
| 37 // like positioning windowed plugins. | 37 // like positioning windowed plugins. |
| 38 gfx::Vector2dF root_scroll_offset; | 38 gfx::Vector2dF root_scroll_offset; |
| 39 float page_scale_factor; | 39 float page_scale_factor = 0.f; |
| 40 | 40 |
| 41 // These limits can be used together with the scroll/scale fields above to | 41 // These limits can be used together with the scroll/scale fields above to |
| 42 // determine if scrolling/scaling in a particular direction is possible. | 42 // determine if scrolling/scaling in a particular direction is possible. |
| 43 gfx::SizeF scrollable_viewport_size; | 43 gfx::SizeF scrollable_viewport_size; |
| 44 gfx::SizeF root_layer_size; | 44 gfx::SizeF root_layer_size; |
| 45 float min_page_scale_factor; | 45 float min_page_scale_factor = 0.f; |
| 46 float max_page_scale_factor; | 46 float max_page_scale_factor = 0.f; |
| 47 bool root_overflow_x_hidden; | 47 bool root_overflow_x_hidden = false; |
| 48 bool root_overflow_y_hidden; | 48 bool root_overflow_y_hidden = false; |
| 49 |
| 50 // WebView makes quality decisions for rastering resourceless software frames |
| 51 // based on information that a scroll or animation is active. |
| 52 // TODO(aelias): Remove this and always enable filtering if there aren't apps |
| 53 // depending on this anymore. |
| 54 bool is_resourceless_software_draw_with_scroll_or_animation = false; |
| 49 | 55 |
| 50 // Used to position the Android location top bar and page content, whose | 56 // Used to position the Android location top bar and page content, whose |
| 51 // precise position is computed by the renderer compositor. | 57 // precise position is computed by the renderer compositor. |
| 52 gfx::Vector2dF location_bar_offset; | 58 gfx::Vector2dF location_bar_offset; |
| 53 gfx::Vector2dF location_bar_content_translation; | 59 gfx::Vector2dF location_bar_content_translation; |
| 54 | 60 |
| 55 // This color is usually obtained from the background color of the <body> | 61 // This color is usually obtained from the background color of the <body> |
| 56 // element. It can be used for filling in gutter areas around the frame when | 62 // element. It can be used for filling in gutter areas around the frame when |
| 57 // it's too small to fill the box the parent reserved for it. | 63 // it's too small to fill the box the parent reserved for it. |
| 58 SkColor root_background_color; | 64 SkColor root_background_color = SK_ColorWHITE; |
| 59 | 65 |
| 60 // Provides selection region updates relative to the current viewport. If the | 66 // Provides selection region updates relative to the current viewport. If the |
| 61 // selection is empty or otherwise unused, the bound types will indicate such. | 67 // selection is empty or otherwise unused, the bound types will indicate such. |
| 62 Selection<gfx::SelectionBound> selection; | 68 Selection<gfx::SelectionBound> selection; |
| 63 | 69 |
| 64 std::vector<ui::LatencyInfo> latency_info; | 70 std::vector<ui::LatencyInfo> latency_info; |
| 65 | 71 |
| 66 // A set of SurfaceSequences that this frame satisfies (always in the same | 72 // A set of SurfaceSequences that this frame satisfies (always in the same |
| 67 // namespace as the current Surface). | 73 // namespace as the current Surface). |
| 68 std::vector<uint32_t> satisfies_sequences; | 74 std::vector<uint32_t> satisfies_sequences; |
| 69 | 75 |
| 70 // This is the set of Surfaces that are referenced by this frame. | 76 // This is the set of Surfaces that are referenced by this frame. |
| 71 std::vector<SurfaceId> referenced_surfaces; | 77 std::vector<SurfaceId> referenced_surfaces; |
| 72 | 78 |
| 73 private: | 79 private: |
| 74 CompositorFrameMetadata(const CompositorFrameMetadata& other); | 80 CompositorFrameMetadata(const CompositorFrameMetadata& other); |
| 75 CompositorFrameMetadata operator=(const CompositorFrameMetadata&) = delete; | 81 CompositorFrameMetadata operator=(const CompositorFrameMetadata&) = delete; |
| 76 }; | 82 }; |
| 77 | 83 |
| 78 } // namespace cc | 84 } // namespace cc |
| 79 | 85 |
| 80 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ | 86 #endif // CC_OUTPUT_COMPOSITOR_FRAME_METADATA_H_ |
| OLD | NEW |