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

Side by Side Diff: chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.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/scene_layer/tab_strip_scene_layer.h" 5 #include "chrome/browser/android/compositor/scene_layer/tab_strip_scene_layer.h"
6 6
7 #include "base/android/jni_android.h" 7 #include "base/android/jni_android.h"
8 #include "cc/layers/layer_settings.h"
9 #include "cc/resources/scoped_ui_resource.h" 8 #include "cc/resources/scoped_ui_resource.h"
10 #include "chrome/browser/android/compositor/layer/tab_handle_layer.h" 9 #include "chrome/browser/android/compositor/layer/tab_handle_layer.h"
11 #include "chrome/browser/android/compositor/layer_title_cache.h" 10 #include "chrome/browser/android/compositor/layer_title_cache.h"
12 #include "content/public/browser/android/compositor.h" 11 #include "content/public/browser/android/compositor.h"
13 #include "jni/TabStripSceneLayer_jni.h" 12 #include "jni/TabStripSceneLayer_jni.h"
14 #include "ui/android/resources/resource_manager_impl.h" 13 #include "ui/android/resources/resource_manager_impl.h"
15 14
16 namespace chrome { 15 namespace chrome {
17 namespace android { 16 namespace android {
18 17
19 TabStripSceneLayer::TabStripSceneLayer(JNIEnv* env, jobject jobj) 18 TabStripSceneLayer::TabStripSceneLayer(JNIEnv* env, jobject jobj)
20 : SceneLayer(env, jobj), 19 : SceneLayer(env, jobj),
21 tab_strip_layer_( 20 tab_strip_layer_(cc::SolidColorLayer::Create()),
22 cc::SolidColorLayer::Create(cc::LayerSettings())), 21 new_tab_button_(cc::UIResourceLayer::Create()),
23 new_tab_button_( 22 model_selector_button_(cc::UIResourceLayer::Create()),
24 cc::UIResourceLayer::Create(cc::LayerSettings())),
25 model_selector_button_(
26 cc::UIResourceLayer::Create(cc::LayerSettings())),
27 background_tab_brightness_(1.f), 23 background_tab_brightness_(1.f),
28 brightness_(1.f), 24 brightness_(1.f),
29 write_index_(0), 25 write_index_(0),
30 content_tree_(nullptr) { 26 content_tree_(nullptr) {
31 new_tab_button_->SetIsDrawable(true); 27 new_tab_button_->SetIsDrawable(true);
32 model_selector_button_->SetIsDrawable(true); 28 model_selector_button_->SetIsDrawable(true);
33 tab_strip_layer_->SetBackgroundColor(SK_ColorBLACK); 29 tab_strip_layer_->SetBackgroundColor(SK_ColorBLACK);
34 tab_strip_layer_->SetIsDrawable(true); 30 tab_strip_layer_->SetIsDrawable(true);
35 tab_strip_layer_->AddChild(new_tab_button_); 31 tab_strip_layer_->AddChild(new_tab_button_);
36 tab_strip_layer_->AddChild(model_selector_button_); 32 tab_strip_layer_->AddChild(model_selector_button_);
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 TabStripSceneLayer* scene_layer = new TabStripSceneLayer(env, jobj); 224 TabStripSceneLayer* scene_layer = new TabStripSceneLayer(env, jobj);
229 return reinterpret_cast<intptr_t>(scene_layer); 225 return reinterpret_cast<intptr_t>(scene_layer);
230 } 226 }
231 227
232 bool RegisterTabStripSceneLayer(JNIEnv* env) { 228 bool RegisterTabStripSceneLayer(JNIEnv* env) {
233 return RegisterNativesImpl(env); 229 return RegisterNativesImpl(env);
234 } 230 }
235 231
236 } // namespace android 232 } // namespace android
237 } // namespace chrome 233 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/android/compositor/scene_layer/tab_list_scene_layer.cc ('k') | chrome/browser/android/tab_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698