Add remoting and PPAPI tests to GN build
[chromium-blink-merge.git] / content / browser / gpu / compositor_util.h
blobf0bc7e617d126b3d447881728b6a0002dddfd354
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"
11 namespace content {
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
21 // default).
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)
28 // for the renderer.
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
43 // GPU rasterization.
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 true if threaded GPU rasterization is on (via flags) for the
50 // renderer.
51 CONTENT_EXPORT bool IsThreadedGpuRasterizationEnabled();
53 // Returns the number of raster threads to use for compositing.
54 CONTENT_EXPORT int NumberOfRendererRasterThreads();
56 // Returns the number of raster threads to use for compositing that are forced
57 // by the command line.
58 CONTENT_EXPORT int ForceNumberOfRendererRasterThreads();
60 // Returns true if using cc Surfaces is allowed.
61 CONTENT_EXPORT bool UseSurfacesEnabled();
63 CONTENT_EXPORT base::DictionaryValue* GetFeatureStatus();
64 CONTENT_EXPORT base::Value* GetProblems();
65 CONTENT_EXPORT std::vector<std::string> GetDriverBugWorkarounds();
67 } // namespace content
69 #endif // CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_