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

Side by Side Diff: chrome/browser/android/compositor/compositor_view.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/android/compositor/compositor_view.h" 5 #include "chrome/browser/android/compositor/compositor_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include <android/bitmap.h> 9 #include <android/bitmap.h>
10 #include <android/native_window_jni.h> 10 #include <android/native_window_jni.h>
11 11
12 #include "base/android/build_info.h" 12 #include "base/android/build_info.h"
13 #include "base/android/jni_android.h" 13 #include "base/android/jni_android.h"
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/command_line.h" 15 #include "base/command_line.h"
16 #include "base/id_map.h" 16 #include "base/id_map.h"
17 #include "base/memory/scoped_ptr.h" 17 #include "base/memory/scoped_ptr.h"
18 #include "base/rand_util.h" 18 #include "base/rand_util.h"
19 #include "base/trace_event/trace_event.h" 19 #include "base/trace_event/trace_event.h"
20 #include "cc/layers/layer.h" 20 #include "cc/layers/layer.h"
21 #include "cc/layers/layer_lists.h" 21 #include "cc/layers/layer_lists.h"
22 #include "cc/layers/layer_settings.h"
23 #include "cc/layers/solid_color_layer.h" 22 #include "cc/layers/solid_color_layer.h"
24 #include "cc/layers/texture_layer.h" 23 #include "cc/layers/texture_layer.h"
25 #include "chrome/browser/android/compositor/layer/toolbar_layer.h" 24 #include "chrome/browser/android/compositor/layer/toolbar_layer.h"
26 #include "chrome/browser/android/compositor/layer_title_cache.h" 25 #include "chrome/browser/android/compositor/layer_title_cache.h"
27 #include "chrome/browser/android/compositor/scene_layer/scene_layer.h" 26 #include "chrome/browser/android/compositor/scene_layer/scene_layer.h"
28 #include "chrome/browser/android/compositor/tab_content_manager.h" 27 #include "chrome/browser/android/compositor/tab_content_manager.h"
29 #include "content/public/browser/android/compositor.h" 28 #include "content/public/browser/android/compositor.h"
30 #include "content/public/browser/android/content_view_core.h" 29 #include "content/public/browser/android/content_view_core.h"
31 #include "content/public/browser/child_process_data.h" 30 #include "content/public/browser/child_process_data.h"
32 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 75
77 CompositorView::CompositorView(JNIEnv* env, 76 CompositorView::CompositorView(JNIEnv* env,
78 jobject obj, 77 jobject obj,
79 jint empty_background_color, 78 jint empty_background_color,
80 jboolean low_mem_device, 79 jboolean low_mem_device,
81 ui::WindowAndroid* window_android, 80 ui::WindowAndroid* window_android,
82 LayerTitleCache* layer_title_cache, 81 LayerTitleCache* layer_title_cache,
83 TabContentManager* tab_content_manager) 82 TabContentManager* tab_content_manager)
84 : layer_title_cache_(layer_title_cache), 83 : layer_title_cache_(layer_title_cache),
85 tab_content_manager_(tab_content_manager), 84 tab_content_manager_(tab_content_manager),
86 root_layer_( 85 root_layer_(cc::SolidColorLayer::Create()),
87 cc::SolidColorLayer::Create(cc::LayerSettings())),
88 scene_layer_(nullptr), 86 scene_layer_(nullptr),
89 current_surface_format_(0), 87 current_surface_format_(0),
90 content_width_(0), 88 content_width_(0),
91 content_height_(0), 89 content_height_(0),
92 overlay_video_mode_(false), 90 overlay_video_mode_(false),
93 empty_background_color_(empty_background_color), 91 empty_background_color_(empty_background_color),
94 weak_factory_(this) { 92 weak_factory_(this) {
95 content::BrowserChildProcessObserver::Add(this); 93 content::BrowserChildProcessObserver::Add(this);
96 obj_.Reset(env, obj); 94 obj_.Reset(env, obj);
97 compositor_.reset(content::Compositor::Create(this, window_android)); 95 compositor_.reset(content::Compositor::Create(this, window_android));
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 // through here but through BrowserChildProcessHostDisconnected() instead. 317 // through here but through BrowserChildProcessHostDisconnected() instead.
320 } 318 }
321 319
322 // Register native methods 320 // Register native methods
323 bool RegisterCompositorView(JNIEnv* env) { 321 bool RegisterCompositorView(JNIEnv* env) {
324 return RegisterNativesImpl(env); 322 return RegisterNativesImpl(env);
325 } 323 }
326 324
327 } // namespace android 325 } // namespace android
328 } // namespace chrome 326 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698