1 // Copyright 2019 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 COMPONENTS_VIZ_COMMON_DISPLAY_DE_JELLY_H_
6 #define COMPONENTS_VIZ_COMMON_DISPLAY_DE_JELLY_H_
7 
8 #include "components/viz/common/viz_common_export.h"
9 
10 namespace viz {
11 
12 // Utility functions for use with de-jelly logic. Used in both viz process and
13 // render process.
14 
15 // Whether experimental de-jelly is enabled. This indicates whether
16 // DeJellyActive below may ever return true, and is used by the renderer
17 // process to determine whether it should prepare frames for potential
18 // de-jelly.
19 bool VIZ_COMMON_EXPORT DeJellyEnabled();
20 
21 // Whether experimental de-jelly is *currently* active. This is different from
22 // whether it is generally enabled, and may change frame-over-frame. This is
23 // queried from the Viz process, before drawing a frame.
24 bool VIZ_COMMON_EXPORT DeJellyActive();
25 
26 // The screen width to use for de-jelly logic.
27 float VIZ_COMMON_EXPORT DeJellyScreenWidth();
28 
29 // The maximum additional content which may be exposed in a layer by de-jelly
30 // skewing.
31 float VIZ_COMMON_EXPORT MaxDeJellyHeight();
32 
33 }  // namespace viz
34 
35 #endif  // COMPONENTS_VIZ_COMMON_DISPLAY_DE_JELLY_H_
36