| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ | 5 #ifndef ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ |
| 6 #define ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ | 6 #define ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "cc/surfaces/display_client.h" | 12 #include "cc/surfaces/display_client.h" |
| 13 #include "cc/surfaces/frame_sink_id.h" |
| 13 #include "cc/surfaces/surface_factory_client.h" | 14 #include "cc/surfaces/surface_factory_client.h" |
| 14 #include "cc/surfaces/surface_id.h" | 15 #include "cc/surfaces/surface_id.h" |
| 15 | 16 |
| 16 namespace cc { | 17 namespace cc { |
| 17 class Display; | 18 class Display; |
| 18 class SurfaceIdAllocator; | 19 class SurfaceIdAllocator; |
| 19 class SurfaceFactory; | 20 class SurfaceFactory; |
| 20 class SurfaceManager; | 21 class SurfaceManager; |
| 21 } | 22 } |
| 22 | 23 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 bool will_draw_and_swap, | 63 bool will_draw_and_swap, |
| 63 const cc::RenderPassList& render_passes) override {} | 64 const cc::RenderPassList& render_passes) override {} |
| 64 void DisplayDidDrawAndSwap() override {} | 65 void DisplayDidDrawAndSwap() override {} |
| 65 | 66 |
| 66 // cc::SurfaceFactoryClient implementation. | 67 // cc::SurfaceFactoryClient implementation. |
| 67 void ReturnResources(const cc::ReturnedResourceArray& resources) override; | 68 void ReturnResources(const cc::ReturnedResourceArray& resources) override; |
| 68 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; | 69 void SetBeginFrameSource(cc::BeginFrameSource* begin_frame_source) override; |
| 69 | 70 |
| 70 void SetEmptyRootFrame(); | 71 void SetEmptyRootFrame(); |
| 71 | 72 |
| 72 uint32_t next_frame_sink_id_; | 73 uint32_t next_client_id_; |
| 74 |
| 75 cc::FrameSinkId frame_sink_id_; |
| 73 | 76 |
| 74 std::unique_ptr<cc::SurfaceManager> surface_manager_; | 77 std::unique_ptr<cc::SurfaceManager> surface_manager_; |
| 75 std::unique_ptr<cc::Display> display_; | 78 std::unique_ptr<cc::Display> display_; |
| 76 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 79 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
| 77 std::unique_ptr<cc::SurfaceFactory> surface_factory_; | 80 std::unique_ptr<cc::SurfaceFactory> surface_factory_; |
| 78 | 81 |
| 79 cc::SurfaceId root_id_; | 82 cc::SurfaceId root_id_; |
| 80 std::vector<cc::SurfaceId> child_ids_; | 83 std::vector<cc::SurfaceId> child_ids_; |
| 81 | 84 |
| 82 // This is owned by |display_|. | 85 // This is owned by |display_|. |
| 83 ParentOutputSurface* output_surface_; | 86 ParentOutputSurface* output_surface_; |
| 84 | 87 |
| 85 DISALLOW_COPY_AND_ASSIGN(SurfacesInstance); | 88 DISALLOW_COPY_AND_ASSIGN(SurfacesInstance); |
| 86 }; | 89 }; |
| 87 | 90 |
| 88 } // namespace android_webview | 91 } // namespace android_webview |
| 89 | 92 |
| 90 #endif // ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ | 93 #endif // ANDROID_WEBVIEW_BROWSER_SURFACES_INSTANCE_H_ |
| OLD | NEW |