OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/shared_impl/video_decoder_impl.h" | 5 #include "ppapi/shared_impl/video_decoder_impl.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/c/pp_errors.h" | 9 #include "ppapi/c/pp_errors.h" |
10 #include "ppapi/shared_impl/resource_tracker.h" | 10 #include "ppapi/shared_impl/resource_tracker.h" |
11 #include "ppapi/thunk/ppb_context_3d_api.h" | |
12 #include "ppapi/thunk/enter.h" | 11 #include "ppapi/thunk/enter.h" |
13 | 12 |
14 using ppapi::thunk::PPB_Context3D_API; | |
15 | |
16 namespace ppapi { | 13 namespace ppapi { |
17 | 14 |
18 VideoDecoderImpl::VideoDecoderImpl() | 15 VideoDecoderImpl::VideoDecoderImpl() |
19 : flush_callback_(PP_MakeCompletionCallback(NULL, NULL)), | 16 : flush_callback_(PP_MakeCompletionCallback(NULL, NULL)), |
20 reset_callback_(PP_MakeCompletionCallback(NULL, NULL)), | 17 reset_callback_(PP_MakeCompletionCallback(NULL, NULL)), |
21 graphics_context_(0), | 18 graphics_context_(0), |
22 gles2_impl_(NULL) { | 19 gles2_impl_(NULL) { |
23 } | 20 } |
24 | 21 |
25 VideoDecoderImpl::~VideoDecoderImpl() { | 22 VideoDecoderImpl::~VideoDecoderImpl() { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 bitstream_buffer_callbacks_.erase(it); | 79 bitstream_buffer_callbacks_.erase(it); |
83 PP_RunCompletionCallback(&cc, PP_OK); | 80 PP_RunCompletionCallback(&cc, PP_OK); |
84 } | 81 } |
85 | 82 |
86 void VideoDecoderImpl::FlushCommandBuffer() { | 83 void VideoDecoderImpl::FlushCommandBuffer() { |
87 if (gles2_impl_) | 84 if (gles2_impl_) |
88 gles2_impl_->Flush(); | 85 gles2_impl_->Flush(); |
89 } | 86 } |
90 | 87 |
91 } // namespace ppapi | 88 } // namespace ppapi |
OLD | NEW |