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

Side by Side Diff: ppapi/shared_impl/video_decoder_impl.cc

Issue 7608033: Move the refcounting from the proxy/impl resource object to the shared resource object base class. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 4 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/shared_impl/video_decoder_impl.h ('k') | webkit/plugins/ppapi/resource.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) 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/proxy/plugin_resource_tracker.h" 10 #include "ppapi/proxy/plugin_resource_tracker.h"
11 #include "ppapi/thunk/ppb_context_3d_api.h" 11 #include "ppapi/thunk/ppb_context_3d_api.h"
12 #include "ppapi/thunk/enter.h" 12 #include "ppapi/thunk/enter.h"
13 13
14 using ppapi::thunk::PPB_Context3D_API; 14 using ppapi::thunk::PPB_Context3D_API;
15 15
16 namespace ppapi { 16 namespace ppapi {
17 17
18 VideoDecoderImpl::VideoDecoderImpl() 18 VideoDecoderImpl::VideoDecoderImpl()
19 : flush_callback_(PP_MakeCompletionCallback(NULL, NULL)), 19 : flush_callback_(PP_MakeCompletionCallback(NULL, NULL)),
20 reset_callback_(PP_MakeCompletionCallback(NULL, NULL)), 20 reset_callback_(PP_MakeCompletionCallback(NULL, NULL)),
21 context3d_id_(0), 21 context3d_id_(0),
22 gles2_impl_(NULL) { 22 gles2_impl_(NULL) {
23 } 23 }
24 24
25 thunk::PPB_VideoDecoder_API* VideoDecoderImpl::AsPPB_VideoDecoder_API() {
26 return this;
27 }
28
29 VideoDecoderImpl::~VideoDecoderImpl() { 25 VideoDecoderImpl::~VideoDecoderImpl() {
30 } 26 }
31 27
32 bool VideoDecoderImpl::Init(PP_Resource context3d_id, 28 bool VideoDecoderImpl::Init(PP_Resource context3d_id,
33 PPB_Context3D_API* context3d, 29 PPB_Context3D_API* context3d,
34 const PP_VideoConfigElement* decoder_config) { 30 const PP_VideoConfigElement* decoder_config) {
35 if (!context3d || !decoder_config || !context3d_id) 31 if (!context3d || !decoder_config || !context3d_id)
36 return false; 32 return false;
37 33
38 DCHECK(!gles2_impl_ && !context3d_id_); 34 DCHECK(!gles2_impl_ && !context3d_id_);
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 const PP_VideoConfigElement* current = configs_to_copy; 96 const PP_VideoConfigElement* current = configs_to_copy;
101 while (current && *current != PP_VIDEOATTR_DICTIONARY_TERMINATOR) { 97 while (current && *current != PP_VIDEOATTR_DICTIONARY_TERMINATOR) {
102 out_configs->push_back(*current); 98 out_configs->push_back(*current);
103 out_configs->push_back(*(current + 1)); 99 out_configs->push_back(*(current + 1));
104 current += 2; 100 current += 2;
105 } 101 }
106 return true; 102 return true;
107 } 103 }
108 104
109 } // namespace ppapi 105 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/shared_impl/video_decoder_impl.h ('k') | webkit/plugins/ppapi/resource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698