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

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

Issue 1963263002: Fix Mac resize, delete more Mac code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 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
« no previous file with comments | « content/renderer/pepper/pepper_video_encoder_host.cc ('k') | gpu/ipc/client/gpu_channel_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/location.h" 9 #include "base/location.h"
10 #include "base/single_thread_task_runner.h" 10 #include "base/single_thread_task_runner.h"
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 gpu::CommandBufferProxyImpl* share_buffer = NULL; 238 gpu::CommandBufferProxyImpl* share_buffer = NULL;
239 if (share_context) { 239 if (share_context) {
240 PPB_Graphics3D_Impl* share_graphics = 240 PPB_Graphics3D_Impl* share_graphics =
241 static_cast<PPB_Graphics3D_Impl*>(share_context); 241 static_cast<PPB_Graphics3D_Impl*>(share_context);
242 share_buffer = share_graphics->GetCommandBufferProxy(); 242 share_buffer = share_graphics->GetCommandBufferProxy();
243 } 243 }
244 244
245 command_buffer_ = channel->CreateCommandBuffer( 245 command_buffer_ = channel->CreateCommandBuffer(
246 gpu::kNullSurfaceHandle, surface_size, share_buffer, 246 gpu::kNullSurfaceHandle, surface_size, share_buffer,
247 gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, attribs, 247 gpu::GPU_STREAM_DEFAULT, gpu::GpuStreamPriority::NORMAL, attribs,
248 GURL::EmptyGURL(), gpu_preference); 248 GURL::EmptyGURL(), gpu_preference, base::ThreadTaskRunnerHandle::Get());
249 if (!command_buffer_) 249 if (!command_buffer_)
250 return false; 250 return false;
251 251
252 command_buffer_->SetGpuControlClient(this); 252 command_buffer_->SetGpuControlClient(this);
253 253
254 if (shared_state_handle) 254 if (shared_state_handle)
255 *shared_state_handle = command_buffer_->GetSharedStateHandle(); 255 *shared_state_handle = command_buffer_->GetSharedStateHandle();
256 if (capabilities) 256 if (capabilities)
257 *capabilities = command_buffer_->GetCapabilities(); 257 *capabilities = command_buffer_->GetCapabilities();
258 if (command_buffer_id) 258 if (command_buffer_id)
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 instance->module()->GetPluginInterface(PPP_GRAPHICS_3D_INTERFACE)); 333 instance->module()->GetPluginInterface(PPP_GRAPHICS_3D_INTERFACE));
334 // We have to check *again* that the instance exists, because it could have 334 // We have to check *again* that the instance exists, because it could have
335 // been deleted during GetPluginInterface(). Even the PluginModule could be 335 // been deleted during GetPluginInterface(). Even the PluginModule could be
336 // deleted, but in that case, the instance should also be gone, so the 336 // deleted, but in that case, the instance should also be gone, so the
337 // GetInstance check covers both cases. 337 // GetInstance check covers both cases.
338 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance)) 338 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance))
339 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); 339 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance);
340 } 340 }
341 341
342 } // namespace content 342 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_video_encoder_host.cc ('k') | gpu/ipc/client/gpu_channel_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698