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

Unified Diff: content/public/browser/gpu_feature_checker.h

Issue 2666243002: Move GPUFeatureChecker to content layer (Closed)
Patch Set: rebase Created 3 years, 10 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 | « content/public/browser/BUILD.gn ('k') | content/public/browser/gpu_feature_checker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/gpu_feature_checker.h
diff --git a/content/public/browser/gpu_feature_checker.h b/content/public/browser/gpu_feature_checker.h
new file mode 100644
index 0000000000000000000000000000000000000000..b76d97879c5623cb9059235ba68dca7d9de385d9
--- /dev/null
+++ b/content/public/browser/gpu_feature_checker.h
@@ -0,0 +1,36 @@
+// Copyright 2017 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 CONTENT_PUBLIC_BROWSER_GPU_FEATURE_CHECKER_H_
+#define CONTENT_PUBLIC_BROWSER_GPU_FEATURE_CHECKER_H_
+
+#include "base/callback_forward.h"
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "gpu/config/gpu_feature_type.h"
+
+namespace content {
+
+class GpuFeatureChecker : public base::RefCountedThreadSafe<GpuFeatureChecker> {
+ public:
+ typedef base::Callback<void(bool feature_available)> FeatureAvailableCallback;
+
+ CONTENT_EXPORT static scoped_refptr<GpuFeatureChecker> Create(
+ gpu::GpuFeatureType feature,
+ FeatureAvailableCallback callback);
+
+ // Checks to see if |feature_| is available on the current GPU. |callback_|
+ // will be called to indicate the availability of the feature. Must be called
+ // from the the UI thread.
+ virtual void CheckGpuFeatureAvailability() = 0;
+
+ protected:
+ friend class base::RefCountedThreadSafe<GpuFeatureChecker>;
+
+ virtual ~GpuFeatureChecker();
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_GPU_FEATURE_CHECKER_H_
« no previous file with comments | « content/public/browser/BUILD.gn ('k') | content/public/browser/gpu_feature_checker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698