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

Unified Diff: gpu/command_buffer/service/feature_info.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/command_buffer/service/context_group_unittest.cc ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/feature_info.h
diff --git a/gpu/command_buffer/service/feature_info.h b/gpu/command_buffer/service/feature_info.h
index e343dd9f59388654e2bc39a181ca558082f1aa7e..e7b853be989332f216e682c464bde671404bebe7 100644
--- a/gpu/command_buffer/service/feature_info.h
+++ b/gpu/command_buffer/service/feature_info.h
@@ -11,7 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/command_buffer/service/gles2_cmd_validation.h"
-#include "gpu/config/gpu_driver_bug_workaround_type.h"
+#include "gpu/config/gpu_driver_bug_workarounds.h"
#include "gpu/gpu_export.h"
namespace base {
@@ -90,27 +90,15 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> {
bool ext_read_format_bgra;
};
- struct Workarounds {
- Workarounds();
-
-#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;
- };
+ FeatureInfo();
// Constructor with workarounds taken from the current process's CommandLine
- FeatureInfo();
+ explicit FeatureInfo(
+ const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds);
// Constructor with workarounds taken from |command_line|
- FeatureInfo(const base::CommandLine& command_line);
+ FeatureInfo(const base::CommandLine& command_line,
+ const GpuDriverBugWorkarounds& gpu_driver_bug_workarounds);
// Initializes the feature information. Needs a current GL context.
bool Initialize(ContextType context_type,
@@ -135,9 +123,7 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> {
return feature_flags_;
}
- const Workarounds& workarounds() const {
- return workarounds_;
- }
+ const GpuDriverBugWorkarounds& workarounds() const { return workarounds_; }
const DisallowedFeatures& disallowed_features() const {
return disallowed_features_;
@@ -188,7 +174,7 @@ class GPU_EXPORT FeatureInfo : public base::RefCounted<FeatureInfo> {
FeatureFlags feature_flags_;
// Flags for Workarounds.
- Workarounds workarounds_;
+ const GpuDriverBugWorkarounds workarounds_;
// Whether the command line switch kEnableUnsafeES3APIs is passed in.
bool enable_unsafe_es3_apis_switch_;
« no previous file with comments | « gpu/command_buffer/service/context_group_unittest.cc ('k') | gpu/command_buffer/service/feature_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698