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

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

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 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 288bc5d1345ddbc2e680a90f05fe85fae53e0e85..42803967b72775865d970f308065a354bf7a0843 100644
--- a/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
+++ b/third_party/WebKit/Source/platform/testing/WebLayerTreeViewImplForTesting.cpp
@@ -18,13 +18,12 @@
namespace blink {
WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting()
+ : WebLayerTreeViewImplForTesting(defaultLayerTreeSettings())
{
- cc::LayerTreeSettings settings;
-
- // For web contents, layer transforms should scale up the contents of layers
- // to keep content always crisp when possible.
- settings.layer_transforms_should_scale_layer_contents = true;
+}
+WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting(const cc::LayerTreeSettings& settings)
+{
cc::LayerTreeHost::InitParams params;
params.client = this;
params.settings = &settings;
@@ -36,6 +35,18 @@ WebLayerTreeViewImplForTesting::WebLayerTreeViewImplForTesting()
WebLayerTreeViewImplForTesting::~WebLayerTreeViewImplForTesting() {}
+// static
+cc::LayerTreeSettings WebLayerTreeViewImplForTesting::defaultLayerTreeSettings()
+{
+ cc::LayerTreeSettings settings;
+
+ // For web contents, layer transforms should scale up the contents of layers
+ // to keep content always crisp when possible.
+ settings.layer_transforms_should_scale_layer_contents = true;
+
+ return settings;
+}
+
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