Make USB permissions work in the new permission message system
[chromium-blink-merge.git] / content / browser / gpu / compositor_util.h
blob8bffb5b22b20828f7ed93fd9bc74d578fbeb0b69
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 property tree verification is enabled (via flags or platform
17 // default).
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 a persistent GpuMemoryBuffer can be used and is on (via
32 // flags, or platform default).
33 CONTENT_EXPORT bool IsPersistentGpuMemoryBufferEnabled();
35 // Returns true if gpu rasterization is on (via flags) for the renderer.
36 CONTENT_EXPORT bool IsGpuRasterizationEnabled();
38 // Returns the number of multisample antialiasing samples (via flags) for
39 // GPU rasterization.
40 CONTENT_EXPORT int GpuRasterizationMSAASampleCount();
42 // Returns true if force-gpu-rasterization is on (via flags) for the renderer.
43 CONTENT_EXPORT bool IsForceGpuRasterizationEnabled();
45 // Returns the number of raster threads to use for compositing.
46 CONTENT_EXPORT int NumberOfRendererRasterThreads();
48 // Returns true if using cc Surfaces is allowed.
49 CONTENT_EXPORT bool UseSurfacesEnabled();
51 CONTENT_EXPORT base::DictionaryValue* GetFeatureStatus();
52 CONTENT_EXPORT base::Value* GetProblems();
53 CONTENT_EXPORT std::vector<std::string> GetDriverBugWorkarounds();
55 } // namespace content
57 #endif // CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_