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/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "cc/base/switches.h" | 9 #include "cc/base/switches.h" |
10 #include "cc/layers/solid_color_layer.h" | 10 #include "cc/layers/solid_color_layer.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 new TestInProcessContextProvider, new TestInProcessContextProvider, | 56 new TestInProcessContextProvider, new TestInProcessContextProvider, |
57 flipped_output_surface)); | 57 flipped_output_surface)); |
58 break; | 58 break; |
59 } | 59 } |
60 } | 60 } |
61 | 61 |
62 output_surface->set_surface_expansion_size(surface_expansion_size); | 62 output_surface->set_surface_expansion_size(surface_expansion_size); |
63 return output_surface.Pass(); | 63 return output_surface.Pass(); |
64 } | 64 } |
65 | 65 |
66 void LayerTreePixelTest::WillActivateTreeOnThread(LayerTreeHostImpl* impl) { | 66 void LayerTreePixelTest::CommitCompleteOnThread(LayerTreeHostImpl* impl) { |
67 if (impl->sync_tree()->source_frame_number() != 0) | 67 LayerTreeImpl* commit_tree = |
| 68 impl->pending_tree() ? impl->pending_tree() : impl->active_tree(); |
| 69 if (commit_tree->source_frame_number() != 0) |
68 return; | 70 return; |
69 | 71 |
70 DirectRenderer* renderer = static_cast<DirectRenderer*>(impl->renderer()); | 72 DirectRenderer* renderer = static_cast<DirectRenderer*>(impl->renderer()); |
71 renderer->SetEnlargePassTextureAmountForTesting(enlarge_texture_amount_); | 73 renderer->SetEnlargePassTextureAmountForTesting(enlarge_texture_amount_); |
72 | 74 |
73 gfx::Rect viewport = impl->DeviceViewport(); | 75 gfx::Rect viewport = impl->DeviceViewport(); |
74 // The viewport has a 0,0 origin without external influence. | 76 // The viewport has a 0,0 origin without external influence. |
75 EXPECT_EQ(gfx::Point().ToString(), viewport.origin().ToString()); | 77 EXPECT_EQ(gfx::Point().ToString(), viewport.origin().ToString()); |
76 // Be that influence! | 78 // Be that influence! |
77 viewport += gfx::Vector2d(20, 10); | 79 viewport += gfx::Vector2d(20, 10); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 | 376 |
375 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); | 377 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); |
376 *release_callback = SingleReleaseCallback::Create( | 378 *release_callback = SingleReleaseCallback::Create( |
377 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, | 379 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, |
378 base::Unretained(this), | 380 base::Unretained(this), |
379 base::Passed(&context), | 381 base::Passed(&context), |
380 texture_id)); | 382 texture_id)); |
381 } | 383 } |
382 | 384 |
383 } // namespace cc | 385 } // namespace cc |
OLD | NEW |