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

Side by Side Diff: content/renderer/pepper/ppb_graphics_3d_impl.cc

Issue 2881813002: Revert of gpu: GPU service scheduler. (Closed)
Patch Set: 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/pepper/ppb_graphics_3d_impl.h" 5 #include "content/renderer/pepper/ppb_graphics_3d_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/feature_list.h" 9 #include "base/feature_list.h"
10 #include "base/location.h" 10 #include "base/location.h"
11 #include "base/metrics/histogram_macros.h" 11 #include "base/metrics/histogram_macros.h"
12 #include "base/single_thread_task_runner.h" 12 #include "base/single_thread_task_runner.h"
13 #include "base/strings/utf_string_conversions.h" 13 #include "base/strings/utf_string_conversions.h"
14 #include "base/threading/thread_task_runner_handle.h" 14 #include "base/threading/thread_task_runner_handle.h"
15 #include "content/common/gpu_stream_constants.h"
16 #include "content/public/common/content_features.h" 15 #include "content/public/common/content_features.h"
17 #include "content/public/common/content_switches.h" 16 #include "content/public/common/content_switches.h"
18 #include "content/public/common/web_preferences.h" 17 #include "content/public/common/web_preferences.h"
19 #include "content/renderer/pepper/host_globals.h" 18 #include "content/renderer/pepper/host_globals.h"
20 #include "content/renderer/pepper/pepper_plugin_instance_impl.h" 19 #include "content/renderer/pepper/pepper_plugin_instance_impl.h"
21 #include "content/renderer/pepper/plugin_instance_throttler_impl.h" 20 #include "content/renderer/pepper/plugin_instance_throttler_impl.h"
22 #include "content/renderer/pepper/plugin_module.h" 21 #include "content/renderer/pepper/plugin_module.h"
23 #include "content/renderer/render_thread_impl.h" 22 #include "content/renderer/render_thread_impl.h"
24 #include "content/renderer/render_view_impl.h" 23 #include "content/renderer/render_view_impl.h"
25 #include "gpu/GLES2/gl2extchromium.h" 24 #include "gpu/GLES2/gl2extchromium.h"
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 if (!plugin_instance->is_flash_plugin()) 250 if (!plugin_instance->is_flash_plugin())
252 UMA_HISTOGRAM_BOOLEAN("Pepper.Graphics3DHasShareGroup", !!share_context); 251 UMA_HISTOGRAM_BOOLEAN("Pepper.Graphics3DHasShareGroup", !!share_context);
253 if (share_context) { 252 if (share_context) {
254 PPB_Graphics3D_Impl* share_graphics = 253 PPB_Graphics3D_Impl* share_graphics =
255 static_cast<PPB_Graphics3D_Impl*>(share_context); 254 static_cast<PPB_Graphics3D_Impl*>(share_context);
256 share_buffer = share_graphics->GetCommandBufferProxy(); 255 share_buffer = share_graphics->GetCommandBufferProxy();
257 } 256 }
258 257
259 command_buffer_ = gpu::CommandBufferProxyImpl::Create( 258 command_buffer_ = gpu::CommandBufferProxyImpl::Create(
260 std::move(channel), gpu::kNullSurfaceHandle, share_buffer, 259 std::move(channel), gpu::kNullSurfaceHandle, share_buffer,
261 kGpuStreamIdDefault, kGpuStreamPriorityDefault, attrib_helper, 260 gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, attrib_helper,
262 GURL::EmptyGURL(), base::ThreadTaskRunnerHandle::Get()); 261 GURL::EmptyGURL(), base::ThreadTaskRunnerHandle::Get());
263 if (!command_buffer_) 262 if (!command_buffer_)
264 return false; 263 return false;
265 264
266 command_buffer_->SetGpuControlClient(this); 265 command_buffer_->SetGpuControlClient(this);
267 266
268 if (shared_state_handle) 267 if (shared_state_handle)
269 *shared_state_handle = command_buffer_->GetSharedStateHandle(); 268 *shared_state_handle = command_buffer_->GetSharedStateHandle();
270 if (capabilities) 269 if (capabilities)
271 *capabilities = command_buffer_->GetCapabilities(); 270 *capabilities = command_buffer_->GetCapabilities();
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 if (!mailboxes_to_reuse_.empty()) { 352 if (!mailboxes_to_reuse_.empty()) {
354 gpu::Mailbox mailbox = mailboxes_to_reuse_.back(); 353 gpu::Mailbox mailbox = mailboxes_to_reuse_.back();
355 mailboxes_to_reuse_.pop_back(); 354 mailboxes_to_reuse_.pop_back();
356 return mailbox; 355 return mailbox;
357 } 356 }
358 357
359 return gpu::Mailbox::Generate(); 358 return gpu::Mailbox::Generate();
360 } 359 }
361 360
362 } // namespace content 361 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_video_encoder_host.cc ('k') | content/renderer/render_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698