OLD | NEW |
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 #include "cc/test/layer_tree_pixel_test.h" | 5 #include "cc/test/layer_tree_pixel_test.h" |
6 | 6 |
7 #include "base/path_service.h" | 7 #include "base/path_service.h" |
8 #include "cc/test/paths.h" | 8 #include "cc/test/paths.h" |
9 #include "cc/test/pixel_comparator.h" | 9 #include "cc/test/pixel_comparator.h" |
10 #include "cc/test/pixel_test_utils.h" | 10 #include "cc/test/pixel_test_utils.h" |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 layer->AddChild(border_bottom); | 111 layer->AddChild(border_bottom); |
112 return layer; | 112 return layer; |
113 } | 113 } |
114 | 114 |
115 void LayerTreePixelTest::RunPixelTest( | 115 void LayerTreePixelTest::RunPixelTest( |
116 scoped_refptr<Layer> content_root, | 116 scoped_refptr<Layer> content_root, |
117 base::FilePath file_name) { | 117 base::FilePath file_name) { |
118 content_root_ = content_root; | 118 content_root_ = content_root; |
119 readback_target_ = NULL; | 119 readback_target_ = NULL; |
120 ref_file_ = file_name; | 120 ref_file_ = file_name; |
121 RunTest(true); | 121 RunTest(true, false); |
122 } | 122 } |
123 | 123 |
124 void LayerTreePixelTest::RunPixelTestWithReadbackTarget( | 124 void LayerTreePixelTest::RunPixelTestWithReadbackTarget( |
125 scoped_refptr<Layer> content_root, | 125 scoped_refptr<Layer> content_root, |
126 Layer* target, | 126 Layer* target, |
127 base::FilePath file_name) { | 127 base::FilePath file_name) { |
128 content_root_ = content_root; | 128 content_root_ = content_root; |
129 readback_target_ = target; | 129 readback_target_ = target; |
130 ref_file_ = file_name; | 130 ref_file_ = file_name; |
131 RunTest(true); | 131 RunTest(true, false); |
132 } | 132 } |
133 | 133 |
134 void LayerTreePixelTest::SetupTree() { | 134 void LayerTreePixelTest::SetupTree() { |
135 scoped_refptr<Layer> root = Layer::Create(); | 135 scoped_refptr<Layer> root = Layer::Create(); |
136 root->SetBounds(content_root_->bounds()); | 136 root->SetBounds(content_root_->bounds()); |
137 root->AddChild(content_root_); | 137 root->AddChild(content_root_); |
138 layer_tree_host()->SetRootLayer(root); | 138 layer_tree_host()->SetRootLayer(root); |
139 LayerTreeTest::SetupTree(); | 139 LayerTreeTest::SetupTree(); |
140 } | 140 } |
141 | 141 |
142 } // namespace cc | 142 } // namespace cc |
OLD | NEW |