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

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

Issue 2905823002: Add Mojo interfaces for GpuJpegDecodeAccelerator and GpuJpegDecodeAcceleratorHost (Closed)
Patch Set: mojo interface 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
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 f4a3c7a6aa5113a4d99c9d5720575dceea664e1e..9d7e4041337f8d02ce11f9466bef3ace28382585 100644
--- a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h
+++ b/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h
@@ -13,9 +13,10 @@
#include "base/memory/ref_counted.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/waitable_event.h"
-#include "base/threading/non_thread_safe.h"
+#include "base/threading/thread_checker.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 {
@@ -42,8 +43,8 @@ class GpuJpegDecodeAcceleratorFactoryProvider {
};
class GpuJpegDecodeAccelerator
- : public IPC::Sender,
- public base::NonThreadSafe,
+ : public mojom::GpuJpegDecodeAccelerator,
+ public IPC::Sender,
public base::SupportsWeakPtr<GpuJpegDecodeAccelerator> {
public:
// |channel| must outlive this object.
@@ -68,6 +69,12 @@ class GpuJpegDecodeAccelerator
int32_t bitstream_buffer_id,
JpegDecodeAccelerator::Error error);
+ // mojom::GpuJpegDecodeAccelerator implementation.
+ void CreateJpegDecoder(mojom::GpuJpegDecodeAcceleratorClientPtr client,
+ CreateJpegDecoderCallback callback) override;
+ void Decode(mojom::JpegDecodeInfoPtr info) override;
+ void Destroy() override;
+
// Function to delegate sending to actual sender.
bool Send(IPC::Message* message) override;
@@ -94,6 +101,7 @@ class GpuJpegDecodeAccelerator
// Number of clients added to |filter_|.
int client_number_;
+ THREAD_CHECKER(thread_checker_);
DISALLOW_IMPLICIT_CONSTRUCTORS(GpuJpegDecodeAccelerator);
};

Powered by Google App Engine
This is Rietveld 408576698