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

Unified Diff: third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp

Issue 2124893002: [SPv2] Use foreign layer support to enable composited video. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge with master, integration test Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
diff --git a/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp b/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
index b840999ca895ac97e1c2c09d3c82c9db17c5094e..287d11be6d9178d5f7f7111d493b59d82be353f9 100644
--- a/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
+++ b/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
@@ -22,6 +22,18 @@ WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting()
{
}
+static cc::LayerTreeSettings settingsForLayerListPolicy(WebLayerTreeViewImplForTesting::LayerListPolicy policy)
+{
+ cc::LayerTreeSettings settings = WebLayerTreeViewImplForTesting::defaultLayerTreeSettings();
+ settings.use_layer_lists = policy == WebLayerTreeViewImplForTesting::UseLayerLists;
+ return settings;
+}
+
+WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting(LayerListPolicy policy)
+ : WebLayerTreeViewImplForTesting(settingsForLayerListPolicy(policy))
+{
+}
+
WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting(const cc::LayerTreeSettings& settings)
{
cc::LayerTreeHost::InitParams params;
@@ -48,6 +60,11 @@ cc::LayerTreeSettings WebLayerTreeViewImplForTesting::defaultLayerTreeSettings()
return settings;
}
+bool WebLayerTreeViewImplForTesting::hasLayer(const WebLayer& layer)
+{
+ return layer.ccLayer()->layer_tree_host() == m_layerTreeHost.get();
+}
+
void WebLayerTreeViewImplForTesting::setRootLayer(const blink::WebLayer& root)
{
m_layerTreeHost->SetRootLayer(static_cast<const cc_blink::WebLayerImpl*>(&root)->layer());
« no previous file with comments | « third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698