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 property tree verification is enabled (via flags or platform
18 CONTENT_EXPORT
bool IsPropertyTreeVerificationEnabled();
20 // Returns true if delegated-renderer is on (via flags, or platform default).
21 CONTENT_EXPORT
bool IsDelegatedRendererEnabled();
23 // Returns true if one-copy uploads is on (via flags, or platform default).
24 // Only one of one-copy and zero-copy can be enabled at a time.
25 CONTENT_EXPORT
bool IsOneCopyUploadEnabled();
27 // Returns true if zero-copy uploads is on (via flags, or platform default).
28 // Only one of one-copy and zero-copy can be enabled at a time.
29 CONTENT_EXPORT
bool IsZeroCopyUploadEnabled();
31 // Returns true if gpu rasterization is on (via flags) for the renderer.
32 CONTENT_EXPORT
bool IsGpuRasterizationEnabled();
34 // Returns the number of multisample antialiasing samples (via flags) for
36 CONTENT_EXPORT
int GpuRasterizationMSAASampleCount();
38 // Returns true if force-gpu-rasterization is on (via flags) for the renderer.
39 CONTENT_EXPORT
bool IsForceGpuRasterizationEnabled();
41 // Returns the number of raster threads to use for compositing.
42 CONTENT_EXPORT
int NumberOfRendererRasterThreads();
44 // Returns true if using cc Surfaces is allowed.
45 CONTENT_EXPORT
bool UseSurfacesEnabled();
47 CONTENT_EXPORT
base::DictionaryValue
* GetFeatureStatus();
48 CONTENT_EXPORT
base::Value
* GetProblems();
49 CONTENT_EXPORT
std::vector
<std::string
> GetDriverBugWorkarounds();
51 } // namespace content
53 #endif // CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_