Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(274)

Side by Side Diff: content/browser/renderer_host/compositor_impl_android.h

Issue 1560533004: Android: Explicitly tear down LayerTreeHost first, take 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 void CreateLayerTreeHost(); 155 void CreateLayerTreeHost();
156 156
157 void OnGpuChannelEstablished(); 157 void OnGpuChannelEstablished();
158 void OnGpuChannelTimeout(); 158 void OnGpuChannelTimeout();
159 159
160 // root_layer_ is the persistent internal root layer, while subroot_layer_ 160 // root_layer_ is the persistent internal root layer, while subroot_layer_
161 // is the one attached by the compositor client. 161 // is the one attached by the compositor client.
162 scoped_refptr<cc::Layer> root_layer_; 162 scoped_refptr<cc::Layer> root_layer_;
163 scoped_refptr<cc::Layer> subroot_layer_; 163 scoped_refptr<cc::Layer> subroot_layer_;
164 164
165 // Destruction order matters here:
166 base::ObserverList<VSyncObserver, true> observer_list_;
165 scoped_ptr<cc::LayerTreeHost> host_; 167 scoped_ptr<cc::LayerTreeHost> host_;
166 ui::ResourceManagerImpl resource_manager_; 168 ui::ResourceManagerImpl resource_manager_;
167 169
168 scoped_ptr<cc::OnscreenDisplayClient> display_client_; 170 scoped_ptr<cc::OnscreenDisplayClient> display_client_;
169 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_; 171 scoped_ptr<cc::SurfaceIdAllocator> surface_id_allocator_;
170 172
171 gfx::Size size_; 173 gfx::Size size_;
172 bool has_transparent_background_; 174 bool has_transparent_background_;
173 float device_scale_factor_; 175 float device_scale_factor_;
174 176
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 base::OneShotTimer establish_gpu_channel_timeout_; 217 base::OneShotTimer establish_gpu_channel_timeout_;
216 218
217 // Whether there is an OutputSurface request pending from the current 219 // Whether there is an OutputSurface request pending from the current
218 // |host_|. Becomes |true| if RequestNewOutputSurface is called, and |false| 220 // |host_|. Becomes |true| if RequestNewOutputSurface is called, and |false|
219 // if |host_| is deleted or we succeed in creating *and* initializing an 221 // if |host_| is deleted or we succeed in creating *and* initializing an
220 // OutputSurface (which is essentially the contract with cc). 222 // OutputSurface (which is essentially the contract with cc).
221 bool output_surface_request_pending_; 223 bool output_surface_request_pending_;
222 224
223 gpu::Capabilities gpu_capabilities_; 225 gpu::Capabilities gpu_capabilities_;
224 226
225 base::ObserverList<VSyncObserver, true> observer_list_;
226
227 base::WeakPtrFactory<CompositorImpl> weak_factory_; 227 base::WeakPtrFactory<CompositorImpl> weak_factory_;
228 228
229 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); 229 DISALLOW_COPY_AND_ASSIGN(CompositorImpl);
230 }; 230 };
231 231
232 } // namespace content 232 } // namespace content
233 233
234 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ 234 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/compositor_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698