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

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

Issue 9391013: Make a global enum to differentiate impl & proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | Annotate | Revision Log
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/ppb_video_decoder_shared.h" 5 #include "ppapi/shared_impl/ppb_video_decoder_shared.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/enter.h" 11 #include "ppapi/thunk/enter.h"
12 12
13 namespace ppapi { 13 namespace ppapi {
14 14
15 PPB_VideoDecoder_Shared::PPB_VideoDecoder_Shared(PP_Instance instance) 15 PPB_VideoDecoder_Shared::PPB_VideoDecoder_Shared(PP_Instance instance)
16 : Resource(instance), 16 : Resource(OBJECT_IS_IMPL, instance),
17 graphics_context_(0), 17 graphics_context_(0),
18 gles2_impl_(NULL) { 18 gles2_impl_(NULL) {
19 } 19 }
20 20
21 PPB_VideoDecoder_Shared::PPB_VideoDecoder_Shared( 21 PPB_VideoDecoder_Shared::PPB_VideoDecoder_Shared(
22 const HostResource& host_resource) 22 const HostResource& host_resource)
23 : Resource(host_resource), 23 : Resource(OBJECT_IS_PROXY, host_resource),
24 graphics_context_(0), 24 graphics_context_(0),
25 gles2_impl_(NULL) { 25 gles2_impl_(NULL) {
26 } 26 }
27 27
28 PPB_VideoDecoder_Shared::~PPB_VideoDecoder_Shared() { 28 PPB_VideoDecoder_Shared::~PPB_VideoDecoder_Shared() {
29 } 29 }
30 30
31 thunk::PPB_VideoDecoder_API* PPB_VideoDecoder_Shared::AsPPB_VideoDecoder_API() { 31 thunk::PPB_VideoDecoder_API* PPB_VideoDecoder_Shared::AsPPB_VideoDecoder_API() {
32 return this; 32 return this;
33 } 33 }
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bitstream_buffer_callbacks_.erase(it); 89 bitstream_buffer_callbacks_.erase(it);
90 cc->Run(PP_OK); 90 cc->Run(PP_OK);
91 } 91 }
92 92
93 void PPB_VideoDecoder_Shared::FlushCommandBuffer() { 93 void PPB_VideoDecoder_Shared::FlushCommandBuffer() {
94 if (gles2_impl_) 94 if (gles2_impl_)
95 gles2_impl_->Flush(); 95 gles2_impl_->Flush();
96 } 96 }
97 97
98 } // namespace ppapi 98 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698