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/pixel_test.h" | 5 #include "cc/test/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 "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/threading/thread_task_runner_handle.h" | 10 #include "base/threading/thread_task_runner_handle.h" |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 115 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
116 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests)) | 116 if (cmd->HasSwitch(switches::kCCRebaselinePixeltests)) |
117 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true); | 117 return WritePNGFile(*result_bitmap_, test_data_dir.Append(ref_file), true); |
118 | 118 |
119 return MatchesPNGFile( | 119 return MatchesPNGFile( |
120 *result_bitmap_, test_data_dir.Append(ref_file), comparator); | 120 *result_bitmap_, test_data_dir.Append(ref_file), comparator); |
121 } | 121 } |
122 | 122 |
123 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend, | 123 void PixelTest::SetUpGLRenderer(bool use_skia_gpu_backend, |
124 bool flipped_output_surface) { | 124 bool flipped_output_surface) { |
125 enable_pixel_output_.reset(new gfx::DisableNullDrawGLBindings); | 125 enable_pixel_output_.reset(new gl::DisableNullDrawGLBindings); |
126 | 126 |
127 scoped_refptr<TestInProcessContextProvider> compositor( | 127 scoped_refptr<TestInProcessContextProvider> compositor( |
128 new TestInProcessContextProvider(nullptr)); | 128 new TestInProcessContextProvider(nullptr)); |
129 scoped_refptr<TestInProcessContextProvider> worker( | 129 scoped_refptr<TestInProcessContextProvider> worker( |
130 new TestInProcessContextProvider(compositor.get())); | 130 new TestInProcessContextProvider(compositor.get())); |
131 output_surface_.reset( | 131 output_surface_.reset( |
132 new PixelTestOutputSurface(std::move(compositor), std::move(worker), | 132 new PixelTestOutputSurface(std::move(compositor), std::move(worker), |
133 flipped_output_surface, nullptr)); | 133 flipped_output_surface, nullptr)); |
134 output_surface_->BindToClient(output_surface_client_.get()); | 134 output_surface_->BindToClient(output_surface_client_.get()); |
135 | 135 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 nullptr, shared_bitmap_manager_.get(), gpu_memory_buffer_manager_.get(), | 184 nullptr, shared_bitmap_manager_.get(), gpu_memory_buffer_manager_.get(), |
185 main_thread_task_runner_.get(), 0, 1, delegated_sync_points_required, | 185 main_thread_task_runner_.get(), 0, 1, delegated_sync_points_required, |
186 settings_.renderer_settings.use_gpu_memory_buffer_resources, | 186 settings_.renderer_settings.use_gpu_memory_buffer_resources, |
187 settings_.use_image_texture_targets); | 187 settings_.use_image_texture_targets); |
188 renderer_ = | 188 renderer_ = |
189 SoftwareRenderer::Create(this, &settings_.renderer_settings, | 189 SoftwareRenderer::Create(this, &settings_.renderer_settings, |
190 output_surface_.get(), resource_provider_.get()); | 190 output_surface_.get(), resource_provider_.get()); |
191 } | 191 } |
192 | 192 |
193 } // namespace cc | 193 } // namespace cc |
OLD | NEW |