OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <GLES2/gl2.h> | 5 #include <GLES2/gl2.h> |
6 | 6 |
7 #include "base/memory/shared_memory.h" | 7 #include "base/memory/shared_memory.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "ppapi/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/c/ppb_video_decoder.h" | 10 #include "ppapi/c/ppb_video_decoder.h" |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 } | 229 } |
230 | 230 |
231 void SendResetReply(const ResourceMessageCallParams& params) { | 231 void SendResetReply(const ResourceMessageCallParams& params) { |
232 SendReply(params, PP_OK, PpapiPluginMsg_VideoDecoder_ResetReply()); | 232 SendReply(params, PP_OK, PpapiPluginMsg_VideoDecoder_ResetReply()); |
233 } | 233 } |
234 | 234 |
235 void SendRequestTextures(const ResourceMessageCallParams& params) { | 235 void SendRequestTextures(const ResourceMessageCallParams& params) { |
236 SendReply(params, | 236 SendReply(params, |
237 PP_OK, | 237 PP_OK, |
238 PpapiPluginMsg_VideoDecoder_RequestTextures( | 238 PpapiPluginMsg_VideoDecoder_RequestTextures( |
239 kNumRequestedTextures, | 239 kNumRequestedTextures, PP_MakeSize(320, 240), GL_TEXTURE_2D)); |
240 PP_MakeSize(320, 240), | |
241 GL_TEXTURE_2D, | |
242 std::vector<gpu::Mailbox>())); | |
243 } | 240 } |
244 | 241 |
245 void SendNotifyError(const ResourceMessageCallParams& params, int32_t error) { | 242 void SendNotifyError(const ResourceMessageCallParams& params, int32_t error) { |
246 SendReply(params, PP_OK, PpapiPluginMsg_VideoDecoder_NotifyError(error)); | 243 SendReply(params, PP_OK, PpapiPluginMsg_VideoDecoder_NotifyError(error)); |
247 } | 244 } |
248 | 245 |
249 bool CheckDecodeMsg(ResourceMessageCallParams* params, | 246 bool CheckDecodeMsg(ResourceMessageCallParams* params, |
250 uint32_t* shm_id, | 247 uint32_t* shm_id, |
251 uint32_t* size, | 248 uint32_t* size, |
252 int32_t* decode_id) { | 249 int32_t* decode_id) { |
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
574 ASSERT_FALSE(uncalled_cb.called()); | 571 ASSERT_FALSE(uncalled_cb.called()); |
575 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallFlush(decoder.get(), &uncalled_cb)); | 572 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallFlush(decoder.get(), &uncalled_cb)); |
576 ASSERT_FALSE(uncalled_cb.called()); | 573 ASSERT_FALSE(uncalled_cb.called()); |
577 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallReset(decoder.get(), &uncalled_cb)); | 574 ASSERT_EQ(PP_ERROR_RESOURCE_FAILED, CallReset(decoder.get(), &uncalled_cb)); |
578 ASSERT_FALSE(uncalled_cb.called()); | 575 ASSERT_FALSE(uncalled_cb.called()); |
579 } | 576 } |
580 #endif // !defined(OS_WIN) || !defined(ARCH_CPU_64_BITS) | 577 #endif // !defined(OS_WIN) || !defined(ARCH_CPU_64_BITS) |
581 | 578 |
582 } // namespace proxy | 579 } // namespace proxy |
583 } // namespace ppapi | 580 } // namespace ppapi |
OLD | NEW |