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

Side by Side Diff: cc/blink/web_content_layer_impl.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
« no previous file with comments | « cc/animation/animation_host_perftest.cc ('k') | cc/blink/web_external_texture_layer_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "cc/blink/web_content_layer_impl.h" 5 #include "cc/blink/web_content_layer_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "cc/base/switches.h" 10 #include "cc/base/switches.h"
11 #include "cc/blink/web_display_item_list_impl.h" 11 #include "cc/blink/web_display_item_list_impl.h"
12 #include "cc/layers/layer_settings.h"
13 #include "cc/layers/picture_layer.h" 12 #include "cc/layers/picture_layer.h"
14 #include "cc/playback/display_item_list_settings.h" 13 #include "cc/playback/display_item_list_settings.h"
15 #include "third_party/WebKit/public/platform/WebContentLayerClient.h" 14 #include "third_party/WebKit/public/platform/WebContentLayerClient.h"
16 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 15 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
17 #include "third_party/WebKit/public/platform/WebFloatRect.h" 16 #include "third_party/WebKit/public/platform/WebFloatRect.h"
18 #include "third_party/WebKit/public/platform/WebRect.h" 17 #include "third_party/WebKit/public/platform/WebRect.h"
19 #include "third_party/WebKit/public/platform/WebSize.h" 18 #include "third_party/WebKit/public/platform/WebSize.h"
20 #include "third_party/skia/include/utils/SkMatrix44.h" 19 #include "third_party/skia/include/utils/SkMatrix44.h"
21 20
22 using cc::PictureLayer; 21 using cc::PictureLayer;
(...skipping 22 matching lines...) Expand all
45 return blink::WebContentLayerClient::DisplayListPaintingDisabled; 44 return blink::WebContentLayerClient::DisplayListPaintingDisabled;
46 case cc::ContentLayerClient::SUBSEQUENCE_CACHING_DISABLED: 45 case cc::ContentLayerClient::SUBSEQUENCE_CACHING_DISABLED:
47 return blink::WebContentLayerClient::SubsequenceCachingDisabled; 46 return blink::WebContentLayerClient::SubsequenceCachingDisabled;
48 } 47 }
49 NOTREACHED(); 48 NOTREACHED();
50 return blink::WebContentLayerClient::PaintDefaultBehavior; 49 return blink::WebContentLayerClient::PaintDefaultBehavior;
51 } 50 }
52 51
53 WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client) 52 WebContentLayerImpl::WebContentLayerImpl(blink::WebContentLayerClient* client)
54 : client_(client) { 53 : client_(client) {
55 layer_ = make_scoped_ptr( 54 layer_ = make_scoped_ptr(new WebLayerImpl(PictureLayer::Create(this)));
56 new WebLayerImpl(PictureLayer::Create(cc::LayerSettings(), this)));
57 layer_->layer()->SetIsDrawable(true); 55 layer_->layer()->SetIsDrawable(true);
58 } 56 }
59 57
60 WebContentLayerImpl::~WebContentLayerImpl() { 58 WebContentLayerImpl::~WebContentLayerImpl() {
61 static_cast<PictureLayer*>(layer_->layer())->ClearClient(); 59 static_cast<PictureLayer*>(layer_->layer())->ClearClient();
62 } 60 }
63 61
64 blink::WebLayer* WebContentLayerImpl::layer() { 62 blink::WebLayer* WebContentLayerImpl::layer() {
65 return layer_.get(); 63 return layer_.get();
66 } 64 }
(...skipping 20 matching lines...) Expand all
87 85
88 bool WebContentLayerImpl::FillsBoundsCompletely() const { 86 bool WebContentLayerImpl::FillsBoundsCompletely() const {
89 return false; 87 return false;
90 } 88 }
91 89
92 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const { 90 size_t WebContentLayerImpl::GetApproximateUnsharedMemoryUsage() const {
93 return client_->approximateUnsharedMemoryUsage(); 91 return client_->approximateUnsharedMemoryUsage();
94 } 92 }
95 93
96 } // namespace cc_blink 94 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/animation/animation_host_perftest.cc ('k') | cc/blink/web_external_texture_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698