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

Unified Diff: services/surfaces/surfaces_impl.h

Issue 1537803002: Revert "Delete the Surfaces service." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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/surfaces/display_impl.cc ('k') | services/surfaces/surfaces_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/surfaces/surfaces_impl.h
diff --git a/services/surfaces/surfaces_impl.h b/services/surfaces/surfaces_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..84f11d8b4a8321ec2514a0acff42101585b48e8b
--- /dev/null
+++ b/services/surfaces/surfaces_impl.h
@@ -0,0 +1,67 @@
+// Copyright 2014 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_SURFACES_SURFACES_IMPL_H_
+#define SERVICES_SURFACES_SURFACES_IMPL_H_
+
+#include "cc/surfaces/display_client.h"
+#include "cc/surfaces/surface_factory.h"
+#include "cc/surfaces/surface_factory_client.h"
+#include "mojo/public/cpp/application/application_connection.h"
+#include "mojo/public/cpp/bindings/strong_binding.h"
+#include "mojo/services/gpu/interfaces/command_buffer.mojom.h"
+#include "mojo/services/gpu/interfaces/viewport_parameter_listener.mojom.h"
+#include "mojo/services/surfaces/interfaces/surfaces.mojom.h"
+
+namespace cc {
+class Display;
+}
+
+namespace mojo {
+class ApplicationManager;
+}
+
+namespace surfaces {
+class SurfacesScheduler;
+
+class SurfacesImpl : public mojo::Surface, public cc::SurfaceFactoryClient {
+ public:
+ SurfacesImpl(cc::SurfaceManager* manager,
+ uint32_t id_namespace,
+ SurfacesScheduler* scheduler,
+ mojo::InterfaceRequest<mojo::Surface> request);
+
+ ~SurfacesImpl() override;
+
+ // Surface implementation.
+ void GetIdNamespace(const Surface::GetIdNamespaceCallback& callback) override;
+ void SetResourceReturner(mojo::ResourceReturnerPtr returner) override;
+ void CreateSurface(uint32_t local_id) override;
+ void SubmitFrame(uint32_t local_id,
+ mojo::FramePtr frame,
+ const mojo::Closure& callback) override;
+ void DestroySurface(uint32_t local_id) override;
+
+ // SurfaceFactoryClient implementation.
+ void ReturnResources(const cc::ReturnedResourceArray& resources) override;
+
+ cc::SurfaceFactory* factory() { return &factory_; }
+
+ private:
+ cc::SurfaceId QualifyIdentifier(uint32_t local_id);
+
+ cc::SurfaceManager* manager_;
+ cc::SurfaceFactory factory_;
+ const uint32_t id_namespace_;
+ SurfacesScheduler* scheduler_;
+ mojo::ScopedMessagePipeHandle command_buffer_handle_;
+ mojo::ResourceReturnerPtr returner_;
+ mojo::StrongBinding<Surface> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(SurfacesImpl);
+};
+
+} // namespace surfaces
+
+#endif // SERVICES_SURFACES_SURFACES_IMPL_H_
« no previous file with comments | « services/surfaces/display_impl.cc ('k') | services/surfaces/surfaces_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698