| 68 | } // namespace |
| 69 | |
| 70 | std::unique_ptr<CommandQueue> NewCommandQueue(const GpuInfo& gpu_info) { |
| 71 | if (gpu_info.type == GpuType::ADRENO) { |
| 72 | int flush_every_n = 1; |
| 73 | // On Adreno 630 and Adreno 505 there is up to 2x performance boost when |
| 74 | // glFlush happens not so often. |
| 75 | if (gpu_info.gpu_model == GpuModel::ADRENO630 || |
| 76 | gpu_info.gpu_model == GpuModel::ADRENO505) { |
| 77 | flush_every_n = 10; |
| 78 | } |
| 79 | return absl::make_unique<AdrenoCommandQueue>(flush_every_n); |
| 80 | } |
| 81 | return absl::make_unique<DefaultCommandQueue>(); |
| 82 | } |
| 83 | |
| 84 | } // namespace gl |
| 85 | } // namespace gpu |