gpu_driver_bug_list.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. // Copyright (c) 2013 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 GPU_CONFIG_GPU_DRIVER_BUG_LIST_H_
  5. #define GPU_CONFIG_GPU_DRIVER_BUG_LIST_H_
  6. #include <memory>
  7. #include <set>
  8. #include "base/command_line.h"
  9. #include "gpu/config/gpu_control_list.h"
  10. #include "gpu/gpu_export.h"
  11. namespace gpu {
  12. class GPU_EXPORT GpuDriverBugList : public GpuControlList {
  13. public:
  14. GpuDriverBugList(const GpuDriverBugList&) = delete;
  15. GpuDriverBugList& operator=(const GpuDriverBugList&) = delete;
  16. ~GpuDriverBugList() override;
  17. static std::unique_ptr<GpuDriverBugList> Create();
  18. static std::unique_ptr<GpuDriverBugList> Create(
  19. const GpuControlListData& data);
  20. // Append |workarounds| with these passed in through the
  21. // |command_line|.
  22. static void AppendWorkaroundsFromCommandLine(
  23. std::set<int>* workarounds,
  24. const base::CommandLine& command_line);
  25. // Append |workarounds| with the full list of workarounds.
  26. // This is needed for correctly passing flags down from
  27. // the browser process to the GPU process.
  28. static void AppendAllWorkarounds(std::vector<const char*>* workarounds);
  29. static bool AreEntryIndicesValid(const std::vector<uint32_t>& entry_indices);
  30. private:
  31. explicit GpuDriverBugList(const GpuControlListData& data);
  32. };
  33. } // namespace gpu
  34. #endif // GPU_CONFIG_GPU_DRIVER_BUG_LIST_H_