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

Unified Diff: services/ui/surfaces/mus_display_provider.h

Issue 2778863002: Introduce DisplayProvider for DisplayCompositor. (Closed)
Patch Set: Delete extra task runner ref. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/ui/surfaces/display_provider.h ('k') | services/ui/surfaces/mus_display_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/surfaces/mus_display_provider.h
diff --git a/services/ui/surfaces/mus_display_provider.h b/services/ui/surfaces/mus_display_provider.h
new file mode 100644
index 0000000000000000000000000000000000000000..2c111d884a95a925a04a0f0c0d70cbe57e15e0c9
--- /dev/null
+++ b/services/ui/surfaces/mus_display_provider.h
@@ -0,0 +1,52 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_
+#define SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_
+
+#include <memory>
+
+#include "base/compiler_specific.h"
+#include "base/macros.h"
+#include "base/memory/ref_counted.h"
+#include "cc/surfaces/frame_sink_id.h"
+#include "gpu/command_buffer/client/gpu_memory_buffer_manager.h"
+#include "gpu/ipc/common/surface_handle.h"
+#include "gpu/ipc/in_process_command_buffer.h"
+#include "services/ui/surfaces/display_provider.h"
+
+namespace gpu {
+class ImageFactory;
+}
+
+namespace ui {
+
+// Mus implementation of DisplayProvider. This will be created in mus-gpu.
+class MusDisplayProvider : public NON_EXPORTED_BASE(DisplayProvider) {
+ public:
+ MusDisplayProvider(
+ scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service,
+ std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager,
+ gpu::ImageFactory* image_factory);
+ ~MusDisplayProvider() override;
+
+ // display_compositor::DisplayProvider:
+ std::unique_ptr<cc::Display> CreateDisplay(
+ const cc::FrameSinkId& frame_sink_id,
+ gpu::SurfaceHandle surface_handle,
+ std::unique_ptr<cc::BeginFrameSource>* begin_frame_source) override;
+
+ private:
+ scoped_refptr<gpu::InProcessCommandBuffer::Service> gpu_service_;
+ std::unique_ptr<gpu::GpuMemoryBufferManager> gpu_memory_buffer_manager_;
+ gpu::ImageFactory* image_factory_;
+
+ scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
+
+ DISALLOW_COPY_AND_ASSIGN(MusDisplayProvider);
+};
+
+} // namespace ui
+
+#endif // SERVICES_UI_SURFACES_MUS_DISPLAY_PROVIDER_H_
« no previous file with comments | « services/ui/surfaces/display_provider.h ('k') | services/ui/surfaces/mus_display_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698