blob: 694aa68bf62e6ca2c01236b6d7e913bede62b5b4 [file] [log] [blame]
[email protected]3d346572013-03-22 19:59:551// Copyright (c) 2013 The Chromium Authors. All rights reserved.
[email protected]2efc31182010-12-11 21:07:182// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Chris Blume29bf5362019-09-06 02:34:455#include "gpu/config/gpu_blocklist.h"
[email protected]2efc31182010-12-11 21:07:186
[email protected]d7b5cc72013-05-23 20:05:007#include "gpu/config/gpu_feature_type.h"
zmo2602bcf2017-04-01 00:12:038#include "gpu/config/software_rendering_list_autogen.h"
[email protected]2efc31182010-12-11 21:07:189
[email protected]d7b5cc72013-05-23 20:05:0010namespace gpu {
[email protected]2efc31182010-12-11 21:07:1811
Chris Blume29bf5362019-09-06 02:34:4512GpuBlocklist::GpuBlocklist(const GpuControlListData& data)
zmo2602bcf2017-04-01 00:12:0313 : GpuControlList(data) {}
[email protected]2efc31182010-12-11 21:07:1814
Chris Blume29bf5362019-09-06 02:34:4515GpuBlocklist::~GpuBlocklist() = default;
[email protected]916b977f2011-09-04 02:50:3816
[email protected]d1f43ab2012-03-07 20:42:3417// static
Chris Blume29bf5362019-09-06 02:34:4518std::unique_ptr<GpuBlocklist> GpuBlocklist::Create() {
Kai Ninomiya96bd9ef92017-10-20 21:30:3719 GpuControlListData data(kSoftwareRenderingListEntryCount,
zmo2602bcf2017-04-01 00:12:0320 kSoftwareRenderingListEntries);
21 return Create(data);
22}
23
24// static
Chris Blume29bf5362019-09-06 02:34:4525std::unique_ptr<GpuBlocklist> GpuBlocklist::Create(
zmo2602bcf2017-04-01 00:12:0326 const GpuControlListData& data) {
Chris Blume29bf5362019-09-06 02:34:4527 std::unique_ptr<GpuBlocklist> list(new GpuBlocklist(data));
[email protected]9c2985a2013-04-02 18:11:5728 list->AddSupportedFeature("accelerated_2d_canvas",
29 GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS);
sugoi9e3f18532017-03-13 17:05:1930 list->AddSupportedFeature("accelerated_webgl",
31 GPU_FEATURE_TYPE_ACCELERATED_WEBGL);
zmo2602bcf2017-04-01 00:12:0332 list->AddSupportedFeature("flash3d", GPU_FEATURE_TYPE_FLASH3D);
33 list->AddSupportedFeature("flash_stage3d", GPU_FEATURE_TYPE_FLASH_STAGE3D);
[email protected]9c2985a2013-04-02 18:11:5734 list->AddSupportedFeature("flash_stage3d_baseline",
35 GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE);
[email protected]9c2985a2013-04-02 18:11:5736 list->AddSupportedFeature("accelerated_video_decode",
37 GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE);
[email protected]723f7c52014-04-17 17:34:4138 list->AddSupportedFeature("gpu_rasterization",
39 GPU_FEATURE_TYPE_GPU_RASTERIZATION);
Alexis Hetub6e61022017-09-07 22:37:3640 list->AddSupportedFeature("accelerated_webgl2",
41 GPU_FEATURE_TYPE_ACCELERATED_WEBGL2);
Maggie Chen5df399542018-05-22 07:51:0442 list->AddSupportedFeature("protected_video_decode",
43 GPU_FEATURE_TYPE_PROTECTED_VIDEO_DECODE);
Adrienne Walkerc87477e2018-06-06 22:28:2144 list->AddSupportedFeature("oop_rasterization",
45 GPU_FEATURE_TYPE_OOP_RASTERIZATION);
Khushalbb1963a2018-10-02 21:02:3546 list->AddSupportedFeature("android_surface_control",
47 GPU_FEATURE_TYPE_ANDROID_SURFACE_CONTROL);
Sean Gilhuly1e54ddb2019-11-28 18:52:2848 list->AddSupportedFeature("accelerated_gl", GPU_FEATURE_TYPE_ACCELERATED_GL);
Christopher Cameron3a3601892019-05-16 21:43:5249 list->AddSupportedFeature("metal", GPU_FEATURE_TYPE_METAL);
Peng Huang9b7d2ee2019-10-02 20:18:2250 list->AddSupportedFeature("vulkan", GPU_FEATURE_TYPE_VULKAN);
[email protected]3d346572013-03-22 19:59:5551 return list;
[email protected]d1f43ab2012-03-07 20:42:3452}
[email protected]21efac32012-10-29 02:41:1153
Zhenyao Mo2eb1fe52018-01-13 05:49:2554// static
Chris Blume29bf5362019-09-06 02:34:4555bool GpuBlocklist::AreEntryIndicesValid(
Zhenyao Mo2eb1fe52018-01-13 05:49:2556 const std::vector<uint32_t>& entry_indices) {
57 return GpuControlList::AreEntryIndicesValid(entry_indices,
58 kSoftwareRenderingListEntryCount);
59}
60
[email protected]d7b5cc72013-05-23 20:05:0061} // namespace gpu