test_types.h 1.1 KB

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