| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 class FrameSinkId; | 37 class FrameSinkId; |
| 38 class Layer; | 38 class Layer; |
| 39 class LayerTreeHost; | 39 class LayerTreeHost; |
| 40 class OutputSurface; | 40 class OutputSurface; |
| 41 class SurfaceManager; | 41 class SurfaceManager; |
| 42 class VulkanContextProvider; | 42 class VulkanContextProvider; |
| 43 } | 43 } |
| 44 | 44 |
| 45 namespace content { | 45 namespace content { |
| 46 class CompositorClient; | 46 class CompositorClient; |
| 47 class FrameSinkManagerHost; |
| 47 | 48 |
| 48 // ----------------------------------------------------------------------------- | 49 // ----------------------------------------------------------------------------- |
| 49 // Browser-side compositor that manages a tree of content and UI layers. | 50 // Browser-side compositor that manages a tree of content and UI layers. |
| 50 // ----------------------------------------------------------------------------- | 51 // ----------------------------------------------------------------------------- |
| 51 class CONTENT_EXPORT CompositorImpl | 52 class CONTENT_EXPORT CompositorImpl |
| 52 : public Compositor, | 53 : public Compositor, |
| 53 public cc::LayerTreeHostClient, | 54 public cc::LayerTreeHostClient, |
| 54 public cc::LayerTreeHostSingleThreadClient, | 55 public cc::LayerTreeHostSingleThreadClient, |
| 55 public ui::UIResourceProvider, | 56 public ui::UIResourceProvider, |
| 56 public ui::WindowAndroidCompositor { | 57 public ui::WindowAndroidCompositor { |
| 57 public: | 58 public: |
| 58 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); | 59 CompositorImpl(CompositorClient* client, gfx::NativeWindow root_window); |
| 59 ~CompositorImpl() override; | 60 ~CompositorImpl() override; |
| 60 | 61 |
| 61 static bool IsInitialized(); | 62 static bool IsInitialized(); |
| 62 | 63 |
| 63 static cc::SurfaceManager* GetSurfaceManager(); | 64 static cc::SurfaceManager* GetSurfaceManager(); |
| 65 static FrameSinkManagerHost* GetFrameSinkManagerHost(); |
| 64 static cc::FrameSinkId AllocateFrameSinkId(); | 66 static cc::FrameSinkId AllocateFrameSinkId(); |
| 65 | 67 |
| 66 // ui::ResourceProvider implementation. | 68 // ui::ResourceProvider implementation. |
| 67 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override; | 69 cc::UIResourceId CreateUIResource(cc::UIResourceClient* client) override; |
| 68 void DeleteUIResource(cc::UIResourceId resource_id) override; | 70 void DeleteUIResource(cc::UIResourceId resource_id) override; |
| 69 bool SupportsETC1NonPowerOfTwo() const override; | 71 bool SupportsETC1NonPowerOfTwo() const override; |
| 70 | 72 |
| 71 private: | 73 private: |
| 72 // Compositor implementation. | 74 // Compositor implementation. |
| 73 void SetRootLayer(scoped_refptr<cc::Layer> root) override; | 75 void SetRootLayer(scoped_refptr<cc::Layer> root) override; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> | 183 std::unordered_set<cc::FrameSinkId, cc::FrameSinkIdHash> |
| 182 pending_child_frame_sink_ids_; | 184 pending_child_frame_sink_ids_; |
| 183 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 185 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
| 184 | 186 |
| 185 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 187 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
| 186 }; | 188 }; |
| 187 | 189 |
| 188 } // namespace content | 190 } // namespace content |
| 189 | 191 |
| 190 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 192 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
| OLD | NEW |