[email protected] | 3d34657 | 2013-03-22 19:59:55 | [diff] [blame] | 1 | // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
[email protected] | 2efc3118 | 2010-12-11 21:07:18 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | d7b5cc7 | 2013-05-23 20:05:00 | [diff] [blame] | 5 | #include "gpu/config/gpu_blacklist.h" |
[email protected] | 2efc3118 | 2010-12-11 21:07:18 | [diff] [blame] | 6 | |
[email protected] | d7b5cc7 | 2013-05-23 20:05:00 | [diff] [blame] | 7 | #include "gpu/config/gpu_feature_type.h" |
zmo | 2602bcf | 2017-04-01 00:12:03 | [diff] [blame] | 8 | #include "gpu/config/software_rendering_list_autogen.h" |
[email protected] | 2efc3118 | 2010-12-11 21:07:18 | [diff] [blame] | 9 | |
[email protected] | d7b5cc7 | 2013-05-23 20:05:00 | [diff] [blame] | 10 | namespace gpu { |
[email protected] | 2efc3118 | 2010-12-11 21:07:18 | [diff] [blame] | 11 | |
zmo | 2602bcf | 2017-04-01 00:12:03 | [diff] [blame] | 12 | GpuBlacklist::GpuBlacklist(const GpuControlListData& data) |
| 13 | : GpuControlList(data) {} |
[email protected] | 2efc3118 | 2010-12-11 21:07:18 | [diff] [blame] | 14 | |
Chris Watkins | 8103077 | 2017-12-07 01:20:56 | [diff] [blame] | 15 | GpuBlacklist::~GpuBlacklist() = default; |
[email protected] | 916b977f | 2011-09-04 02:50:38 | [diff] [blame] | 16 | |
[email protected] | d1f43ab | 2012-03-07 20:42:34 | [diff] [blame] | 17 | // static |
zmo | 2602bcf | 2017-04-01 00:12:03 | [diff] [blame] | 18 | std::unique_ptr<GpuBlacklist> GpuBlacklist::Create() { |
Kai Ninomiya | 96bd9ef9 | 2017-10-20 21:30:37 | [diff] [blame] | 19 | GpuControlListData data(kSoftwareRenderingListEntryCount, |
zmo | 2602bcf | 2017-04-01 00:12:03 | [diff] [blame] | 20 | kSoftwareRenderingListEntries); |
| 21 | return Create(data); |
| 22 | } |
| 23 | |
| 24 | // static |
| 25 | std::unique_ptr<GpuBlacklist> GpuBlacklist::Create( |
| 26 | const GpuControlListData& data) { |
| 27 | std::unique_ptr<GpuBlacklist> list(new GpuBlacklist(data)); |
[email protected] | 9c2985a | 2013-04-02 18:11:57 | [diff] [blame] | 28 | list->AddSupportedFeature("accelerated_2d_canvas", |
| 29 | GPU_FEATURE_TYPE_ACCELERATED_2D_CANVAS); |
[email protected] | c9afe69 | 2014-04-17 17:38:48 | [diff] [blame] | 30 | list->AddSupportedFeature("gpu_compositing", |
| 31 | GPU_FEATURE_TYPE_GPU_COMPOSITING); |
sugoi | 9e3f1853 | 2017-03-13 17:05:19 | [diff] [blame] | 32 | list->AddSupportedFeature("accelerated_webgl", |
| 33 | GPU_FEATURE_TYPE_ACCELERATED_WEBGL); |
zmo | 2602bcf | 2017-04-01 00:12:03 | [diff] [blame] | 34 | list->AddSupportedFeature("flash3d", GPU_FEATURE_TYPE_FLASH3D); |
| 35 | list->AddSupportedFeature("flash_stage3d", GPU_FEATURE_TYPE_FLASH_STAGE3D); |
[email protected] | 9c2985a | 2013-04-02 18:11:57 | [diff] [blame] | 36 | list->AddSupportedFeature("flash_stage3d_baseline", |
| 37 | GPU_FEATURE_TYPE_FLASH_STAGE3D_BASELINE); |
[email protected] | 9c2985a | 2013-04-02 18:11:57 | [diff] [blame] | 38 | list->AddSupportedFeature("accelerated_video_decode", |
| 39 | GPU_FEATURE_TYPE_ACCELERATED_VIDEO_DECODE); |
[email protected] | 723f7c5 | 2014-04-17 17:34:41 | [diff] [blame] | 40 | list->AddSupportedFeature("gpu_rasterization", |
| 41 | GPU_FEATURE_TYPE_GPU_RASTERIZATION); |
Alexis Hetu | b6e6102 | 2017-09-07 22:37:36 | [diff] [blame] | 42 | list->AddSupportedFeature("accelerated_webgl2", |
| 43 | GPU_FEATURE_TYPE_ACCELERATED_WEBGL2); |
Maggie Chen | 5df39954 | 2018-05-22 07:51:04 | [diff] [blame^] | 44 | list->AddSupportedFeature("protected_video_decode", |
| 45 | GPU_FEATURE_TYPE_PROTECTED_VIDEO_DECODE); |
[email protected] | 3d34657 | 2013-03-22 19:59:55 | [diff] [blame] | 46 | return list; |
[email protected] | d1f43ab | 2012-03-07 20:42:34 | [diff] [blame] | 47 | } |
[email protected] | 21efac3 | 2012-10-29 02:41:11 | [diff] [blame] | 48 | |
Zhenyao Mo | 2eb1fe5 | 2018-01-13 05:49:25 | [diff] [blame] | 49 | // static |
| 50 | bool GpuBlacklist::AreEntryIndicesValid( |
| 51 | const std::vector<uint32_t>& entry_indices) { |
| 52 | return GpuControlList::AreEntryIndicesValid(entry_indices, |
| 53 | kSoftwareRenderingListEntryCount); |
| 54 | } |
| 55 | |
[email protected] | d7b5cc7 | 2013-05-23 20:05:00 | [diff] [blame] | 56 | } // namespace gpu |