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

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

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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
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 #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 #include <stdint.h> 9 #include <stdint.h>
10 #include <utility> 10 #include <utility>
(...skipping 11 matching lines...) Expand all
22 #include "base/single_thread_task_runner.h" 22 #include "base/single_thread_task_runner.h"
23 #include "base/synchronization/lock.h" 23 #include "base/synchronization/lock.h"
24 #include "base/sys_info.h" 24 #include "base/sys_info.h"
25 #include "base/thread_task_runner_handle.h" 25 #include "base/thread_task_runner_handle.h"
26 #include "base/threading/simple_thread.h" 26 #include "base/threading/simple_thread.h"
27 #include "base/threading/thread.h" 27 #include "base/threading/thread.h"
28 #include "base/threading/thread_checker.h" 28 #include "base/threading/thread_checker.h"
29 #include "cc/base/switches.h" 29 #include "cc/base/switches.h"
30 #include "cc/input/input_handler.h" 30 #include "cc/input/input_handler.h"
31 #include "cc/layers/layer.h" 31 #include "cc/layers/layer.h"
32 #include "cc/layers/layer_settings.h"
33 #include "cc/output/compositor_frame.h" 32 #include "cc/output/compositor_frame.h"
34 #include "cc/output/context_provider.h" 33 #include "cc/output/context_provider.h"
35 #include "cc/output/output_surface.h" 34 #include "cc/output/output_surface.h"
36 #include "cc/output/output_surface_client.h" 35 #include "cc/output/output_surface_client.h"
37 #include "cc/raster/single_thread_task_graph_runner.h" 36 #include "cc/raster/single_thread_task_graph_runner.h"
38 #include "cc/scheduler/begin_frame_source.h" 37 #include "cc/scheduler/begin_frame_source.h"
39 #include "cc/surfaces/onscreen_display_client.h" 38 #include "cc/surfaces/onscreen_display_client.h"
40 #include "cc/surfaces/surface_display_output_surface.h" 39 #include "cc/surfaces/surface_display_output_surface.h"
41 #include "cc/surfaces/surface_id_allocator.h" 40 #include "cc/surfaces/surface_id_allocator.h"
42 #include "cc/surfaces/surface_manager.h" 41 #include "cc/surfaces/surface_manager.h"
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 scoped_ptr<cc::SurfaceIdAllocator> allocator( 235 scoped_ptr<cc::SurfaceIdAllocator> allocator(
237 new cc::SurfaceIdAllocator(++g_surface_id_namespace)); 236 new cc::SurfaceIdAllocator(++g_surface_id_namespace));
238 cc::SurfaceManager* manager = GetSurfaceManager(); 237 cc::SurfaceManager* manager = GetSurfaceManager();
239 DCHECK(manager); 238 DCHECK(manager);
240 allocator->RegisterSurfaceIdNamespace(manager); 239 allocator->RegisterSurfaceIdNamespace(manager);
241 return allocator; 240 return allocator;
242 } 241 }
243 242
244 CompositorImpl::CompositorImpl(CompositorClient* client, 243 CompositorImpl::CompositorImpl(CompositorClient* client,
245 gfx::NativeWindow root_window) 244 gfx::NativeWindow root_window)
246 : root_layer_(cc::Layer::Create(cc::LayerSettings())), 245 : root_layer_(cc::Layer::Create()),
247 resource_manager_(root_window), 246 resource_manager_(root_window),
248 surface_id_allocator_(CreateSurfaceIdAllocator()), 247 surface_id_allocator_(CreateSurfaceIdAllocator()),
249 has_transparent_background_(false), 248 has_transparent_background_(false),
250 device_scale_factor_(1), 249 device_scale_factor_(1),
251 window_(NULL), 250 window_(NULL),
252 surface_id_(0), 251 surface_id_(0),
253 client_(client), 252 client_(client),
254 root_window_(root_window), 253 root_window_(root_window),
255 needs_animate_(false), 254 needs_animate_(false),
256 pending_swapbuffers_(0U), 255 pending_swapbuffers_(0U),
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 626
628 void CompositorImpl::SetNeedsAnimate() { 627 void CompositorImpl::SetNeedsAnimate() {
629 needs_animate_ = true; 628 needs_animate_ = true;
630 if (!host_->visible()) 629 if (!host_->visible())
631 return; 630 return;
632 631
633 host_->SetNeedsAnimate(); 632 host_->SetNeedsAnimate();
634 } 633 }
635 634
636 } // namespace content 635 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/renderer_host/render_widget_host_view_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698