commit | e9a093610cb854566df01b7fe30727d966910fb9 | [log] [tgz] |
---|---|---|
author | Xianzhu Wang <wangxianzhu@chromium.org> | Wed Aug 21 20:37:53 2019 |
committer | Commit Bot <commit-bot@chromium.org> | Wed Aug 21 20:37:53 2019 |
tree | 0a5844d738e7c9af55f74cd1d07c9956be194df6 | |
parent | f893a28a0207cecec024822e64092fc6d44da56c [diff] |
Refactor cc unittests in layer list mode When in layer list mode: - Initialize root properties in LayerTreeTest::SetupTree() - Provide LayerTreeTest::SetupViewport() (previously global function CreateVirtualViewportLayers in layer_tree_test.h). A test needing viewport layers and properties can call it from its SetupTree(). - Tests setup their layers and properties in SetupTree(). property_tree_test_utils.h provides helper functions for convenience of tests to setup properties in the following way: scoped_refptr<Layer> layer = Layer::Create(); ... InheritProperties(layer.get(), parent_layer_for_properties); auto& transform_node = CreateTransform(layer.get()); transform_node.xxx = // customize the transform node root_layer->AddChild(layer); This changes the procedure of pixel tests in layer list mode when setting up layers and properties. Previously we setup property tree outside of SetupTree() before BeginTest() when layer_tree_host() was not created yet, causing many inconveninces. Now we always setup layers and properties in SetupTree(). Bug: 994361 Change-Id: I2b3c0a47037c685618372bdff389551e09b62634 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1761642 Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org> Reviewed-by: Philip Rogers <pdr@chromium.org> Reviewed-by: enne <enne@chromium.org> Cr-Commit-Position: refs/heads/master@{#689149}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .