Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(218)

Unified Diff: gpu/config/gpu_driver_bug_workarounds.h

Issue 1871613002: Compute GpuDriverBugWorkarounds only one time in the GPU process (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/config/BUILD.gn ('k') | gpu/config/gpu_driver_bug_workarounds.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/config/gpu_driver_bug_workarounds.h
diff --git a/gpu/config/gpu_driver_bug_workarounds.h b/gpu/config/gpu_driver_bug_workarounds.h
new file mode 100644
index 0000000000000000000000000000000000000000..6c90d1b33958ead36c4560cbc8c4a79f8430613f
--- /dev/null
+++ b/gpu/config/gpu_driver_bug_workarounds.h
@@ -0,0 +1,46 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_
+#define GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_
+
+#include "base/macros.h"
+#include "build/build_config.h"
+#include "gpu/config/gpu_driver_bug_workaround_type.h"
+#include "gpu/gpu_export.h"
+
+// Forwardly declare a few GL types to avoid including GL header files.
+typedef int GLint;
+
+namespace base {
+class CommandLine;
+}
+
+namespace gpu {
+
+class GPU_EXPORT GpuDriverBugWorkarounds {
+ public:
+ GpuDriverBugWorkarounds();
+ explicit GpuDriverBugWorkarounds(const base::CommandLine* command_line);
+
+ GpuDriverBugWorkarounds(const GpuDriverBugWorkarounds& other);
+
+ ~GpuDriverBugWorkarounds();
+
+#define GPU_OP(type, name) bool name;
+ GPU_DRIVER_BUG_WORKAROUNDS(GPU_OP)
+#undef GPU_OP
+
+ // Note: 0 here means use driver limit.
+ GLint max_texture_size;
+ GLint max_cube_map_texture_size;
+ GLint max_fragment_uniform_vectors;
+ GLint max_varying_vectors;
+ GLint max_vertex_uniform_vectors;
+ GLint max_copy_texture_chromium_size;
+};
+
+} // namespace gpu
+
+#endif // GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_
« no previous file with comments | « gpu/config/BUILD.gn ('k') | gpu/config/gpu_driver_bug_workarounds.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698