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

Unified Diff: services/ui/common/gpu_service.h

Issue 2197613003: gpu: Introduce GpuChannelEstablishFactory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot merge Created 4 years, 4 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/ipc/client/gpu_channel_host.h ('k') | services/ui/common/gpu_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/common/gpu_service.h
diff --git a/services/ui/common/gpu_service.h b/services/ui/common/gpu_service.h
index d00a60c4ce1b1e77a96807bfdc94a359f53dc8aa..d15ba71165d779e8de01be7f247beca2d136f005 100644
--- a/services/ui/common/gpu_service.h
+++ b/services/ui/common/gpu_service.h
@@ -25,13 +25,11 @@ class Connector;
namespace ui {
-class MUS_COMMON_EXPORT GpuService : public gpu::GpuChannelHostFactory {
+class MUS_COMMON_EXPORT GpuService : public gpu::GpuChannelHostFactory,
+ public gpu::GpuChannelEstablishFactory {
public:
~GpuService() override;
- void EstablishGpuChannel(const base::Closure& callback);
- scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync();
- scoped_refptr<gpu::GpuChannelHost> GetGpuChannel();
gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const {
return gpu_memory_buffer_manager_.get();
}
@@ -41,6 +39,11 @@ class MUS_COMMON_EXPORT GpuService : public gpu::GpuChannelHostFactory {
static std::unique_ptr<GpuService> Initialize(shell::Connector* connector);
static GpuService* GetInstance();
+ // gpu::GpuChannelEstablishFactory:
+ void EstablishGpuChannel(
+ const gpu::GpuChannelEstablishedCallback& callback) override;
+ scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
+
private:
friend struct base::DefaultSingletonTraits<GpuService>;
@@ -72,7 +75,7 @@ class MUS_COMMON_EXPORT GpuService : public gpu::GpuChannelHostFactory {
bool is_establishing_;
ui::mojom::GpuServicePtr gpu_service_;
scoped_refptr<gpu::GpuChannelHost> gpu_channel_;
- std::vector<base::Closure> establish_callbacks_;
+ std::vector<gpu::GpuChannelEstablishedCallback> establish_callbacks_;
base::ConditionVariable establishing_condition_;
DISALLOW_COPY_AND_ASSIGN(GpuService);
« no previous file with comments | « gpu/ipc/client/gpu_channel_host.h ('k') | services/ui/common/gpu_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698