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

Side by Side Diff: chrome/browser/android/compositor/layer/content_layer.cc

Issue 1747783002: CC Animation: Erase old animation system in Android Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/layer/content_layer.h" 5 #include "chrome/browser/android/compositor/layer/content_layer.h"
6 6
7 #include "base/lazy_instance.h" 7 #include "base/lazy_instance.h"
8 #include "cc/layers/layer.h" 8 #include "cc/layers/layer.h"
9 #include "cc/layers/layer_lists.h" 9 #include "cc/layers/layer_lists.h"
10 #include "cc/layers/layer_settings.h"
10 #include "chrome/browser/android/compositor/layer/thumbnail_layer.h" 11 #include "chrome/browser/android/compositor/layer/thumbnail_layer.h"
11 #include "chrome/browser/android/compositor/tab_content_manager.h" 12 #include "chrome/browser/android/compositor/tab_content_manager.h"
12 #include "content/public/browser/android/compositor.h" 13 #include "content/public/browser/android/compositor.h"
13 #include "ui/gfx/geometry/size.h" 14 #include "ui/gfx/geometry/size.h"
14 15
15 namespace chrome { 16 namespace chrome {
16 namespace android { 17 namespace android {
17 18
18 // static 19 // static
19 scoped_refptr<ContentLayer> ContentLayer::Create( 20 scoped_refptr<ContentLayer> ContentLayer::Create(
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 if (content_attached_ && DoesLeafDrawContents(layer()->children()[0])) 139 if (content_attached_ && DoesLeafDrawContents(layer()->children()[0]))
139 return layer_->children()[0]->bounds(); 140 return layer_->children()[0]->bounds();
140 return gfx::Size(0, 0); 141 return gfx::Size(0, 0);
141 } 142 }
142 143
143 scoped_refptr<cc::Layer> ContentLayer::layer() { 144 scoped_refptr<cc::Layer> ContentLayer::layer() {
144 return layer_; 145 return layer_;
145 } 146 }
146 147
147 ContentLayer::ContentLayer(TabContentManager* tab_content_manager) 148 ContentLayer::ContentLayer(TabContentManager* tab_content_manager)
148 : layer_(cc::Layer::Create(content::Compositor::LayerSettings())), 149 : layer_(cc::Layer::Create(cc::LayerSettings())),
149 content_attached_(false), 150 content_attached_(false),
150 static_attached_(false), 151 static_attached_(false),
151 tab_content_manager_(tab_content_manager) { 152 tab_content_manager_(tab_content_manager) {
152 } 153 }
153 154
154 ContentLayer::~ContentLayer() { 155 ContentLayer::~ContentLayer() {
155 } 156 }
156 157
157 void ContentLayer::SetContentLayer(scoped_refptr<cc::Layer> layer) { 158 void ContentLayer::SetContentLayer(scoped_refptr<cc::Layer> layer) {
158 // Check indices 159 // Check indices
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 220
220 void ContentLayer::ClipStaticLayer(scoped_refptr<ThumbnailLayer> static_layer, 221 void ContentLayer::ClipStaticLayer(scoped_refptr<ThumbnailLayer> static_layer,
221 gfx::Rect clipping) { 222 gfx::Rect clipping) {
222 if (!static_layer.get()) 223 if (!static_layer.get())
223 return; 224 return;
224 static_layer->Clip(clipping); 225 static_layer->Clip(clipping);
225 } 226 }
226 227
227 } // namespace android 228 } // namespace android
228 } // namespace chrome 229 } // namespace chrome
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698