| Index: content/browser/gpu/gpu_blacklist.h
|
| ===================================================================
|
| --- content/browser/gpu/gpu_blacklist.h (revision 130298)
|
| +++ content/browser/gpu/gpu_blacklist.h (working copy)
|
| @@ -1,4 +1,4 @@
|
| -// Copyright (c) 2011 The Chromium Authors. All rights reserved.
|
| +// Copyright (c) 2012 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.
|
|
|
| @@ -110,6 +110,17 @@
|
| kMalformed
|
| };
|
|
|
| + enum NumericOp {
|
| + kBetween, // <= * <=
|
| + kEQ, // =
|
| + kLT, // <
|
| + kLE, // <=
|
| + kGT, // >
|
| + kGE, // >=
|
| + kAny,
|
| + kUnknown // Indicates the data is invalid.
|
| + };
|
| +
|
| class VersionInfo {
|
| public:
|
| VersionInfo(const std::string& version_op,
|
| @@ -124,21 +135,7 @@
|
| bool IsValid() const;
|
|
|
| private:
|
| - enum Op {
|
| - kBetween, // <= * <=
|
| - kEQ, // =
|
| - kLT, // <
|
| - kLE, // <=
|
| - kGT, // >
|
| - kGE, // >=
|
| - kAny,
|
| - kUnknown // Indicates VersionInfo data is invalid.
|
| - };
|
| -
|
| - // Maps string to Op; returns kUnknown if it's not a valid Op.
|
| - static Op StringToOp(const std::string& version_op);
|
| -
|
| - Op op_;
|
| + NumericOp op_;
|
| scoped_ptr<Version> version_;
|
| scoped_ptr<Version> version2_;
|
| };
|
| @@ -193,6 +190,24 @@
|
| std::string value_;
|
| };
|
|
|
| + class FloatInfo {
|
| + public:
|
| + FloatInfo(const std::string& float_op,
|
| + const std::string& float_value,
|
| + const std::string& float_value2);
|
| +
|
| + // Determines if a given float is included in the FloatInfo.
|
| + bool Contains(float value) const;
|
| +
|
| + // Determines if the FloatInfo contains valid information.
|
| + bool IsValid() const;
|
| +
|
| + private:
|
| + NumericOp op_;
|
| + float value_;
|
| + float value2_;
|
| + };
|
| +
|
| class GpuBlacklistEntry;
|
| typedef scoped_refptr<GpuBlacklistEntry> ScopedGpuBlacklistEntry;
|
|
|
| @@ -272,6 +287,18 @@
|
| bool SetGLRendererInfo(const std::string& renderer_op,
|
| const std::string& renderer_value);
|
|
|
| + bool SetPerfGraphicsInfo(const std::string& op,
|
| + const std::string& float_string,
|
| + const std::string& float_string2);
|
| +
|
| + bool SetPerfGamingInfo(const std::string& op,
|
| + const std::string& float_string,
|
| + const std::string& float_string2);
|
| +
|
| + bool SetPerfOverallInfo(const std::string& op,
|
| + const std::string& float_string,
|
| + const std::string& float_string2);
|
| +
|
| bool SetBlacklistedFeatures(
|
| const std::vector<std::string>& blacklisted_features);
|
|
|
| @@ -290,6 +317,9 @@
|
| scoped_ptr<VersionInfo> driver_date_info_;
|
| scoped_ptr<StringInfo> gl_vendor_info_;
|
| scoped_ptr<StringInfo> gl_renderer_info_;
|
| + scoped_ptr<FloatInfo> perf_graphics_info_;
|
| + scoped_ptr<FloatInfo> perf_gaming_info_;
|
| + scoped_ptr<FloatInfo> perf_overall_info_;
|
| scoped_ptr<GpuFeatureFlags> feature_flags_;
|
| std::vector<ScopedGpuBlacklistEntry> exceptions_;
|
| bool contains_unknown_fields_;
|
| @@ -315,6 +345,8 @@
|
|
|
| void SetBrowserVersion(const std::string& version_string);
|
|
|
| + static NumericOp StringToNumericOp(const std::string& op);
|
| +
|
| scoped_ptr<Version> version_;
|
| std::vector<ScopedGpuBlacklistEntry> blacklist_;
|
|
|
|
|