1 // Copyright 2013 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.
5 #ifndef CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_
6 #define CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_
8 #include "base/values.h"
9 #include "content/common/content_export.h"
13 // Note: When adding a function here, please make sure the logic is not
14 // duplicated in the renderer.
16 // Returns true if the virtual viewport model of pinch-to-zoom is on (via
17 // flags, or platform default).
18 CONTENT_EXPORT
bool IsPinchVirtualViewportEnabled();
20 // Returns true if property tree verification is enabled (via flags or platform
22 CONTENT_EXPORT
bool IsPropertyTreeVerificationEnabled();
24 // Returns true if delegated-renderer is on (via flags, or platform default).
25 CONTENT_EXPORT
bool IsDelegatedRendererEnabled();
27 // Returns true if impl-side painting is on (via flags, or platform default)
29 CONTENT_EXPORT
bool IsImplSidePaintingEnabled();
31 // Returns true if one-copy uploads is on (via flags, or platform default).
32 // Only one of one-copy and zero-copy can be enabled at a time.
33 CONTENT_EXPORT
bool IsOneCopyUploadEnabled();
35 // Returns true if zero-copy uploads is on (via flags, or platform default).
36 // Only one of one-copy and zero-copy can be enabled at a time.
37 CONTENT_EXPORT
bool IsZeroCopyUploadEnabled();
39 // Returns true if gpu rasterization is on (via flags) for the renderer.
40 CONTENT_EXPORT
bool IsGpuRasterizationEnabled();
42 // Returns the number of multisample antialiasing samples (via flags) for
44 CONTENT_EXPORT
int GpuRasterizationMSAASampleCount();
46 // Returns true if force-gpu-rasterization is on (via flags) for the renderer.
47 CONTENT_EXPORT
bool IsForceGpuRasterizationEnabled();
49 // Returns the number of raster threads to use for compositing.
50 CONTENT_EXPORT
int NumberOfRendererRasterThreads();
52 // Returns the number of raster threads to use for compositing that are forced
53 // by the command line.
54 CONTENT_EXPORT
int ForceNumberOfRendererRasterThreads();
56 // Returns true if using cc Surfaces is allowed.
57 CONTENT_EXPORT
bool UseSurfacesEnabled();
59 CONTENT_EXPORT
base::DictionaryValue
* GetFeatureStatus();
60 CONTENT_EXPORT
base::Value
* GetProblems();
61 CONTENT_EXPORT
std::vector
<std::string
> GetDriverBugWorkarounds();
63 } // namespace content
65 #endif // CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_