OLD | NEW |
---|---|
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_ | 5 #ifndef MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_ |
6 #define MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_ | 6 #define MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
viettrungluu
2014/10/06 16:12:21
"
Mostyn Bramley-Moore
2014/10/06 17:13:34
Done.
| |
9 #include "cc/surfaces/display_client.h" | 9 #include "cc/surfaces/display_client.h" |
10 #include "cc/surfaces/surface_factory.h" | 10 #include "cc/surfaces/surface_factory.h" |
11 #include "cc/surfaces/surface_factory_client.h" | 11 #include "cc/surfaces/surface_factory_client.h" |
12 #include "mojo/public/cpp/application/application_connection.h" | 12 #include "mojo/public/cpp/application/application_connection.h" |
13 #include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h" | 13 #include "mojo/services/public/interfaces/gpu/command_buffer.mojom.h" |
14 #include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h" | 14 #include "mojo/services/public/interfaces/surfaces/surfaces.mojom.h" |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 class Display; | 17 class Display; |
18 } | 18 } |
(...skipping 12 matching lines...) Expand all Loading... | |
31 virtual void FrameSubmitted() = 0; | 31 virtual void FrameSubmitted() = 0; |
32 virtual void SetDisplay(cc::Display*) = 0; | 32 virtual void SetDisplay(cc::Display*) = 0; |
33 }; | 33 }; |
34 | 34 |
35 SurfacesImpl(cc::SurfaceManager* manager, | 35 SurfacesImpl(cc::SurfaceManager* manager, |
36 uint32_t id_namespace, | 36 uint32_t id_namespace, |
37 Client* client); | 37 Client* client); |
38 virtual ~SurfacesImpl(); | 38 virtual ~SurfacesImpl(); |
39 | 39 |
40 // Surface implementation. | 40 // Surface implementation. |
41 virtual void CreateSurface(SurfaceIdPtr id, mojo::SizePtr size) OVERRIDE; | 41 virtual void CreateSurface(SurfaceIdPtr id, mojo::SizePtr size) override; |
42 virtual void SubmitFrame(SurfaceIdPtr id, FramePtr frame) OVERRIDE; | 42 virtual void SubmitFrame(SurfaceIdPtr id, FramePtr frame) override; |
43 virtual void DestroySurface(SurfaceIdPtr id) OVERRIDE; | 43 virtual void DestroySurface(SurfaceIdPtr id) override; |
44 virtual void CreateGLES2BoundSurface(CommandBufferPtr gles2_client, | 44 virtual void CreateGLES2BoundSurface(CommandBufferPtr gles2_client, |
45 SurfaceIdPtr id, | 45 SurfaceIdPtr id, |
46 mojo::SizePtr size) OVERRIDE; | 46 mojo::SizePtr size) override; |
47 | 47 |
48 // SurfaceFactoryClient implementation. | 48 // SurfaceFactoryClient implementation. |
49 virtual void ReturnResources( | 49 virtual void ReturnResources( |
50 const cc::ReturnedResourceArray& resources) OVERRIDE; | 50 const cc::ReturnedResourceArray& resources) override; |
51 | 51 |
52 // DisplayClient implementation. | 52 // DisplayClient implementation. |
53 virtual void DisplayDamaged() OVERRIDE; | 53 virtual void DisplayDamaged() override; |
54 virtual void DidSwapBuffers() OVERRIDE; | 54 virtual void DidSwapBuffers() override; |
55 virtual void DidSwapBuffersComplete() OVERRIDE; | 55 virtual void DidSwapBuffersComplete() override; |
56 virtual void CommitVSyncParameters(base::TimeTicks timebase, | 56 virtual void CommitVSyncParameters(base::TimeTicks timebase, |
57 base::TimeDelta interval) OVERRIDE; | 57 base::TimeDelta interval) override; |
58 virtual void OutputSurfaceLost() OVERRIDE; | 58 virtual void OutputSurfaceLost() override; |
59 virtual void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) OVERRIDE; | 59 virtual void SetMemoryPolicy(const cc::ManagedMemoryPolicy& policy) override; |
60 | 60 |
61 cc::SurfaceFactory* factory() { return &factory_; } | 61 cc::SurfaceFactory* factory() { return &factory_; } |
62 | 62 |
63 private: | 63 private: |
64 cc::SurfaceManager* manager_; | 64 cc::SurfaceManager* manager_; |
65 cc::SurfaceFactory factory_; | 65 cc::SurfaceFactory factory_; |
66 uint32_t id_namespace_; | 66 uint32_t id_namespace_; |
67 Client* client_; | 67 Client* client_; |
68 scoped_ptr<cc::Display> display_; | 68 scoped_ptr<cc::Display> display_; |
69 ScopedMessagePipeHandle command_buffer_handle_; | 69 ScopedMessagePipeHandle command_buffer_handle_; |
70 | 70 |
71 DISALLOW_COPY_AND_ASSIGN(SurfacesImpl); | 71 DISALLOW_COPY_AND_ASSIGN(SurfacesImpl); |
72 }; | 72 }; |
73 | 73 |
74 } // namespace mojo | 74 } // namespace mojo |
75 | 75 |
76 #endif // MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_ | 76 #endif // MOJO_SERVICES_SURFACES_SURFACES_IMPL_H_ |
OLD | NEW |