Chromium Code Reviews| 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 21 matching lines...) Expand all Loading... | |
| 32 namespace cc { | 32 namespace cc { |
| 33 | 33 |
| 34 LayerTreePixelTest::LayerTreePixelTest() | 34 LayerTreePixelTest::LayerTreePixelTest() |
| 35 : pixel_comparator_(new ExactPixelComparator(true)), | 35 : pixel_comparator_(new ExactPixelComparator(true)), |
| 36 test_type_(PIXEL_TEST_GL), | 36 test_type_(PIXEL_TEST_GL), |
| 37 pending_texture_mailbox_callbacks_(0) {} | 37 pending_texture_mailbox_callbacks_(0) {} |
| 38 | 38 |
| 39 LayerTreePixelTest::~LayerTreePixelTest() {} | 39 LayerTreePixelTest::~LayerTreePixelTest() {} |
| 40 | 40 |
| 41 std::unique_ptr<TestCompositorFrameSink> | 41 std::unique_ptr<TestCompositorFrameSink> |
| 42 LayerTreePixelTest::CreateCompositorFrameSink( | 42 LayerTreePixelTest::CreateCompositorFrameSink( |
| 43 scoped_refptr<ContextProvider>, | 43 const RendererSettings& renderer_settings, |
| 44 scoped_refptr<ContextProvider>) { | 44 scoped_refptr<ContextProvider>, |
| 45 scoped_refptr<ContextProvider>) { | |
| 45 scoped_refptr<TestInProcessContextProvider> compositor_context_provider; | 46 scoped_refptr<TestInProcessContextProvider> compositor_context_provider; |
| 46 scoped_refptr<TestInProcessContextProvider> worker_context_provider; | 47 scoped_refptr<TestInProcessContextProvider> worker_context_provider; |
| 47 if (test_type_ == PIXEL_TEST_GL) { | 48 if (test_type_ == PIXEL_TEST_GL) { |
| 48 compositor_context_provider = new TestInProcessContextProvider(nullptr); | 49 compositor_context_provider = new TestInProcessContextProvider(nullptr); |
| 49 worker_context_provider = | 50 worker_context_provider = |
| 50 new TestInProcessContextProvider(compositor_context_provider.get()); | 51 new TestInProcessContextProvider(compositor_context_provider.get()); |
| 51 } | 52 } |
| 52 constexpr bool disable_display_vsync = false; | 53 constexpr bool disable_display_vsync = false; |
| 53 bool synchronous_composite = | 54 bool synchronous_composite = |
| 54 !HasImplThread() && | 55 !HasImplThread() && |
| 55 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; | 56 !layer_tree_host()->GetSettings().single_thread_proxy_scheduler; |
| 56 auto delegating_output_surface = base::MakeUnique<TestCompositorFrameSink>( | 57 auto delegating_output_surface = base::MakeUnique<TestCompositorFrameSink>( |
| 57 compositor_context_provider, std::move(worker_context_provider), | 58 compositor_context_provider, std::move(worker_context_provider), |
| 58 shared_bitmap_manager(), gpu_memory_buffer_manager(), RendererSettings(), | 59 shared_bitmap_manager(), gpu_memory_buffer_manager(), RendererSettings(), |
|
danakj
2017/05/25 17:42:19
I forget, do tests fail if u use |renderer_setting
Alex Z.
2017/05/25 18:27:56
Yes, they fail. We decided to reestablish baseline
| |
| 59 ImplThreadTaskRunner(), synchronous_composite, disable_display_vsync); | 60 ImplThreadTaskRunner(), synchronous_composite, disable_display_vsync); |
| 60 delegating_output_surface->SetEnlargePassTextureAmount( | 61 delegating_output_surface->SetEnlargePassTextureAmount( |
| 61 enlarge_texture_amount_); | 62 enlarge_texture_amount_); |
| 62 return delegating_output_surface; | 63 return delegating_output_surface; |
| 63 } | 64 } |
| 64 | 65 |
| 65 std::unique_ptr<OutputSurface> | 66 std::unique_ptr<OutputSurface> |
| 66 LayerTreePixelTest::CreateDisplayOutputSurfaceOnThread( | 67 LayerTreePixelTest::CreateDisplayOutputSurfaceOnThread( |
| 67 scoped_refptr<ContextProvider> compositor_context_provider) { | 68 scoped_refptr<ContextProvider> compositor_context_provider) { |
| 68 std::unique_ptr<PixelTestOutputSurface> display_output_surface; | 69 std::unique_ptr<PixelTestOutputSurface> display_output_surface; |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 287 } | 288 } |
| 288 | 289 |
| 289 void LayerTreePixelTest::Finish() { | 290 void LayerTreePixelTest::Finish() { |
| 290 std::unique_ptr<gpu::GLInProcessContext> context = | 291 std::unique_ptr<gpu::GLInProcessContext> context = |
| 291 CreateTestInProcessContext(); | 292 CreateTestInProcessContext(); |
| 292 GLES2Interface* gl = context->GetImplementation(); | 293 GLES2Interface* gl = context->GetImplementation(); |
| 293 gl->Finish(); | 294 gl->Finish(); |
| 294 } | 295 } |
| 295 | 296 |
| 296 } // namespace cc | 297 } // namespace cc |
| OLD | NEW |