Chromium Code Reviews| Index: ppapi/shared_impl/ppb_video_decoder_shared.cc |
| =================================================================== |
| --- ppapi/shared_impl/ppb_video_decoder_shared.cc (revision 175266) |
| +++ ppapi/shared_impl/ppb_video_decoder_shared.cc (working copy) |
| @@ -7,6 +7,7 @@ |
| #include "base/logging.h" |
| #include "gpu/command_buffer/client/gles2_implementation.h" |
| #include "ppapi/c/pp_errors.h" |
| +#include "ppapi/shared_impl/ppb_graphics_3d_shared.h" |
| #include "ppapi/shared_impl/resource_tracker.h" |
| #include "ppapi/thunk/enter.h" |
| @@ -90,8 +91,16 @@ |
| } |
| void PPB_VideoDecoder_Shared::FlushCommandBuffer() { |
| - if (gles2_impl_) |
| + if (gles2_impl_) { |
|
Scott Hess - ex-Googler
2013/01/07 22:41:02
This looks broadly like what I expected it to look
|
| + // To call Flush() we have to tell Graphics3D that we hold the proxy lock. |
| + thunk::EnterResource<thunk::PPB_Graphics3D_API, false> enter_g3d( |
| + graphics_context_, false); |
| + DCHECK(enter_g3d.succeeded()); |
| + PPB_Graphics3D_Shared* graphics3d = |
| + static_cast<PPB_Graphics3D_Shared*>(enter_g3d.object()); |
| + PPB_Graphics3D_Shared::ScopedNoLocking dont_lock(graphics3d); |
| gles2_impl_->Flush(); |
| + } |
| } |
| } // namespace ppapi |