blob: 5d5a083dc31601b3736cdecb2c247d06b5fff569 [file] [log] [blame]
Avi Drissman4e1b7bc32022-09-15 14:03:501// Copyright 2013 The Chromium Authors
[email protected]b7c4f032012-08-07 16:38:562// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
[email protected]15154932013-08-21 03:27:245#ifndef CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_
6#define CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_
[email protected]b7c4f032012-08-07 16:38:567
jdoerrie664305c2017-06-07 08:34:348#include <memory>
Jonathan Backer76dfd502018-05-03 18:34:319#include <string>
Victor Miuracabdfac2018-01-05 02:18:1810#include <vector>
jdoerrie664305c2017-06-07 08:34:3411
[email protected]f454eed2013-10-16 05:48:0212#include "base/values.h"
[email protected]b7c4f032012-08-07 16:38:5613
14namespace content {
15
[email protected]50cf1992014-03-29 00:06:0016// Note: When adding a function here, please make sure the logic is not
17// duplicated in the renderer.
18
danakj0977ec82015-01-13 01:54:3419// Returns true if zero-copy uploads is on (via flags, or platform default).
20// Only one of one-copy and zero-copy can be enabled at a time.
Lei Zhanged9be3a2021-11-17 22:01:1821bool IsZeroCopyUploadEnabled();
danakj0977ec82015-01-13 01:54:3422
ericrk1d17f752015-10-20 03:03:0723// Returns true if a partial raster is on (via flags).
Lei Zhanged9be3a2021-11-17 22:01:1824bool IsPartialRasterEnabled();
jbroman5f7f71932015-08-18 16:24:4625
ccameronc7fcd132015-11-03 20:14:3126// Returns true if all compositor resources should use GPU memory buffers.
Lei Zhanged9be3a2021-11-17 22:01:1827bool IsGpuMemoryBufferCompositorResourcesEnabled();
ccameronc7fcd132015-11-03 20:14:3128
senorblancob60ba952015-01-27 19:12:3629// Returns the number of multisample antialiasing samples (via flags) for
30// GPU rasterization.
Lei Zhanged9be3a2021-11-17 22:01:1831int GpuRasterizationMSAASampleCount();
senorblancob60ba952015-01-27 19:12:3632
danakj8a91b032014-08-30 00:04:2233// Returns the number of raster threads to use for compositing.
Lei Zhanged9be3a2021-11-17 22:01:1834int NumberOfRendererRasterThreads();
danakj8a91b032014-08-30 00:04:2235
sunnyps3fe3c982016-05-18 00:22:4636// Returns true if main thread can be pipelined with activation.
Lei Zhanged9be3a2021-11-17 22:01:1837bool IsMainFrameBeforeActivationEnabled();
sunnyps3fe3c982016-05-18 00:22:4638
Lei Zhanged9be3a2021-11-17 22:01:1839base::Value GetFeatureStatus();
40base::Value GetProblems();
41std::vector<std::string> GetDriverBugWorkarounds();
[email protected]f454eed2013-10-16 05:48:0242
Lei Zhanged9be3a2021-11-17 22:01:1843base::Value GetFeatureStatusForHardwareGpu();
44base::Value GetProblemsForHardwareGpu();
45std::vector<std::string> GetDriverBugWorkaroundsForHardwareGpu();
Zhenyao Mo68ef56d2018-04-21 01:05:1046
[email protected]b7c4f032012-08-07 16:38:5647} // namespace content
48
[email protected]15154932013-08-21 03:27:2449#endif // CONTENT_BROWSER_GPU_COMPOSITOR_UTIL_H_