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

Side by Side Diff: content/browser/gpu/gpu_data_manager_impl.h

Issue 2715563002: Moving SwiftShader from component to bundled library (Closed)
Patch Set: Fixed nits and some unit tests Created 3 years, 9 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ 5 #ifndef CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ 6 #define CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <memory> 11 #include <memory>
12 #include <string> 12 #include <string>
13 13
14 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
grt (UTC plus 2) 2017/02/28 19:51:29 unused
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/singleton.h" 18 #include "base/memory/singleton.h"
19 #include "base/process/kill.h" 19 #include "base/process/kill.h"
20 #include "base/synchronization/lock.h" 20 #include "base/synchronization/lock.h"
21 #include "base/time/time.h" 21 #include "base/time/time.h"
22 #include "base/values.h" 22 #include "base/values.h"
23 #include "content/public/browser/gpu_data_manager.h" 23 #include "content/public/browser/gpu_data_manager.h"
24 #include "content/public/common/three_d_api_types.h" 24 #include "content/public/common/three_d_api_types.h"
25 #include "gpu/config/gpu_feature_info.h" 25 #include "gpu/config/gpu_feature_info.h"
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 bool IsFeatureEnabled(int feature) const override; 72 bool IsFeatureEnabled(int feature) const override;
73 gpu::GPUInfo GetGPUInfo() const override; 73 gpu::GPUInfo GetGPUInfo() const override;
74 void GetGpuProcessHandles( 74 void GetGpuProcessHandles(
75 const GetGpuProcessHandlesCallback& callback) const override; 75 const GetGpuProcessHandlesCallback& callback) const override;
76 bool GpuAccessAllowed(std::string* reason) const override; 76 bool GpuAccessAllowed(std::string* reason) const override;
77 void RequestCompleteGpuInfoIfNeeded() override; 77 void RequestCompleteGpuInfoIfNeeded() override;
78 bool IsEssentialGpuInfoAvailable() const override; 78 bool IsEssentialGpuInfoAvailable() const override;
79 bool IsCompleteGpuInfoAvailable() const override; 79 bool IsCompleteGpuInfoAvailable() const override;
80 void RequestVideoMemoryUsageStatsUpdate() const override; 80 void RequestVideoMemoryUsageStatsUpdate() const override;
81 bool ShouldUseSwiftShader() const override; 81 bool ShouldUseSwiftShader() const override;
82 void RegisterSwiftShaderPath(const base::FilePath& path) override;
83 // TODO(kbr): the threading model for the GpuDataManagerObservers is 82 // TODO(kbr): the threading model for the GpuDataManagerObservers is
84 // not well defined, and it's impossible for callers to correctly 83 // not well defined, and it's impossible for callers to correctly
85 // delete observers from anywhere except in one of the observer's 84 // delete observers from anywhere except in one of the observer's
86 // notification methods. Observer addition and removal, and their 85 // notification methods. Observer addition and removal, and their
87 // callbacks, should probably be required to occur on the UI thread. 86 // callbacks, should probably be required to occur on the UI thread.
88 void AddObserver(GpuDataManagerObserver* observer) override; 87 void AddObserver(GpuDataManagerObserver* observer) override;
89 void RemoveObserver(GpuDataManagerObserver* observer) override; 88 void RemoveObserver(GpuDataManagerObserver* observer) override;
90 void UnblockDomainFrom3DAPIs(const GURL& url) override; 89 void UnblockDomainFrom3DAPIs(const GURL& url) override;
91 void SetGLStrings(const std::string& gl_vendor, 90 void SetGLStrings(const std::string& gl_vendor,
92 const std::string& gl_renderer, 91 const std::string& gl_renderer,
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 224
226 mutable base::Lock lock_; 225 mutable base::Lock lock_;
227 std::unique_ptr<GpuDataManagerImplPrivate> private_; 226 std::unique_ptr<GpuDataManagerImplPrivate> private_;
228 227
229 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl); 228 DISALLOW_COPY_AND_ASSIGN(GpuDataManagerImpl);
230 }; 229 };
231 230
232 } // namespace content 231 } // namespace content
233 232
234 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_ 233 #endif // CONTENT_BROWSER_GPU_GPU_DATA_MANAGER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698