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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 void LayerTreePixelTest::EndTest() { | 133 void LayerTreePixelTest::EndTest() { |
134 // Drop TextureMailboxes on the main thread so that they can be cleaned up and | 134 // Drop TextureMailboxes on the main thread so that they can be cleaned up and |
135 // the pending callbacks will fire. | 135 // the pending callbacks will fire. |
136 for (size_t i = 0; i < texture_layers_.size(); ++i) { | 136 for (size_t i = 0; i < texture_layers_.size(); ++i) { |
137 texture_layers_[i]->SetTextureMailbox(TextureMailbox(), nullptr); | 137 texture_layers_[i]->SetTextureMailbox(TextureMailbox(), nullptr); |
138 } | 138 } |
139 | 139 |
140 TryEndTest(); | 140 TryEndTest(); |
141 } | 141 } |
142 | 142 |
| 143 void LayerTreePixelTest::InitializeSettings(LayerTreeSettings* settings) { |
| 144 settings->layer_transforms_should_scale_layer_contents = true; |
| 145 } |
| 146 |
143 void LayerTreePixelTest::TryEndTest() { | 147 void LayerTreePixelTest::TryEndTest() { |
144 if (!result_bitmap_) | 148 if (!result_bitmap_) |
145 return; | 149 return; |
146 if (pending_texture_mailbox_callbacks_) | 150 if (pending_texture_mailbox_callbacks_) |
147 return; | 151 return; |
148 LayerTreeTest::EndTest(); | 152 LayerTreeTest::EndTest(); |
149 } | 153 } |
150 | 154 |
151 scoped_refptr<SolidColorLayer> LayerTreePixelTest:: | 155 scoped_refptr<SolidColorLayer> LayerTreePixelTest:: |
152 CreateSolidColorLayerWithBorder( | 156 CreateSolidColorLayerWithBorder( |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 } | 290 } |
287 | 291 |
288 void LayerTreePixelTest::Finish() { | 292 void LayerTreePixelTest::Finish() { |
289 std::unique_ptr<gpu::GLInProcessContext> context = | 293 std::unique_ptr<gpu::GLInProcessContext> context = |
290 CreateTestInProcessContext(); | 294 CreateTestInProcessContext(); |
291 GLES2Interface* gl = context->GetImplementation(); | 295 GLES2Interface* gl = context->GetImplementation(); |
292 gl->Finish(); | 296 gl->Finish(); |
293 } | 297 } |
294 | 298 |
295 } // namespace cc | 299 } // namespace cc |
OLD | NEW |