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

Side by Side Diff: components/surfaces/surfaces_impl.h

Issue 1150093003: Move GLES2, GPU & Surfaces into the ViewManager directory. This does not merge the applications, th… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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 unified diff | Download patch
« no previous file with comments | « components/surfaces/surfaces_context_provider.cc ('k') | components/surfaces/surfaces_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #ifndef COMPONENTS_SURFACES_SURFACES_IMPL_H_
6 #define COMPONENTS_SURFACES_SURFACES_IMPL_H_
7
8 #include "cc/surfaces/display_client.h"
9 #include "cc/surfaces/surface_factory.h"
10 #include "cc/surfaces/surface_factory_client.h"
11 #include "components/gpu/public/interfaces/command_buffer.mojom.h"
12 #include "components/gpu/public/interfaces/viewport_parameter_listener.mojom.h"
13 #include "components/surfaces/public/interfaces/surfaces.mojom.h"
14 #include "mojo/application/public/cpp/application_connection.h"
15 #include "mojo/common/weak_binding_set.h"
16 #include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
17
18 namespace cc {
19 class Display;
20 }
21
22 namespace mojo {
23 class ApplicationManager;
24 }
25
26 namespace surfaces {
27 class SurfacesScheduler;
28 class SurfacesServiceApplication;
29
30 class SurfacesImpl : public mojo::Surface, public cc::SurfaceFactoryClient {
31 public:
32 SurfacesImpl(SurfacesServiceApplication* application,
33 cc::SurfaceManager* manager,
34 uint32_t id_namespace,
35 SurfacesScheduler* scheduler,
36 mojo::InterfaceRequest<mojo::Surface> request);
37
38 ~SurfacesImpl() override;
39
40 // Surface implementation.
41 void GetIdNamespace(const Surface::GetIdNamespaceCallback& callback) override;
42 void SetResourceReturner(mojo::ResourceReturnerPtr returner) override;
43 void CreateSurface(uint32_t local_id) override;
44 void SubmitFrame(uint32_t local_id,
45 mojo::FramePtr frame,
46 const mojo::Closure& callback) override;
47 void DestroySurface(uint32_t local_id) override;
48
49 // SurfaceFactoryClient implementation.
50 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
51
52 cc::SurfaceFactory* factory() { return &factory_; }
53
54 private:
55 cc::SurfaceId QualifyIdentifier(uint32_t local_id);
56
57 SurfacesServiceApplication* application_;
58 cc::SurfaceManager* manager_;
59 cc::SurfaceFactory factory_;
60 const uint32_t id_namespace_;
61 SurfacesScheduler* scheduler_;
62 mojo::ScopedMessagePipeHandle command_buffer_handle_;
63 mojo::ResourceReturnerPtr returner_;
64 mojo::StrongBinding<Surface> binding_;
65
66 DISALLOW_COPY_AND_ASSIGN(SurfacesImpl);
67 };
68
69 } // namespace surfaces
70
71 #endif // COMPONENTS_SURFACES_SURFACES_IMPL_H_
OLDNEW
« no previous file with comments | « components/surfaces/surfaces_context_provider.cc ('k') | components/surfaces/surfaces_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698