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. 4 5 #ifndef CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_ 6 #define CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_ 7 8 #include "base/values.h" 9 #include "content/common/content_export.h" 10 11 namespace content { 12 13 // Note: When adding a function here, please make sure the logic is not 14 // duplicated in the renderer. 15 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(); 19 20 // Returns true if delegated-renderer is on (via flags, or platform default). 21 CONTENT_EXPORT bool IsDelegatedRendererEnabled(); 22 23 // Returns true if impl-side painting is on (via flags, or platform default) 24 // for the renderer. 25 CONTENT_EXPORT bool IsImplSidePaintingEnabled(); 26 27 // Returns true if gpu rasterization is on (via flags) for the renderer. 28 CONTENT_EXPORT bool IsGpuRasterizationEnabled(); 29 30 // Returns true if force-gpu-rasterization is on (via flags) for the renderer. 31 CONTENT_EXPORT bool IsForceGpuRasterizationEnabled(); 32 33 // Returns the number of raster threads to use for compositing. 34 CONTENT_EXPORT int NumberOfRendererRasterThreads(); 35 36 // Returns the number of raster threads to use for compositing that are forced 37 // by the command line. 38 CONTENT_EXPORT int ForceNumberOfRendererRasterThreads(); 39 40 // Returns true if using cc Surfaces is allowed. 41 CONTENT_EXPORT bool UseSurfacesEnabled(); 42 43 CONTENT_EXPORT base::Value* GetFeatureStatus(); 44 CONTENT_EXPORT base::Value* GetProblems(); 45 CONTENT_EXPORT base::Value* GetDriverBugWorkarounds(); 46 47 } // namespace content 48 49 #endif // CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_ 50