| 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 "content/renderer/pepper/video_decoder_shim.h" | 5 #include "content/renderer/pepper/video_decoder_shim.h" |
| 6 | 6 |
| 7 #include <GLES2/gl2.h> | 7 #include <GLES2/gl2.h> |
| 8 #include <GLES2/gl2ext.h> | 8 #include <GLES2/gl2ext.h> |
| 9 #include <GLES2/gl2extchromium.h> | 9 #include <GLES2/gl2extchromium.h> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/numerics/safe_conversions.h" | 12 #include "base/numerics/safe_conversions.h" |
| 13 #include "base/single_thread_task_runner.h" | 13 #include "base/single_thread_task_runner.h" |
| 14 #include "cc/blink/context_provider_web_context.h" |
| 14 #include "content/public/renderer/render_thread.h" | 15 #include "content/public/renderer/render_thread.h" |
| 15 #include "content/renderer/pepper/pepper_video_decoder_host.h" | 16 #include "content/renderer/pepper/pepper_video_decoder_host.h" |
| 16 #include "content/renderer/render_thread_impl.h" | 17 #include "content/renderer/render_thread_impl.h" |
| 17 #include "gpu/command_buffer/client/gles2_implementation.h" | 18 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 18 #include "media/base/decoder_buffer.h" | 19 #include "media/base/decoder_buffer.h" |
| 19 #include "media/base/limits.h" | 20 #include "media/base/limits.h" |
| 20 #include "media/base/video_decoder.h" | 21 #include "media/base/video_decoder.h" |
| 21 #include "media/filters/ffmpeg_video_decoder.h" | 22 #include "media/filters/ffmpeg_video_decoder.h" |
| 22 #include "media/filters/skcanvas_video_renderer.h" | 23 #include "media/filters/skcanvas_video_renderer.h" |
| 23 #include "media/filters/vpx_video_decoder.h" | 24 #include "media/filters/vpx_video_decoder.h" |
| 24 #include "media/video/picture.h" | 25 #include "media/video/picture.h" |
| 25 #include "media/video/video_decode_accelerator.h" | 26 #include "media/video/video_decode_accelerator.h" |
| 26 #include "ppapi/c/pp_errors.h" | 27 #include "ppapi/c/pp_errors.h" |
| 27 #include "webkit/common/gpu/context_provider_web_context.h" | |
| 28 | 28 |
| 29 namespace content { | 29 namespace content { |
| 30 | 30 |
| 31 struct VideoDecoderShim::PendingDecode { | 31 struct VideoDecoderShim::PendingDecode { |
| 32 PendingDecode(uint32_t decode_id, | 32 PendingDecode(uint32_t decode_id, |
| 33 const scoped_refptr<media::DecoderBuffer>& buffer); | 33 const scoped_refptr<media::DecoderBuffer>& buffer); |
| 34 ~PendingDecode(); | 34 ~PendingDecode(); |
| 35 | 35 |
| 36 const uint32_t decode_id; | 36 const uint32_t decode_id; |
| 37 const scoped_refptr<media::DecoderBuffer> buffer; | 37 const scoped_refptr<media::DecoderBuffer> buffer; |
| (...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { | 587 void VideoDecoderShim::DeleteTexture(uint32_t texture_id) { |
| 588 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); | 588 gpu::gles2::GLES2Interface* gles2 = context_provider_->ContextGL(); |
| 589 gles2->DeleteTextures(1, &texture_id); | 589 gles2->DeleteTextures(1, &texture_id); |
| 590 } | 590 } |
| 591 | 591 |
| 592 void VideoDecoderShim::FlushCommandBuffer() { | 592 void VideoDecoderShim::FlushCommandBuffer() { |
| 593 context_provider_->ContextGL()->Flush(); | 593 context_provider_->ContextGL()->Flush(); |
| 594 } | 594 } |
| 595 | 595 |
| 596 } // namespace content | 596 } // namespace content |
| OLD | NEW |