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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_BROWSER_GPU_FEATURE_CHECKER_H_
6 #define CONTENT_PUBLIC_BROWSER_GPU_FEATURE_CHECKER_H_
7
8 #include "base/callback_forward.h"
9 #include "base/memory/ref_counted.h"
10 #include "content/common/content_export.h"
11 #include "gpu/config/gpu_feature_type.h"
12
13 namespace content {
14
15 class GpuFeatureChecker : public base::RefCountedThreadSafe<GpuFeatureChecker> {
16 public:
17 typedef base::Callback<void(bool feature_available)> FeatureAvailableCallback;
18
19 CONTENT_EXPORT static scoped_refptr<GpuFeatureChecker> Create(
20 gpu::GpuFeatureType feature,
21 FeatureAvailableCallback callback);
22
23 // Checks to see if |feature_| is available on the current GPU. |callback_|
24 // will be called to indicate the availability of the feature. Must be called
25 // from the the UI thread.
26 virtual void CheckGpuFeatureAvailability() = 0;
27
28 protected:
29 friend class base::RefCountedThreadSafe<GpuFeatureChecker>;
30
31 virtual ~GpuFeatureChecker();
32 };
33
34 } // namespace content
35
36 #endif // CONTENT_PUBLIC_BROWSER_GPU_FEATURE_CHECKER_H_
OLDNEW
« 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