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 "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/cancelable_callback.h" | 9 #include "base/cancelable_callback.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 defer_composite_for_gpu_channel_; | 125 defer_composite_for_gpu_channel_; |
126 } | 126 } |
127 void CancelComposite() { | 127 void CancelComposite() { |
128 DCHECK(WillComposite()); | 128 DCHECK(WillComposite()); |
129 if (WillCompositeThisFrame()) | 129 if (WillCompositeThisFrame()) |
130 current_composite_task_->Cancel(); | 130 current_composite_task_->Cancel(); |
131 current_composite_task_.reset(); | 131 current_composite_task_.reset(); |
132 composite_on_vsync_trigger_ = DO_NOT_COMPOSITE; | 132 composite_on_vsync_trigger_ = DO_NOT_COMPOSITE; |
133 will_composite_immediately_ = false; | 133 will_composite_immediately_ = false; |
134 } | 134 } |
| 135 void CreateLayerTreeHost(); |
135 void OnGpuChannelEstablished(); | 136 void OnGpuChannelEstablished(); |
136 | 137 |
137 // root_layer_ is the persistent internal root layer, while subroot_layer_ | 138 // root_layer_ is the persistent internal root layer, while subroot_layer_ |
138 // is the one attached by the compositor client. | 139 // is the one attached by the compositor client. |
139 scoped_refptr<cc::Layer> root_layer_; | 140 scoped_refptr<cc::Layer> root_layer_; |
140 scoped_refptr<cc::Layer> subroot_layer_; | 141 scoped_refptr<cc::Layer> subroot_layer_; |
141 | 142 |
142 scoped_ptr<cc::LayerTreeHost> host_; | 143 scoped_ptr<cc::LayerTreeHost> host_; |
143 content::UIResourceProviderImpl ui_resource_provider_; | 144 content::UIResourceProviderImpl ui_resource_provider_; |
144 ui::ResourceManager resource_manager_; | 145 ui::ResourceManager resource_manager_; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 base::TimeTicks last_vsync_; | 194 base::TimeTicks last_vsync_; |
194 | 195 |
195 base::WeakPtrFactory<CompositorImpl> weak_factory_; | 196 base::WeakPtrFactory<CompositorImpl> weak_factory_; |
196 | 197 |
197 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); | 198 DISALLOW_COPY_AND_ASSIGN(CompositorImpl); |
198 }; | 199 }; |
199 | 200 |
200 } // namespace content | 201 } // namespace content |
201 | 202 |
202 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ | 203 #endif // CONTENT_BROWSER_RENDERER_HOST_COMPOSITOR_IMPL_ANDROID_H_ |
OLD | NEW |