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

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

Issue 1823763003: Move more files to gpu/ipc/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android Build Created 4 years, 9 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/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 // Force SW rendering for keyframe extraction to avoid pixel reads from VRAM. 238 // Force SW rendering for keyframe extraction to avoid pixel reads from VRAM.
239 PluginInstanceThrottlerImpl* throttler = plugin_instance->throttler(); 239 PluginInstanceThrottlerImpl* throttler = plugin_instance->throttler();
240 if (throttler && throttler->needs_representative_keyframe()) 240 if (throttler && throttler->needs_representative_keyframe())
241 return false; 241 return false;
242 242
243 RenderThreadImpl* render_thread = RenderThreadImpl::current(); 243 RenderThreadImpl* render_thread = RenderThreadImpl::current();
244 if (!render_thread) 244 if (!render_thread)
245 return false; 245 return false;
246 246
247 channel_ = render_thread->EstablishGpuChannelSync( 247 channel_ = render_thread->EstablishGpuChannelSync(
248 CAUSE_FOR_GPU_LAUNCH_PEPPERPLATFORMCONTEXT3DIMPL_INITIALIZE); 248 gpu::CAUSE_FOR_GPU_LAUNCH_PEPPERPLATFORMCONTEXT3DIMPL_INITIALIZE);
249 if (!channel_.get()) 249 if (!channel_.get())
250 return false; 250 return false;
251 251
252 gfx::Size surface_size; 252 gfx::Size surface_size;
253 std::vector<int32_t> attribs; 253 std::vector<int32_t> attribs;
254 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu; 254 gfx::GpuPreference gpu_preference = gfx::PreferDiscreteGpu;
255 // TODO(alokp): Change GpuChannelHost::CreateCommandBuffer() 255 // TODO(alokp): Change GpuChannelHost::CreateCommandBuffer()
256 // interface to accept width and height in the attrib_list so that 256 // interface to accept width and height in the attrib_list so that
257 // we do not need to filter for width and height here. 257 // we do not need to filter for width and height here.
258 if (attrib_list) { 258 if (attrib_list) {
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 instance->module()->GetPluginInterface(PPP_GRAPHICS_3D_INTERFACE)); 373 instance->module()->GetPluginInterface(PPP_GRAPHICS_3D_INTERFACE));
374 // We have to check *again* that the instance exists, because it could have 374 // We have to check *again* that the instance exists, because it could have
375 // been deleted during GetPluginInterface(). Even the PluginModule could be 375 // been deleted during GetPluginInterface(). Even the PluginModule could be
376 // deleted, but in that case, the instance should also be gone, so the 376 // deleted, but in that case, the instance should also be gone, so the
377 // GetInstance check covers both cases. 377 // GetInstance check covers both cases.
378 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance)) 378 if (ppp_graphics_3d && HostGlobals::Get()->GetInstance(this_pp_instance))
379 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance); 379 ppp_graphics_3d->Graphics3DContextLost(this_pp_instance);
380 } 380 }
381 381
382 } // namespace content 382 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698