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

Unified Diff: media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h

Issue 2905823002: Add Mojo interfaces for GpuJpegDecodeAccelerator and GpuJpegDecodeAcceleratorHost (Closed)
Patch Set: rebase Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/gpu/ipc/service/BUILD.gn ('k') | media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h
diff --git a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h b/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h
index d2459be358b222a2a243900d30ac58056a1e8b26..811ad6ec6ad12a51bf118ad72334d10c84767a82 100644
--- a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h
+++ b/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h
@@ -16,6 +16,7 @@
#include "base/synchronization/waitable_event.h"
#include "ipc/ipc_listener.h"
#include "ipc/ipc_sender.h"
+#include "media/gpu/mojo/jpeg_decoder.mojom.h"
#include "media/video/jpeg_decode_accelerator.h"
namespace base {
@@ -41,8 +42,11 @@ class GpuJpegDecodeAcceleratorFactoryProvider {
static std::vector<CreateAcceleratorCB> GetAcceleratorFactories();
};
+// TODO(c.padhi): Move GpuJpegDecodeAccelerator to media/gpu/mojo, see
+// http://crbug.com/699255.
class GpuJpegDecodeAccelerator
: public IPC::Sender,
+ public mojom::GpuJpegDecodeAccelerator,
public base::SupportsWeakPtr<GpuJpegDecodeAccelerator> {
public:
// |channel| must outlive this object.
@@ -67,6 +71,15 @@ class GpuJpegDecodeAccelerator
int32_t bitstream_buffer_id,
JpegDecodeAccelerator::Error error);
+ // mojom::GpuJpegDecodeAccelerator implementation.
+ void Initialize(InitializeCallback callback) override;
+ void Decode(mojom::BitstreamBufferPtr input_buffer,
+ const gfx::Size& coded_size,
+ mojo::ScopedSharedBufferHandle output_handle,
+ uint32_t output_buffer_size,
+ DecodeCallback callback) override;
+ void Uninitialize() override;
+
// Function to delegate sending to actual sender.
bool Send(IPC::Message* message) override;
« no previous file with comments | « media/gpu/ipc/service/BUILD.gn ('k') | media/gpu/ipc/service/gpu_jpeg_decode_accelerator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698