1 // Copyright 2020 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 COMPONENTS_VIZ_TEST_TEST_TYPES_H_ 6 #define COMPONENTS_VIZ_TEST_TEST_TYPES_H_ 7 8 #include <ostream> 9 #include <vector> 10 11 namespace viz { 12 13 enum class RendererType { 14 kGL, 15 kSkiaGL, 16 kSkiaVk, 17 // SkiaRenderer with the Dawn backend will be used; on Linux this will 18 // initialize Vulkan, and on Windows this will initialize D3D12. 19 kSkiaDawn, 20 kSoftware, 21 }; 22 23 void PrintTo(RendererType type, std::ostream* os); 24 25 // Returns a list containing all RendererTypes applicable to the platform. 26 std::vector<RendererType> GetRendererTypes(); 27 std::vector<RendererType> GetRendererTypesNoDawn(); 28 29 // Returns a list containing all RendererTypes, except SoftwareRenderer, 30 // applicable to the platform. 31 std::vector<RendererType> GetGpuRendererTypes(); 32 std::vector<RendererType> GetGpuRendererTypesNoDawn(); 33 34 // Returns a list containing all Skia RendererTypes applicable to the platform. 35 std::vector<RendererType> GetRendererTypesSkiaOnly(); 36 37 } // namespace viz 38 39 #endif // COMPONENTS_VIZ_TEST_TEST_TYPES_H_ 40