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

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: 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
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..7d10ec3a0083d5cac466b1e14ed738ed1d862e0c
--- /dev/null
+++ b/gpu/config/gpu_driver_bug_workarounds.h
@@ -0,0 +1,49 @@
+// 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/command_buffer/service/common_decoder.h"
+#include "gpu/config/gpu_driver_bug_workaround_type.h"
+#include "gpu/gpu_export.h"
+
+namespace base {
+class CommandLine;
+}
+
+namespace gpu {
+
+struct GPU_EXPORT GpuDriverBugWorkarounds {
+ public:
+ static void Initialize(GpuDriverBugWorkarounds& workarounds);
piman 2016/04/12 04:38:44 If you make this (and below) like: static GpuDrive
+ static void Initialize(const base::CommandLine* command_line,
+ GpuDriverBugWorkarounds& workarounds);
+ GpuDriverBugWorkarounds();
+
+ 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;
+};
+
+GPU_EXPORT void StringToWorkarounds(const std::string& types,
+ GpuDriverBugWorkarounds* workarounds);
+
+} // namespace gpu
+
+#endif // GPU_CONFIG_GPU_DRIVER_BUG_WORKAROUNDS_H_

Powered by Google App Engine
This is Rietveld 408576698