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.h

Issue 1956853002: [SPv2] Build trivial cc property trees in PaintArtifactCompositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix DCHECK in unit tests Created 4 years, 7 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 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 #ifndef WebLayerTreeViewImplForTesting_h 5 #ifndef WebLayerTreeViewImplForTesting_h
6 #define WebLayerTreeViewImplForTesting_h 6 #define WebLayerTreeViewImplForTesting_h
7 7
8 #include "cc/test/test_task_graph_runner.h" 8 #include "cc/test/test_task_graph_runner.h"
9 #include "cc/trees/layer_tree_host_client.h" 9 #include "cc/trees/layer_tree_host_client.h"
10 #include "cc/trees/layer_tree_host_single_thread_client.h" 10 #include "cc/trees/layer_tree_host_single_thread_client.h"
11 #include "public/platform/WebLayerTreeView.h" 11 #include "public/platform/WebLayerTreeView.h"
12 #include "wtf/PassOwnPtr.h" 12 #include "wtf/PassOwnPtr.h"
13 13
14 #include <memory> 14 #include <memory>
15 15
16 namespace cc { 16 namespace cc {
17 class LayerTreeHost; 17 class LayerTreeHost;
18 class LayerTreeSettings;
18 } 19 }
19 20
20 namespace blink { 21 namespace blink {
21 22
22 class WebCompositorAnimationTimeline; 23 class WebCompositorAnimationTimeline;
23 class WebLayer; 24 class WebLayer;
24 25
25 // Dummy WeblayerTeeView that does not support any actual compositing. 26 // Dummy WeblayerTeeView that does not support any actual compositing.
26 class WebLayerTreeViewImplForTesting : public blink::WebLayerTreeView, 27 class WebLayerTreeViewImplForTesting : public blink::WebLayerTreeView,
27 public cc::LayerTreeHostClient, 28 public cc::LayerTreeHostClient,
28 public cc::LayerTreeHostSingleThreadClient { 29 public cc::LayerTreeHostSingleThreadClient {
29 WTF_MAKE_NONCOPYABLE(WebLayerTreeViewImplForTesting); 30 WTF_MAKE_NONCOPYABLE(WebLayerTreeViewImplForTesting);
30 public: 31 public:
31 WebLayerTreeViewImplForTesting(); 32 WebLayerTreeViewImplForTesting();
33 explicit WebLayerTreeViewImplForTesting(const cc::LayerTreeSettings&);
32 ~WebLayerTreeViewImplForTesting() override; 34 ~WebLayerTreeViewImplForTesting() override;
33 35
36 static cc::LayerTreeSettings defaultLayerTreeSettings();
37 cc::LayerTreeHost* layerTreeHost() { return m_layerTreeHost.get(); }
38
34 // blink::WebLayerTreeView implementation. 39 // blink::WebLayerTreeView implementation.
35 void setRootLayer(const blink::WebLayer&) override; 40 void setRootLayer(const blink::WebLayer&) override;
36 void clearRootLayer() override; 41 void clearRootLayer() override;
37 void attachCompositorAnimationTimeline(cc::AnimationTimeline*) override; 42 void attachCompositorAnimationTimeline(cc::AnimationTimeline*) override;
38 void detachCompositorAnimationTimeline(cc::AnimationTimeline*) override; 43 void detachCompositorAnimationTimeline(cc::AnimationTimeline*) override;
39 virtual void setViewportSize(const blink::WebSize& unusedDeprecated, 44 virtual void setViewportSize(const blink::WebSize& unusedDeprecated,
40 const blink::WebSize& deviceViewportSize); 45 const blink::WebSize& deviceViewportSize);
41 void setViewportSize(const blink::WebSize&) override; 46 void setViewportSize(const blink::WebSize&) override;
42 void setDeviceScaleFactor(float) override; 47 void setDeviceScaleFactor(float) override;
43 void setBackgroundColor(blink::WebColor) override; 48 void setBackgroundColor(blink::WebColor) override;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 void DidAbortSwapBuffers() override {} 99 void DidAbortSwapBuffers() override {}
95 100
96 private: 101 private:
97 cc::TestTaskGraphRunner m_taskGraphRunner; 102 cc::TestTaskGraphRunner m_taskGraphRunner;
98 std::unique_ptr<cc::LayerTreeHost> m_layerTreeHost; 103 std::unique_ptr<cc::LayerTreeHost> m_layerTreeHost;
99 }; 104 };
100 105
101 } // namespace blink 106 } // namespace blink
102 107
103 #endif // WebLayerTreeViewImplForTesting_h 108 #endif // WebLayerTreeViewImplForTesting_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698