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

Side by Side Diff: ppapi/cpp/dev/video_decoder_dev.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/cpp/dev/scriptable_object_deprecated.cc ('k') | ppapi/cpp/input_event.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/cpp/dev/video_decoder_dev.h" 5 #include "ppapi/cpp/dev/video_decoder_dev.h"
6 6
7 #include "ppapi/c/dev/ppb_video_decoder_dev.h" 7 #include "ppapi/c/dev/ppb_video_decoder_dev.h"
8 #include "ppapi/c/dev/ppp_video_decoder_dev.h" 8 #include "ppapi/c/dev/ppp_video_decoder_dev.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/cpp/graphics_3d.h" 10 #include "ppapi/cpp/graphics_3d.h"
(...skipping 24 matching lines...) Expand all
35 } 35 }
36 36
37 VideoDecoder_Dev::~VideoDecoder_Dev() { 37 VideoDecoder_Dev::~VideoDecoder_Dev() {
38 } 38 }
39 39
40 void VideoDecoder_Dev::AssignPictureBuffers( 40 void VideoDecoder_Dev::AssignPictureBuffers(
41 const std::vector<PP_PictureBuffer_Dev>& buffers) { 41 const std::vector<PP_PictureBuffer_Dev>& buffers) {
42 if (!has_interface<PPB_VideoDecoder_Dev>() || !pp_resource()) 42 if (!has_interface<PPB_VideoDecoder_Dev>() || !pp_resource())
43 return; 43 return;
44 get_interface<PPB_VideoDecoder_Dev>()->AssignPictureBuffers( 44 get_interface<PPB_VideoDecoder_Dev>()->AssignPictureBuffers(
45 pp_resource(), buffers.size(), &buffers[0]); 45 pp_resource(), static_cast<uint32_t>(buffers.size()), &buffers[0]);
46 } 46 }
47 47
48 int32_t VideoDecoder_Dev::Decode( 48 int32_t VideoDecoder_Dev::Decode(
49 const PP_VideoBitstreamBuffer_Dev& bitstream_buffer, 49 const PP_VideoBitstreamBuffer_Dev& bitstream_buffer,
50 const CompletionCallback& callback) { 50 const CompletionCallback& callback) {
51 if (!has_interface<PPB_VideoDecoder_Dev>()) 51 if (!has_interface<PPB_VideoDecoder_Dev>())
52 return callback.MayForce(PP_ERROR_NOINTERFACE); 52 return callback.MayForce(PP_ERROR_NOINTERFACE);
53 return get_interface<PPB_VideoDecoder_Dev>()->Decode( 53 return get_interface<PPB_VideoDecoder_Dev>()->Decode(
54 pp_resource(), &bitstream_buffer, callback.pp_completion_callback()); 54 pp_resource(), &bitstream_buffer, callback.pp_completion_callback());
55 } 55 }
(...skipping 13 matching lines...) Expand all
69 } 69 }
70 70
71 int32_t VideoDecoder_Dev::Reset(const CompletionCallback& callback) { 71 int32_t VideoDecoder_Dev::Reset(const CompletionCallback& callback) {
72 if (!has_interface<PPB_VideoDecoder_Dev>()) 72 if (!has_interface<PPB_VideoDecoder_Dev>())
73 return callback.MayForce(PP_ERROR_NOINTERFACE); 73 return callback.MayForce(PP_ERROR_NOINTERFACE);
74 return get_interface<PPB_VideoDecoder_Dev>()->Reset( 74 return get_interface<PPB_VideoDecoder_Dev>()->Reset(
75 pp_resource(), callback.pp_completion_callback()); 75 pp_resource(), callback.pp_completion_callback());
76 } 76 }
77 77
78 } // namespace pp 78 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/cpp/dev/scriptable_object_deprecated.cc ('k') | ppapi/cpp/input_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698