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

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

Issue 2216203002: Refactor MutatorHostClient from LayerTreeHost to LayerTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on another LTH refactor CL. Created 4 years, 4 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 | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/compositor.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 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 m_layerTreeHost->GetLayerTree()->SetRootLayer(static_cast<const cc_blink::We bLayerImpl*>(&root)->layer()); 70 m_layerTreeHost->GetLayerTree()->SetRootLayer(static_cast<const cc_blink::We bLayerImpl*>(&root)->layer());
71 } 71 }
72 72
73 void WebLayerTreeViewImplForTesting::clearRootLayer() 73 void WebLayerTreeViewImplForTesting::clearRootLayer()
74 { 74 {
75 m_layerTreeHost->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>()); 75 m_layerTreeHost->GetLayerTree()->SetRootLayer(scoped_refptr<cc::Layer>());
76 } 76 }
77 77
78 void WebLayerTreeViewImplForTesting::attachCompositorAnimationTimeline(cc::Anima tionTimeline* compositorTimeline) 78 void WebLayerTreeViewImplForTesting::attachCompositorAnimationTimeline(cc::Anima tionTimeline* compositorTimeline)
79 { 79 {
80 ASSERT(m_layerTreeHost->animation_host()); 80 DCHECK(m_layerTreeHost->GetLayerTree()->animation_host());
81 m_layerTreeHost->animation_host()->AddAnimationTimeline(compositorTimeline); 81 m_layerTreeHost->GetLayerTree()->animation_host()->AddAnimationTimeline(comp ositorTimeline);
82 } 82 }
83 83
84 void WebLayerTreeViewImplForTesting::detachCompositorAnimationTimeline(cc::Anima tionTimeline* compositorTimeline) 84 void WebLayerTreeViewImplForTesting::detachCompositorAnimationTimeline(cc::Anima tionTimeline* compositorTimeline)
85 { 85 {
86 ASSERT(m_layerTreeHost->animation_host()); 86 DCHECK(m_layerTreeHost->GetLayerTree()->animation_host());
87 m_layerTreeHost->animation_host()->RemoveAnimationTimeline(compositorTimelin e); 87 m_layerTreeHost->GetLayerTree()->animation_host()->RemoveAnimationTimeline(c ompositorTimeline);
88 } 88 }
89 89
90 void WebLayerTreeViewImplForTesting::setViewportSize(const WebSize& unusedDeprec ated, const WebSize& deviceViewportSize) 90 void WebLayerTreeViewImplForTesting::setViewportSize(const WebSize& unusedDeprec ated, const WebSize& deviceViewportSize)
91 { 91 {
92 gfx::Size gfxSize(std::max(0, deviceViewportSize.width), std::max(0, deviceV iewportSize.height)); 92 gfx::Size gfxSize(std::max(0, deviceViewportSize.width), std::max(0, deviceV iewportSize.height));
93 m_layerTreeHost->GetLayerTree()->SetViewportSize(gfxSize); 93 m_layerTreeHost->GetLayerTree()->SetViewportSize(gfxSize);
94 } 94 }
95 95
96 void WebLayerTreeViewImplForTesting::setViewportSize(const WebSize& deviceViewpo rtSize) 96 void WebLayerTreeViewImplForTesting::setViewportSize(const WebSize& deviceViewpo rtSize)
97 { 97 {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 { 228 {
229 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers ); 229 m_layerTreeHost->GetLayerTree()->SetHaveScrollEventHandlers(haveEentHandlers );
230 } 230 }
231 231
232 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const 232 bool WebLayerTreeViewImplForTesting::haveScrollEventHandlers() const
233 { 233 {
234 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers(); 234 return m_layerTreeHost->GetLayerTree()->have_scroll_event_handlers();
235 } 235 }
236 236
237 } // namespace blink 237 } // namespace blink
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698