Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2814843002: gpu: GPU service scheduler. (Closed)
Patch Set: rebase Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 2255 matching lines...) Expand 10 before | Expand all | Expand 10 after
2266 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host( 2266 scoped_refptr<gpu::GpuChannelHost> gpu_channel_host(
2267 EstablishGpuChannelSync()); 2267 EstablishGpuChannelSync());
2268 if (!gpu_channel_host) { 2268 if (!gpu_channel_host) {
2269 shared_worker_context_provider_ = nullptr; 2269 shared_worker_context_provider_ = nullptr;
2270 return shared_worker_context_provider_; 2270 return shared_worker_context_provider_;
2271 } 2271 }
2272 2272
2273 int32_t stream_id = gpu::GPU_STREAM_DEFAULT; 2273 int32_t stream_id = gpu::GPU_STREAM_DEFAULT;
2274 gpu::GpuStreamPriority stream_priority = gpu::GpuStreamPriority::NORMAL; 2274 gpu::GpuStreamPriority stream_priority = gpu::GpuStreamPriority::NORMAL;
2275 if (is_async_worker_context_enabled_) { 2275 if (is_async_worker_context_enabled_) {
2276 stream_id = gpu_channel_host->GenerateStreamID(); 2276 stream_id = gpu::GPU_STREAM_WORKER;
2277 stream_priority = gpu::GpuStreamPriority::LOW; 2277 stream_priority = gpu::GpuStreamPriority::LOW;
2278 } 2278 }
2279 2279
2280 bool support_locking = true; 2280 bool support_locking = true;
2281 shared_worker_context_provider_ = CreateOffscreenContext( 2281 shared_worker_context_provider_ = CreateOffscreenContext(
2282 std::move(gpu_channel_host), gpu::SharedMemoryLimits(), support_locking, 2282 std::move(gpu_channel_host), gpu::SharedMemoryLimits(), support_locking,
2283 ui::command_buffer_metrics::RENDER_WORKER_CONTEXT, stream_id, 2283 ui::command_buffer_metrics::RENDER_WORKER_CONTEXT, stream_id,
2284 stream_priority); 2284 stream_priority);
2285 if (!shared_worker_context_provider_->BindToCurrentThread()) 2285 if (!shared_worker_context_provider_->BindToCurrentThread())
2286 shared_worker_context_provider_ = nullptr; 2286 shared_worker_context_provider_ = nullptr;
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
2406 } 2406 }
2407 } 2407 }
2408 2408
2409 void RenderThreadImpl::OnRendererInterfaceRequest( 2409 void RenderThreadImpl::OnRendererInterfaceRequest(
2410 mojom::RendererAssociatedRequest request) { 2410 mojom::RendererAssociatedRequest request) {
2411 DCHECK(!renderer_binding_.is_bound()); 2411 DCHECK(!renderer_binding_.is_bound());
2412 renderer_binding_.Bind(std::move(request)); 2412 renderer_binding_.Bind(std::move(request));
2413 } 2413 }
2414 2414
2415 } // namespace content 2415 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698