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

Side by Side Diff: third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp

Issue 2331983002: cc: Make LayerTreeHost a protected Layer member. (Closed)
Patch Set: settings Created 4 years, 3 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 | « third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "platform/testing/WebLayerTreeViewImplForTesting.h" 5 #include "platform/testing/WebLayerTreeViewImplForTesting.h"
6 6
7 #include "base/threading/thread_task_runner_handle.h" 7 #include "base/threading/thread_task_runner_handle.h"
8 #include "cc/animation/animation_host.h" 8 #include "cc/animation/animation_host.h"
9 #include "cc/animation/animation_timeline.h" 9 #include "cc/animation/animation_timeline.h"
10 #include "cc/blink/web_layer_impl.h" 10 #include "cc/blink/web_layer_impl.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // For web contents, layer transforms should scale up the contents of layers 44 // For web contents, layer transforms should scale up the contents of layers
45 // to keep content always crisp when possible. 45 // to keep content always crisp when possible.
46 settings.layer_transforms_should_scale_layer_contents = true; 46 settings.layer_transforms_should_scale_layer_contents = true;
47 47
48 return settings; 48 return settings;
49 } 49 }
50 50
51 bool WebLayerTreeViewImplForTesting::hasLayer(const WebLayer& layer) 51 bool WebLayerTreeViewImplForTesting::hasLayer(const WebLayer& layer)
52 { 52 {
53 return layer.ccLayer()->layer_tree_host() == m_layerTreeHost.get(); 53 return layer.ccLayer()->GetLayerTreeHostForTesting() == m_layerTreeHost.get( );
54 } 54 }
55 55
56 void WebLayerTreeViewImplForTesting::setRootLayer(const blink::WebLayer& root) 56 void WebLayerTreeViewImplForTesting::setRootLayer(const blink::WebLayer& root)
57 { 57 {
58 m_layerTreeHost->GetLayerTree()->SetRootLayer(static_cast<const cc_blink::We bLayerImpl*>(&root)->layer()); 58 m_layerTreeHost->GetLayerTree()->SetRootLayer(static_cast<const cc_blink::We bLayerImpl*>(&root)->layer());
59 } 59 }
60 60
61 void WebLayerTreeViewImplForTesting::clearRootLayer() 61 void WebLayerTreeViewImplForTesting::clearRootLayer()
62 { 62 {
63 m_layerTreeHost->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>()); 63 m_layerTreeHost->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>());
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 { 216 {
217 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers ); 217 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers );
218 } 218 }
219 219
220 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const 220 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const
221 { 221 {
222 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); 222 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers();
223 } 223 }
224 224
225 } // namespace blink 225 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698