We started redesigning GpuMemoryBuffer interface to handle multiple buffers [0].
[chromium-blink-merge.git] / mojo / services / surfaces / display_factory_impl.h
blob7a21c43e33da74df64ed22bf305a032cdffad2ce
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_
6 #define SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_
8 #include "mojo/public/cpp/bindings/strong_binding.h"
9 #include "mojo/services/surfaces/display_impl.h"
10 #include "third_party/mojo_services/src/surfaces/public/interfaces/display.mojom.h"
12 namespace cc {
13 class SurfaceManager;
16 namespace surfaces {
17 class SurfacesScheduler;
19 class DisplayFactoryImpl : public mojo::DisplayFactory {
20 public:
21 DisplayFactoryImpl(cc::SurfaceManager* manager,
22 uint32_t id_namespace,
23 SurfacesScheduler* scheduler,
24 mojo::InterfaceRequest<mojo::DisplayFactory> request);
25 ~DisplayFactoryImpl() override;
27 private:
28 // mojo::DisplayFactory implementation.
29 void Create(mojo::ContextProviderPtr context_provider,
30 mojo::ResourceReturnerPtr returner,
31 mojo::InterfaceRequest<mojo::Display> display_request) override;
33 // We use one ID namespace for all DisplayImpls since the ID is used only by
34 // cc and not exposed through mojom.
35 uint32_t id_namespace_;
36 uint32_t next_local_id_;
37 SurfacesScheduler* scheduler_;
38 cc::SurfaceManager* manager_;
39 mojo::StrongBinding<mojo::DisplayFactory> binding_;
42 } // namespace surfaces
44 #endif // SERVICES_SURFACES_DISPLAY_FACTORY_IMPL_H_