| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ | 5 #ifndef SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ |
| 6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ | 6 #define SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 #include "mojo/public/cpp/bindings/binding.h" | 26 #include "mojo/public/cpp/bindings/binding.h" |
| 27 | 27 |
| 28 namespace gpu { | 28 namespace gpu { |
| 29 class GpuMemoryBufferManager; | 29 class GpuMemoryBufferManager; |
| 30 class ImageFactory; | 30 class ImageFactory; |
| 31 } | 31 } |
| 32 | 32 |
| 33 namespace cc { | 33 namespace cc { |
| 34 class Display; | 34 class Display; |
| 35 class SurfaceManager; | 35 class SurfaceManager; |
| 36 class SyntheticBeginFrameSource; |
| 36 } | 37 } |
| 37 | 38 |
| 38 namespace ui { | 39 namespace ui { |
| 39 | 40 |
| 40 namespace test { | 41 namespace test { |
| 41 class DisplayCompositorTest; | 42 class DisplayCompositorTest; |
| 42 } | 43 } |
| 43 | 44 |
| 44 class DisplayCompositorClient; | 45 class DisplayCompositorClient; |
| 45 class GpuCompositorFrameSink; | 46 class GpuCompositorFrameSink; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 cc::mojom::MojoCompositorFrameSinkClientPtr client) override; | 91 cc::mojom::MojoCompositorFrameSinkClientPtr client) override; |
| 91 | 92 |
| 92 private: | 93 private: |
| 93 friend class test::DisplayCompositorTest; | 94 friend class test::DisplayCompositorTest; |
| 94 | 95 |
| 95 void AddSurfaceReference(const cc::SurfaceReference& ref); | 96 void AddSurfaceReference(const cc::SurfaceReference& ref); |
| 96 void RemoveSurfaceReference(const cc::SurfaceReference& ref); | 97 void RemoveSurfaceReference(const cc::SurfaceReference& ref); |
| 97 | 98 |
| 98 std::unique_ptr<cc::Display> CreateDisplay( | 99 std::unique_ptr<cc::Display> CreateDisplay( |
| 99 const cc::FrameSinkId& frame_sink_id, | 100 const cc::FrameSinkId& frame_sink_id, |
| 100 gpu::SurfaceHandle surface_handle); | 101 gpu::SurfaceHandle surface_handle, |
| 102 cc::SyntheticBeginFrameSource* begin_frame_source); |
| 101 | 103 |
| 102 const cc::SurfaceId& GetRootSurfaceId() const; | 104 const cc::SurfaceId& GetRootSurfaceId() const; |
| 103 | 105 |
| 104 // cc::SurfaceObserver implementation. | 106 // cc::SurfaceObserver implementation. |
| 105 void OnSurfaceCreated(const cc::SurfaceId& surface_id, | 107 void OnSurfaceCreated(const cc::SurfaceId& surface_id, |
| 106 const gfx::Size& frame_size, | 108 const gfx::Size& frame_size, |
| 107 float device_scale_factor) override; | 109 float device_scale_factor) override; |
| 108 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, | 110 void OnSurfaceDamaged(const cc::SurfaceId& surface_id, |
| 109 bool* changed) override; | 111 bool* changed) override; |
| 110 | 112 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 144 |
| 143 cc::mojom::DisplayCompositorClientPtr client_; | 145 cc::mojom::DisplayCompositorClientPtr client_; |
| 144 mojo::Binding<cc::mojom::DisplayCompositor> binding_; | 146 mojo::Binding<cc::mojom::DisplayCompositor> binding_; |
| 145 | 147 |
| 146 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); | 148 DISALLOW_COPY_AND_ASSIGN(DisplayCompositor); |
| 147 }; | 149 }; |
| 148 | 150 |
| 149 } // namespace ui | 151 } // namespace ui |
| 150 | 152 |
| 151 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ | 153 #endif // SERVICES_UI_SURFACES_DISPLAY_COMPOSITOR_H_ |
| OLD | NEW |