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

Unified Diff: content/browser/gpu/gpu_process_host.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
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | content/browser/gpu/gpu_process_host.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/gpu/gpu_process_host.h
diff --git a/content/browser/gpu/gpu_process_host.h b/content/browser/gpu/gpu_process_host.h
index dd9702b38a684b2e151535773679059fd021b66b..96e97770e651398fdc50aa9b6c5c3dfd91290a6f 100644
--- a/content/browser/gpu/gpu_process_host.h
+++ b/content/browser/gpu/gpu_process_host.h
@@ -28,7 +28,10 @@
#include "gpu/ipc/common/surface_handle.h"
#include "ipc/ipc_sender.h"
#include "ipc/message_filter.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "services/ui/gpu/interfaces/gpu_host.mojom.h"
#include "services/ui/gpu/interfaces/gpu_main.mojom.h"
+#include "services/ui/gpu/interfaces/gpu_service.mojom.h"
#include "ui/gfx/geometry/size.h"
#include "ui/gfx/gpu_memory_buffer.h"
#include "url/gurl.h"
@@ -60,6 +63,7 @@ typedef base::Thread* (*GpuMainThreadFactoryFunction)(
class GpuProcessHost : public BrowserChildProcessHostDelegate,
public IPC::Sender,
+ public ui::mojom::GpuHost,
public base::NonThreadSafe {
public:
enum GpuProcessKind {
@@ -184,6 +188,20 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
void OnProcessLaunchFailed(int error_code) override;
void OnProcessCrashed(int exit_code) override;
+ // ui::mojom::GpuHost:
+ void DidInitialize(const gpu::GPUInfo& gpu_info) override;
+ void DidCreateOffscreenContext(const GURL& url) override;
+ void DidDestroyOffscreenContext(const GURL& url) override;
+ void DidDestroyChannel(int32_t client_id) override;
+ void DidLoseContext(bool offscreen,
+ gpu::error::ContextLostReason reason,
+ const GURL& active_url) override;
+ void SetChildSurface(gpu::SurfaceHandle parent,
+ gpu::SurfaceHandle child) override;
+ void StoreShaderToDisk(int32_t client_id,
+ const std::string& key,
+ const std::string& shader) override;
+
// Message handlers.
void OnInitialized(bool result, const gpu::GPUInfo& gpu_info);
void OnChannelEstablished(const IPC::ChannelHandle& channel_handle);
@@ -290,6 +308,8 @@ class GpuProcessHost : public BrowserChildProcessHostDelegate,
std::string shader_prefix_key_info_;
ui::mojom::GpuMainAssociatedPtr gpu_main_ptr_;
+ ui::mojom::GpuServicePtr gpu_service_ptr_;
+ mojo::Binding<ui::mojom::GpuHost> gpu_host_binding_;
DISALLOW_COPY_AND_ASSIGN(GpuProcessHost);
};
« no previous file with comments | « no previous file | content/browser/gpu/gpu_process_host.cc » ('j') | content/browser/gpu/gpu_process_host.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698