OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 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. |
| 4 |
| 5 #ifndef CONTENT_COMMON_RENDER_WIDGET_SURFACE_PROPERTIES_H_ |
| 6 #define CONTENT_COMMON_RENDER_WIDGET_SURFACE_PROPERTIES_H_ |
| 7 |
| 8 #include "cc/output/compositor_frame.h" |
| 9 #include "content/common/content_export.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 // This struct contains the properties that are constant among all |
| 14 // CompositorFrames that the renderer submits to the same surface. |
| 15 struct CONTENT_EXPORT RenderWidgetSurfaceProperties { |
| 16 static RenderWidgetSurfaceProperties FromCompositorFrame( |
| 17 const cc::CompositorFrame& frame); |
| 18 |
| 19 RenderWidgetSurfaceProperties(); |
| 20 RenderWidgetSurfaceProperties(const RenderWidgetSurfaceProperties& other); |
| 21 ~RenderWidgetSurfaceProperties(); |
| 22 |
| 23 RenderWidgetSurfaceProperties& operator=( |
| 24 const RenderWidgetSurfaceProperties& other); |
| 25 |
| 26 bool operator==(const RenderWidgetSurfaceProperties& other) const; |
| 27 bool operator!=(const RenderWidgetSurfaceProperties& other) const; |
| 28 |
| 29 gfx::Size size; |
| 30 float device_scale_factor = 0; |
| 31 #ifdef OS_ANDROID |
| 32 float top_controls_height = 0; |
| 33 float top_controls_shown_ratio = 0; |
| 34 float bottom_controls_height = 0; |
| 35 float bottom_controls_shown_ratio = 0; |
| 36 cc::Selection<gfx::SelectionBound> selection; |
| 37 bool has_transparent_background = false; |
| 38 #endif |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_COMMON_RENDER_WIDGET_SURFACE_PROPERTIES_H_ |
OLD | NEW |