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

Side by Side Diff: ppapi/proxy/ppb_video_decoder_proxy.cc

Issue 188143003: Ensure that pepper plugins honor the GPU H/W video decode blacklist and the disable-accelerated-vid… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/ppapi_preferences.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 "ppapi/proxy/ppb_video_decoder_proxy.h" 5 #include "ppapi/proxy/ppb_video_decoder_proxy.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "gpu/command_buffer/client/gles2_implementation.h" 8 #include "gpu/command_buffer/client/gles2_implementation.h"
9 #include "ppapi/proxy/enter_proxy.h" 9 #include "ppapi/proxy/enter_proxy.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 10 #include "ppapi/proxy/plugin_dispatcher.h"
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 // Dispatcher is null if it cannot find the instance passed to it (i.e. if the 190 // Dispatcher is null if it cannot find the instance passed to it (i.e. if the
191 // client passes in an invalid instance). 191 // client passes in an invalid instance).
192 if (!dispatcher) 192 if (!dispatcher)
193 return 0; 193 return 0;
194 194
195 EnterResourceNoLock<PPB_Graphics3D_API> enter_context(graphics_context, 195 EnterResourceNoLock<PPB_Graphics3D_API> enter_context(graphics_context,
196 true); 196 true);
197 if (enter_context.failed()) 197 if (enter_context.failed())
198 return 0; 198 return 0;
199 199
200 if (!dispatcher->preferences().is_accelerated_video_decode_enabled)
bbudge 2014/03/06 01:04:04 This seems out of place in the middle of grabbing
ananta 2014/03/06 01:06:46 Done.
201 return 0;
202
200 Graphics3D* context = static_cast<Graphics3D*>(enter_context.object()); 203 Graphics3D* context = static_cast<Graphics3D*>(enter_context.object());
201 204
202 HostResource result; 205 HostResource result;
203 dispatcher->Send(new PpapiHostMsg_PPBVideoDecoder_Create( 206 dispatcher->Send(new PpapiHostMsg_PPBVideoDecoder_Create(
204 API_ID_PPB_VIDEO_DECODER_DEV, instance, 207 API_ID_PPB_VIDEO_DECODER_DEV, instance,
205 context->host_resource(), profile, &result)); 208 context->host_resource(), profile, &result));
206 if (result.is_null()) 209 if (result.is_null())
207 return 0; 210 return 0;
208 211
209 // Need a scoped_refptr to keep the object alive during the Init call. 212 // Need a scoped_refptr to keep the object alive during the Init call.
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 314
312 void PPB_VideoDecoder_Proxy::OnMsgResetACK( 315 void PPB_VideoDecoder_Proxy::OnMsgResetACK(
313 const HostResource& decoder, int32_t result) { 316 const HostResource& decoder, int32_t result) {
314 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder); 317 EnterPluginFromHostResource<PPB_VideoDecoder_API> enter(decoder);
315 if (enter.succeeded()) 318 if (enter.succeeded())
316 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); 319 static_cast<VideoDecoder*>(enter.object())->ResetACK(result);
317 } 320 }
318 321
319 } // namespace proxy 322 } // namespace proxy
320 } // namespace ppapi 323 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppapi_messages.h ('k') | ppapi/shared_impl/ppapi_preferences.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698