blob: e6a3f6dcbe6f606f7bd48534999cc809849baee2 [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
[email protected]d7b5cc72013-05-23 20:05:005#include "gpu/config/gpu_blacklist.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
zmo2602bcf2017-04-01 00:12:0312GpuBlacklist::GpuBlacklist(const GpuControlListData& data)
13 : GpuControlList(data) {}
[email protected]2efc31182010-12-11 21:07:1814
Chris Watkins81030772017-12-07 01:20:5615GpuBlacklist::~GpuBlacklist() = default;
[email protected]916b977f2011-09-04 02:50:3816
[email protected]d1f43ab2012-03-07 20:42:3417// static
zmo2602bcf2017-04-01 00:12:0318std::unique_ptr<GpuBlacklist> GpuBlacklist::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
25std::unique_ptr<GpuBlacklist> GpuBlacklist::Create(
26 const GpuControlListData& data) {
27 std::unique_ptr<GpuBlacklist> list(new GpuBlacklist(data));
[email protected]9c2985a2013-04-02 18:11:5728 list->AddSupportedFeature("accelerated_2d_canvas",
29 GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS);
[email protected]c9afe692014-04-17 17:38:4830 list->AddSupportedFeature("gpu_compositing",
31 GPU_FEATURE_TYPE_GPU_COMPOSITING);
sugoi9e3f18532017-03-13 17:05:1932 list->AddSupportedFeature("accelerated_webgl",
33 GPU_FEATURE_TYPE_ACCELERATED_WEBGL);
zmo2602bcf2017-04-01 00:12:0334 list->AddSupportedFeature("flash3d", GPU_FEATURE_TYPE_FLASH3D);
35 list->AddSupportedFeature("flash_stage3d", GPU_FEATURE_TYPE_FLASH_STAGE3D);
[email protected]9c2985a2013-04-02 18:11:5736 list->AddSupportedFeature("flash_stage3d_baseline",
37 GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE);
[email protected]9c2985a2013-04-02 18:11:5738 list->AddSupportedFeature("accelerated_video_decode",
39 GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE);
[email protected]723f7c52014-04-17 17:34:4140 list->AddSupportedFeature("gpu_rasterization",
41 GPU_FEATURE_TYPE_GPU_RASTERIZATION);
Alexis Hetub6e61022017-09-07 22:37:3642 list->AddSupportedFeature("accelerated_webgl2",
43 GPU_FEATURE_TYPE_ACCELERATED_WEBGL2);
Maggie Chen5df399542018-05-22 07:51:0444 list->AddSupportedFeature("protected_video_decode",
45 GPU_FEATURE_TYPE_PROTECTED_VIDEO_DECODE);
[email protected]3d346572013-03-22 19:59:5546 return list;
[email protected]d1f43ab2012-03-07 20:42:3447}
[email protected]21efac32012-10-29 02:41:1148
Zhenyao Mo2eb1fe52018-01-13 05:49:2549// static
50bool GpuBlacklist::AreEntryIndicesValid(
51 const std::vector<uint32_t>& entry_indices) {
52 return GpuControlList::AreEntryIndicesValid(entry_indices,
53 kSoftwareRenderingListEntryCount);
54}
55
[email protected]d7b5cc72013-05-23 20:05:0056} // namespace gpu