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

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

Issue 2612623002: gpu: Use mus gpu interface in non-mus chrome. (Closed)
Patch Set: more cleanup Created 3 years, 11 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/gpu/gpu_service.h
diff --git a/services/ui/gpu/gpu_service.h b/services/ui/gpu/gpu_service.h
index ae45e553c02bea00d5d318c62163341784e7fd57..d2b566fad727b4c8b3d0963295cf46dc3436ae98 100644
--- a/services/ui/gpu/gpu_service.h
+++ b/services/ui/gpu/gpu_service.h
@@ -53,7 +53,9 @@ class GpuService : public gpu::GpuChannelManagerDelegate,
~GpuService() override;
void InitializeWithHost(mojom::GpuHostPtr gpu_host,
- const gpu::GpuPreferences& preferences);
+ const gpu::GpuPreferences& preferences,
+ gpu::SyncPointManager* sync_point_manager = nullptr,
+ base::WaitableEvent* shutdown_event = nullptr);
void Bind(mojom::GpuServiceRequest request);
media::MediaGpuChannelManager* media_gpu_channel_manager() {
@@ -64,6 +66,8 @@ class GpuService : public gpu::GpuChannelManagerDelegate,
return gpu_channel_manager_.get();
}
+ gpu::GpuWatchdogThread* watchdog_thread() { return watchdog_thread_.get(); }
+
private:
friend class GpuMain;
@@ -74,9 +78,7 @@ class GpuService : public gpu::GpuChannelManagerDelegate,
gfx::BufferFormat format,
int client_id);
- gpu::SyncPointManager* sync_point_manager() {
- return owned_sync_point_manager_.get();
- }
+ gpu::SyncPointManager* sync_point_manager() { return sync_point_manager_; }
gpu::gles2::MailboxManager* mailbox_manager() {
return gpu_channel_manager_->mailbox_manager();
@@ -138,9 +140,14 @@ class GpuService : public gpu::GpuChannelManagerDelegate,
gpu::GPUInfo gpu_info_;
mojom::GpuHostPtr gpu_host_;
- std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_;
std::unique_ptr<gpu::GpuChannelManager> gpu_channel_manager_;
std::unique_ptr<media::MediaGpuChannelManager> media_gpu_channel_manager_;
+
+ // On some platforms (e.g. android webview), the SyncPointManager comes from
+ // external sources.
+ std::unique_ptr<gpu::SyncPointManager> owned_sync_point_manager_;
+ gpu::SyncPointManager* sync_point_manager_ = nullptr;
+
mojo::BindingSet<mojom::GpuService> bindings_;
DISALLOW_COPY_AND_ASSIGN(GpuService);

Powered by Google App Engine
This is Rietveld 408576698