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

Side by Side Diff: mojo/services/surfaces/surfaces_impl.h

Issue 687433002: Remove mojo/shell and (most) service implementations (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove mojo/gles2, disable mojo apps in component build Created 6 years, 1 month 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 | « mojo/services/surfaces/DEPS ('k') | mojo/services/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 MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_
6 #define MOJO_SERVICES_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 "mojo/public/cpp/application/application_connection.h"
12 #include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h"
13 #include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h"
14
15 namespace cc {
16 class Display;
17 }
18
19 namespace mojo {
20 class ApplicationManager;
21
22 class SurfaceNativeViewportClient;
23
24 class SurfacesImpl : public InterfaceImpl<Surface>,
25 public cc::SurfaceFactoryClient,
26 public cc::DisplayClient {
27 public:
28 class Client {
29 public:
30 virtual void FrameSubmitted() = 0;
31 virtual void SetDisplay(cc::Display*) = 0;
32 };
33
34 SurfacesImpl(cc::SurfaceManager* manager,
35 uint32_t id_namespace,
36 Client* client);
37 ~SurfacesImpl() override;
38
39 // Surface implementation.
40 void CreateSurface(SurfaceIdPtr id, mojo::SizePtr size) override;
41 void SubmitFrame(SurfaceIdPtr id, FramePtr frame) override;
42 void DestroySurface(SurfaceIdPtr id) override;
43 void CreateGLES2BoundSurface(CommandBufferPtr gles2_client,
44 SurfaceIdPtr id,
45 mojo::SizePtr size) override;
46
47 // SurfaceFactoryClient implementation.
48 void ReturnResources(const cc::ReturnedResourceArray& resources) override;
49
50 // DisplayClient implementation.
51 void DisplayDamaged() override;
52 void DidSwapBuffers() override;
53 void DidSwapBuffersComplete() override;
54 void CommitVSyncParameters(base::TimeTicks timebase,
55 base::TimeDelta interval) override;
56 void OutputSurfaceLost() override;
57 void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override;
58
59 cc::SurfaceFactory* factory() { return &factory_; }
60
61 private:
62 cc::SurfaceManager* manager_;
63 cc::SurfaceFactory factory_;
64 uint32_t id_namespace_;
65 Client* client_;
66 scoped_ptr<cc::Display> display_;
67 ScopedMessagePipeHandle command_buffer_handle_;
68
69 DISALLOW_COPY_AND_ASSIGN(SurfacesImpl);
70 };
71
72 } // namespace mojo
73
74 #endif // MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_
OLDNEW
« no previous file with comments | « mojo/services/surfaces/DEPS ('k') | mojo/services/surfaces/surfaces_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698