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 #include "content/browser/renderer_host/compositor_impl_android.h" | 5 #include "content/browser/renderer_host/compositor_impl_android.h" |
6 | 6 |
7 #include <android/bitmap.h> | 7 #include <android/bitmap.h> |
8 #include <android/native_window_jni.h> | 8 #include <android/native_window_jni.h> |
9 | 9 |
10 #include "base/android/jni_android.h" | 10 #include "base/android/jni_android.h" |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 new cc::SurfaceIdAllocator(++g_surface_id_namespace)); | 222 new cc::SurfaceIdAllocator(++g_surface_id_namespace)); |
223 cc::SurfaceManager* manager = GetSurfaceManager(); | 223 cc::SurfaceManager* manager = GetSurfaceManager(); |
224 DCHECK(manager); | 224 DCHECK(manager); |
225 allocator->RegisterSurfaceIdNamespace(manager); | 225 allocator->RegisterSurfaceIdNamespace(manager); |
226 return allocator.Pass(); | 226 return allocator.Pass(); |
227 } | 227 } |
228 | 228 |
229 CompositorImpl::CompositorImpl(CompositorClient* client, | 229 CompositorImpl::CompositorImpl(CompositorClient* client, |
230 gfx::NativeWindow root_window) | 230 gfx::NativeWindow root_window) |
231 : root_layer_(cc::Layer::Create(Compositor::LayerSettings())), | 231 : root_layer_(cc::Layer::Create(Compositor::LayerSettings())), |
| 232 resource_manager_(root_window), |
232 surface_id_allocator_(GetSurfaceManager() ? CreateSurfaceIdAllocator() | 233 surface_id_allocator_(GetSurfaceManager() ? CreateSurfaceIdAllocator() |
233 : nullptr), | 234 : nullptr), |
234 has_transparent_background_(false), | 235 has_transparent_background_(false), |
235 device_scale_factor_(1), | 236 device_scale_factor_(1), |
236 window_(NULL), | 237 window_(NULL), |
237 surface_id_(0), | 238 surface_id_(0), |
238 client_(client), | 239 client_(client), |
239 root_window_(root_window), | 240 root_window_(root_window), |
240 did_post_swapbuffers_(false), | 241 did_post_swapbuffers_(false), |
241 ignore_schedule_composite_(false), | 242 ignore_schedule_composite_(false), |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
798 | 799 |
799 void CompositorImpl::SetNeedsAnimate() { | 800 void CompositorImpl::SetNeedsAnimate() { |
800 needs_animate_ = true; | 801 needs_animate_ = true; |
801 if (!host_->visible()) | 802 if (!host_->visible()) |
802 return; | 803 return; |
803 | 804 |
804 host_->SetNeedsAnimate(); | 805 host_->SetNeedsAnimate(); |
805 } | 806 } |
806 | 807 |
807 } // namespace content | 808 } // namespace content |
OLD | NEW |