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> |
11 | 11 |
12 #include "base/cancelable_callback.h" | 12 #include "base/cancelable_callback.h" |
13 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
14 #include "base/macros.h" | 14 #include "base/macros.h" |
15 #include "base/memory/weak_ptr.h" | 15 #include "base/memory/weak_ptr.h" |
16 #include "base/observer_list.h" | 16 #include "base/observer_list.h" |
17 #include "base/timer/timer.h" | 17 #include "base/timer/timer.h" |
18 #include "cc/scheduler/begin_frame_source.h" | |
19 #include "cc/trees/layer_tree_host_client.h" | 18 #include "cc/trees/layer_tree_host_client.h" |
20 #include "cc/trees/layer_tree_host_single_thread_client.h" | 19 #include "cc/trees/layer_tree_host_single_thread_client.h" |
21 #include "content/common/content_export.h" | 20 #include "content/common/content_export.h" |
22 #include "content/common/gpu/client/context_provider_command_buffer.h" | 21 #include "content/common/gpu/client/context_provider_command_buffer.h" |
23 #include "content/public/browser/android/compositor.h" | 22 #include "content/public/browser/android/compositor.h" |
24 #include "gpu/command_buffer/common/capabilities.h" | 23 #include "gpu/command_buffer/common/capabilities.h" |
25 #include "gpu/ipc/common/surface_handle.h" | 24 #include "gpu/ipc/common/surface_handle.h" |
26 #include "third_party/khronos/GLES2/gl2.h" | 25 #include "third_party/khronos/GLES2/gl2.h" |
27 #include "ui/android/context_provider_factory.h" | 26 #include "ui/android/context_provider_factory.h" |
28 #include "ui/android/resources/resource_manager_impl.h" | 27 #include "ui/android/resources/resource_manager_impl.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 // Subtree for hidden layers with CopyOutputRequests on them. | 142 // Subtree for hidden layers with CopyOutputRequests on them. |
144 scoped_refptr<cc::Layer> readback_layer_tree_; | 143 scoped_refptr<cc::Layer> readback_layer_tree_; |
145 | 144 |
146 // Destruction order matters here: | 145 // Destruction order matters here: |
147 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; | 146 std::unique_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; |
148 base::ObserverList<VSyncObserver, true> observer_list_; | 147 base::ObserverList<VSyncObserver, true> observer_list_; |
149 std::unique_ptr<cc::LayerTreeHost> host_; | 148 std::unique_ptr<cc::LayerTreeHost> host_; |
150 ui::ResourceManagerImpl resource_manager_; | 149 ui::ResourceManagerImpl resource_manager_; |
151 | 150 |
152 std::unique_ptr<cc::Display> display_; | 151 std::unique_ptr<cc::Display> display_; |
153 std::unique_ptr<cc::BeginFrameSource> begin_frame_source_; | |
154 | 152 |
155 gfx::Size size_; | 153 gfx::Size size_; |
156 bool has_transparent_background_; | 154 bool has_transparent_background_; |
157 float device_scale_factor_; | 155 float device_scale_factor_; |
158 | 156 |
159 ANativeWindow* window_; | 157 ANativeWindow* window_; |
160 gpu::SurfaceHandle surface_handle_; | 158 gpu::SurfaceHandle surface_handle_; |
161 | 159 |
162 CompositorClient* client_; | 160 CompositorClient* client_; |
163 | 161 |
(...skipping 17 matching lines...) Expand all Loading... |
181 gpu::Capabilities gpu_capabilities_; | 179 gpu::Capabilities gpu_capabilities_; |
182 bool needs_begin_frames_; | 180 bool needs_begin_frames_; |
183 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 181 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
184 | 182 |
185 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 183 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
186 }; | 184 }; |
187 | 185 |
188 } // namespace content | 186 } // namespace content |
189 | 187 |
190 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 188 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |