| 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 "content/renderer/render_thread_impl.h" | 5 #include "content/renderer/render_thread_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); | 209 base::CommandLine* cmd = base::CommandLine::ForCurrentProcess(); |
| 210 base::CommandLine::StringVector old_argv = cmd->argv(); | 210 base::CommandLine::StringVector old_argv = cmd->argv(); |
| 211 | 211 |
| 212 cmd->AppendSwitchASCII(switches::kNumRasterThreads, "1"); | 212 cmd->AppendSwitchASCII(switches::kNumRasterThreads, "1"); |
| 213 cmd->AppendSwitchASCII( | 213 cmd->AppendSwitchASCII( |
| 214 switches::kContentImageTextureTarget, | 214 switches::kContentImageTextureTarget, |
| 215 cc::BufferToTextureTargetMapToString( | 215 cc::BufferToTextureTargetMapToString( |
| 216 cc::DefaultBufferToTextureTargetMapForTesting())); | 216 cc::DefaultBufferToTextureTargetMapForTesting())); |
| 217 | 217 |
| 218 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler = | 218 std::unique_ptr<blink::scheduler::RendererScheduler> renderer_scheduler = |
| 219 blink::scheduler::RendererScheduler::Create(); | 219 blink::scheduler::RendererScheduler::Create( |
| 220 blink::scheduler::RendererScheduler::RendererType:: |
| 221 kForegroundAndBackground); |
| 220 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter( | 222 scoped_refptr<base::SingleThreadTaskRunner> test_task_counter( |
| 221 test_task_counter_.get()); | 223 test_task_counter_.get()); |
| 222 | 224 |
| 223 base::FieldTrialList::CreateTrialsFromCommandLine( | 225 base::FieldTrialList::CreateTrialsFromCommandLine( |
| 224 *cmd, switches::kFieldTrialHandle, -1); | 226 *cmd, switches::kFieldTrialHandle, -1); |
| 225 thread_ = new RenderThreadImplForTest( | 227 thread_ = new RenderThreadImplForTest( |
| 226 InProcessChildThreadParams(io_task_runner, &invitation, | 228 InProcessChildThreadParams(io_task_runner, &invitation, |
| 227 child_connection_->service_token()), | 229 child_connection_->service_token()), |
| 228 std::move(renderer_scheduler), test_task_counter); | 230 std::move(renderer_scheduler), test_task_counter); |
| 229 cmd->InitFromArgv(old_argv); | 231 cmd->InitFromArgv(old_argv); |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 // These formats are guaranteed to work on all platforms. | 399 // These formats are guaranteed to work on all platforms. |
| 398 ::testing::Values(gfx::BufferFormat::R_8, | 400 ::testing::Values(gfx::BufferFormat::R_8, |
| 399 gfx::BufferFormat::BGR_565, | 401 gfx::BufferFormat::BGR_565, |
| 400 gfx::BufferFormat::RGBA_4444, | 402 gfx::BufferFormat::RGBA_4444, |
| 401 gfx::BufferFormat::RGBA_8888, | 403 gfx::BufferFormat::RGBA_8888, |
| 402 gfx::BufferFormat::BGRA_8888, | 404 gfx::BufferFormat::BGRA_8888, |
| 403 gfx::BufferFormat::YVU_420))); | 405 gfx::BufferFormat::YVU_420))); |
| 404 | 406 |
| 405 } // namespace | 407 } // namespace |
| 406 } // namespace content | 408 } // namespace content |
| OLD | NEW |