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

Unified Diff: cc/trees/layer_tree_host_unittest_picture.cc

Issue 640063010: cc: Don't swap PictureLayerTilingSet on activate. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: noswap: rebase Created 6 years 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 | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest_picture.cc
diff --git a/cc/trees/layer_tree_host_unittest_picture.cc b/cc/trees/layer_tree_host_unittest_picture.cc
index c82eb76f155f3b2898fa8b7d8f654db8051bd42f..4f49bb3a72d64088ebd24180f1b41eb362bbe2a7 100644
--- a/cc/trees/layer_tree_host_unittest_picture.cc
+++ b/cc/trees/layer_tree_host_unittest_picture.cc
@@ -16,20 +16,25 @@ namespace {
// These tests deal with picture layers.
class LayerTreeHostPictureTest : public LayerTreeTest {
protected:
- void InitializeSettings(LayerTreeSettings* settings) override {
- // PictureLayer can only be used with impl side painting enabled.
- settings->impl_side_painting = true;
+ void SetupTreeWithSinglePictureLayer(const gfx::Size& size) {
+ scoped_refptr<Layer> root = Layer::Create();
+ root->SetBounds(size);
+
+ root_picture_layer_ = FakePictureLayer::Create(&client_);
+ root_picture_layer_->SetBounds(size);
+ root->AddChild(root_picture_layer_);
+
+ layer_tree_host()->SetRootLayer(root);
}
+
+ scoped_refptr<FakePictureLayer> root_picture_layer_;
+ FakeContentLayerClient client_;
};
class LayerTreeHostPictureTestTwinLayer
: public LayerTreeHostPictureTest {
void SetupTree() override {
- LayerTreeHostPictureTest::SetupTree();
-
- scoped_refptr<FakePictureLayer> picture =
- FakePictureLayer::Create(&client_);
- layer_tree_host()->root_layer()->AddChild(picture);
+ SetupTreeWithSinglePictureLayer(gfx::Size(1, 1));
}
void BeginTest() override {
@@ -117,11 +122,10 @@ class LayerTreeHostPictureTestTwinLayer
void AfterTest() override {}
- FakeContentLayerClient client_;
int activates_;
};
-MULTI_THREAD_TEST_F(LayerTreeHostPictureTestTwinLayer);
+SINGLE_AND_MULTI_THREAD_IMPL_TEST_F(LayerTreeHostPictureTestTwinLayer);
class LayerTreeHostPictureTestResizeViewportWithGpuRaster
: public LayerTreeHostPictureTest {
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698