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

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: . Created 4 years, 5 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
Index: services/ui/common/gpu_service.h
diff --git a/services/ui/common/gpu_service.h b/services/ui/common/gpu_service.h
index 7308754eac55f45c1c5ac0d7b234f8e75e16e9cd..9f991ae433025dae70bbfb3f9ba474e4033f66ad 100644
--- a/services/ui/common/gpu_service.h
+++ b/services/ui/common/gpu_service.h
@@ -25,11 +25,9 @@ class Connector;
namespace ui {
-class MUS_COMMON_EXPORT GpuService : public gpu::GpuChannelHostFactory {
+class MUS_COMMON_EXPORT GpuService : public gpu::GpuChannelHostFactory,
+ public gpu::GpuChannelEstablishFactory {
public:
- 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 void Terminate();
static GpuService* GetInstance();
+ // gpu::GpuChannelEstablishFactory:
+ void EstablishGpuChannel(
+ const gpu::GpuChannelEstablishedCallback& callback) override;
+ scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
+
private:
friend struct base::DefaultSingletonTraits<GpuService>;
@@ -73,7 +76,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);

Powered by Google App Engine
This is Rietveld 408576698