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

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

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ppapi_unittests win x64 Created 5 years, 10 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 | « ppapi/proxy/ppb_var_unittest.cc ('k') | ppapi/proxy/ppp_content_decryptor_private_proxy.cc » ('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 "base/numerics/safe_conversions.h"
8 #include "gpu/command_buffer/client/gles2_implementation.h" 9 #include "gpu/command_buffer/client/gles2_implementation.h"
9 #include "ppapi/proxy/enter_proxy.h" 10 #include "ppapi/proxy/enter_proxy.h"
10 #include "ppapi/proxy/plugin_dispatcher.h" 11 #include "ppapi/proxy/plugin_dispatcher.h"
11 #include "ppapi/proxy/ppapi_messages.h" 12 #include "ppapi/proxy/ppapi_messages.h"
12 #include "ppapi/proxy/ppb_buffer_proxy.h" 13 #include "ppapi/proxy/ppb_buffer_proxy.h"
13 #include "ppapi/proxy/ppb_graphics_3d_proxy.h" 14 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
14 #include "ppapi/thunk/enter.h" 15 #include "ppapi/thunk/enter.h"
15 #include "ppapi/thunk/resource_creation_api.h" 16 #include "ppapi/thunk/resource_creation_api.h"
16 #include "ppapi/thunk/thunk.h" 17 #include "ppapi/thunk/thunk.h"
17 18
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 PP_VideoBitstreamBuffer_Dev bitstream = { id, buffer.host_resource(), size }; 241 PP_VideoBitstreamBuffer_Dev bitstream = { id, buffer.host_resource(), size };
241 enter.SetResult(enter.object()->Decode(&bitstream, enter.callback())); 242 enter.SetResult(enter.object()->Decode(&bitstream, enter.callback()));
242 } 243 }
243 244
244 void PPB_VideoDecoder_Proxy::OnMsgAssignPictureBuffers( 245 void PPB_VideoDecoder_Proxy::OnMsgAssignPictureBuffers(
245 const HostResource& decoder, 246 const HostResource& decoder,
246 const std::vector<PP_PictureBuffer_Dev>& buffers) { 247 const std::vector<PP_PictureBuffer_Dev>& buffers) {
247 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); 248 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder);
248 if (enter.succeeded() && !buffers.empty()) { 249 if (enter.succeeded() && !buffers.empty()) {
249 const PP_PictureBuffer_Dev* buffer_array = &buffers.front(); 250 const PP_PictureBuffer_Dev* buffer_array = &buffers.front();
250 enter.object()->AssignPictureBuffers(buffers.size(), buffer_array); 251 enter.object()->AssignPictureBuffers(
252 base::checked_cast<uint32_t>(buffers.size()), buffer_array);
251 } 253 }
252 } 254 }
253 255
254 void PPB_VideoDecoder_Proxy::OnMsgReusePictureBuffer( 256 void PPB_VideoDecoder_Proxy::OnMsgReusePictureBuffer(
255 const HostResource& decoder, int32 picture_buffer_id) { 257 const HostResource& decoder, int32 picture_buffer_id) {
256 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); 258 EnterHostFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder);
257 if (enter.succeeded()) 259 if (enter.succeeded())
258 enter.object()->ReusePictureBuffer(picture_buffer_id); 260 enter.object()->ReusePictureBuffer(picture_buffer_id);
259 } 261 }
260 262
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 316
315 void PPB_VideoDecoder_Proxy::OnMsgResetACK( 317 void PPB_VideoDecoder_Proxy::OnMsgResetACK(
316 const HostResource& decoder, int32_t result) { 318 const HostResource& decoder, int32_t result) {
317 EnterPluginFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder); 319 EnterPluginFromHostResource<PPB_VideoDecoder_Dev_API> enter(decoder);
318 if (enter.succeeded()) 320 if (enter.succeeded())
319 static_cast<VideoDecoder*>(enter.object())->ResetACK(result); 321 static_cast<VideoDecoder*>(enter.object())->ResetACK(result);
320 } 322 }
321 323
322 } // namespace proxy 324 } // namespace proxy
323 } // namespace ppapi 325 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_var_unittest.cc ('k') | ppapi/proxy/ppp_content_decryptor_private_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698