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::CommitCompleteOnThread(LayerTreeHostImpl* impl) { | 66 void LayerTreePixelTest::WillActivateTreeOnThread(LayerTreeHostImpl* impl) { |
67 LayerTreeImpl* commit_tree = | 67 if (impl->sync_tree()->source_frame_number() != 0) |
68 impl->pending_tree() ? impl->pending_tree() : impl->active_tree(); | |
69 if (commit_tree->source_frame_number() != 0) | |
70 return; | 68 return; |
71 | 69 |
72 DirectRenderer* renderer = static_cast<DirectRenderer*>(impl->renderer()); | 70 DirectRenderer* renderer = static_cast<DirectRenderer*>(impl->renderer()); |
73 renderer->SetEnlargePassTextureAmountForTesting(enlarge_texture_amount_); | 71 renderer->SetEnlargePassTextureAmountForTesting(enlarge_texture_amount_); |
74 | 72 |
75 gfx::Rect viewport = impl->DeviceViewport(); | 73 gfx::Rect viewport = impl->DeviceViewport(); |
76 // The viewport has a 0,0 origin without external influence. | 74 // The viewport has a 0,0 origin without external influence. |
77 EXPECT_EQ(gfx::Point().ToString(), viewport.origin().ToString()); | 75 EXPECT_EQ(gfx::Point().ToString(), viewport.origin().ToString()); |
78 // Be that influence! | 76 // Be that influence! |
79 viewport += gfx::Vector2d(20, 10); | 77 viewport += gfx::Vector2d(20, 10); |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 374 |
377 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); | 375 *texture_mailbox = TextureMailbox(mailbox, GL_TEXTURE_2D, sync_point); |
378 *release_callback = SingleReleaseCallback::Create( | 376 *release_callback = SingleReleaseCallback::Create( |
379 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, | 377 base::Bind(&LayerTreePixelTest::ReleaseTextureMailbox, |
380 base::Unretained(this), | 378 base::Unretained(this), |
381 base::Passed(&context), | 379 base::Passed(&context), |
382 texture_id)); | 380 texture_id)); |
383 } | 381 } |
384 | 382 |
385 } // namespace cc | 383 } // namespace cc |
OLD | NEW |