| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ | 5 #ifndef CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ |
| 6 #define CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ | 6 #define CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ |
| 7 | 7 |
| 8 #include "cc/ipc/compositor_frame_metadata.mojom.h" | 8 #include "cc/ipc/compositor_frame_metadata.mojom.h" |
| 9 #include "cc/output/compositor_frame_metadata.h" | 9 #include "cc/output/compositor_frame_metadata.h" |
| 10 | 10 |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 static bool may_contain_video(const cc::CompositorFrameMetadata& metadata) { | 60 static bool may_contain_video(const cc::CompositorFrameMetadata& metadata) { |
| 61 return metadata.may_contain_video; | 61 return metadata.may_contain_video; |
| 62 } | 62 } |
| 63 | 63 |
| 64 static bool is_resourceless_software_draw_with_scroll_or_animation( | 64 static bool is_resourceless_software_draw_with_scroll_or_animation( |
| 65 const cc::CompositorFrameMetadata& metadata) { | 65 const cc::CompositorFrameMetadata& metadata) { |
| 66 return metadata.is_resourceless_software_draw_with_scroll_or_animation; | 66 return metadata.is_resourceless_software_draw_with_scroll_or_animation; |
| 67 } | 67 } |
| 68 | 68 |
| 69 static gfx::Vector2dF location_bar_offset( | 69 static float top_controls_height( |
| 70 const cc::CompositorFrameMetadata& metadata) { | 70 const cc::CompositorFrameMetadata& metadata) { |
| 71 return metadata.location_bar_offset; | 71 return metadata.top_controls_height; |
| 72 } | 72 } |
| 73 | 73 |
| 74 static gfx::Vector2dF location_bar_content_translation( | 74 static float top_controls_shown_ratio( |
| 75 const cc::CompositorFrameMetadata& metadata) { | 75 const cc::CompositorFrameMetadata& metadata) { |
| 76 return metadata.location_bar_content_translation; | 76 return metadata.top_controls_shown_ratio; |
| 77 } |
| 78 |
| 79 static float bottom_controls_height( |
| 80 const cc::CompositorFrameMetadata& metadata) { |
| 81 return metadata.bottom_controls_height; |
| 82 } |
| 83 |
| 84 static float bottom_controls_shown_ratio( |
| 85 const cc::CompositorFrameMetadata& metadata) { |
| 86 return metadata.bottom_controls_shown_ratio; |
| 77 } | 87 } |
| 78 | 88 |
| 79 static uint32_t root_background_color( | 89 static uint32_t root_background_color( |
| 80 const cc::CompositorFrameMetadata& metadata) { | 90 const cc::CompositorFrameMetadata& metadata) { |
| 81 return metadata.root_background_color; | 91 return metadata.root_background_color; |
| 82 } | 92 } |
| 83 | 93 |
| 84 static const cc::Selection<gfx::SelectionBound>& selection( | 94 static const cc::Selection<gfx::SelectionBound>& selection( |
| 85 const cc::CompositorFrameMetadata& metadata) { | 95 const cc::CompositorFrameMetadata& metadata) { |
| 86 return metadata.selection; | 96 return metadata.selection; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 101 return metadata.referenced_surfaces; | 111 return metadata.referenced_surfaces; |
| 102 } | 112 } |
| 103 | 113 |
| 104 static bool Read(cc::mojom::CompositorFrameMetadataDataView data, | 114 static bool Read(cc::mojom::CompositorFrameMetadataDataView data, |
| 105 cc::CompositorFrameMetadata* out); | 115 cc::CompositorFrameMetadata* out); |
| 106 }; | 116 }; |
| 107 | 117 |
| 108 } // namespace mojo | 118 } // namespace mojo |
| 109 | 119 |
| 110 #endif // CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ | 120 #endif // CC_IPC_COMPOSITOR_FRAME_METADATA_STRUCT_TRAITS_H_ |
| OLD | NEW |