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); | |
piman
2017/05/17 15:14:06
nit: also add operator =(const RenderWidgetSurface
Saman Sami
2017/05/17 15:38:52
Done.
| |
21 ~RenderWidgetSurfaceProperties(); | |
22 | |
23 bool operator==(const RenderWidgetSurfaceProperties& other) const; | |
24 bool operator!=(const RenderWidgetSurfaceProperties& other) const; | |
25 | |
26 gfx::Size size; | |
27 float device_scale_factor = 0; | |
28 #ifdef OS_ANDROID | |
29 float top_controls_height = 0; | |
30 float top_controls_shown_ratio = 0; | |
31 float bottom_controls_height = 0; | |
32 float bottom_controls_shown_ratio = 0; | |
33 cc::Selection<gfx::SelectionBound> selection; | |
34 bool has_transparent_background = false; | |
35 #endif | |
36 }; | |
37 | |
38 } // namespace content | |
39 | |
40 #endif // CONTENT_COMMON_RENDER_WIDGET_SURFACE_PROPERTIES_H_ | |
OLD | NEW |