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

Unified Diff: media/gpu/mojo/client/gpu_jpeg_decode_accelerator_host.h

Issue 2923933004: [NotForReview] Move GJDAH and GJDA to media/gpu/mojo
Patch Set: . Created 3 years, 6 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/mojo/client/BUILD.gn ('k') | media/gpu/mojo/client/gpu_jpeg_decode_accelerator_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/gpu/mojo/client/gpu_jpeg_decode_accelerator_host.h
diff --git a/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h b/media/gpu/mojo/client/gpu_jpeg_decode_accelerator_host.h
similarity index 69%
rename from media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h
rename to media/gpu/mojo/client/gpu_jpeg_decode_accelerator_host.h
index 5dcefbfeb5490f57e2bbf785b9f92f6065006808..c8d5cb1f439832b6fe71875ce783bf4e93d9894d 100644
--- a/media/gpu/ipc/client/gpu_jpeg_decode_accelerator_host.h
+++ b/media/gpu/mojo/client/gpu_jpeg_decode_accelerator_host.h
@@ -12,33 +12,22 @@
#include "base/macros.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
+#include "media/gpu/mojo/common/jpeg_decoder.mojom.h"
#include "media/video/jpeg_decode_accelerator.h"
namespace base {
class SingleThreadTaskRunner;
}
-namespace gpu {
-class GpuChannelHost;
-}
-
-namespace IPC {
-class Listener;
-class Message;
-}
-
namespace media {
-// TODO(c.padhi): Move GpuJpegDecodeAcceleratorHost to media/gpu/mojo, see
-// http://crbug.com/699255.
// This class is used to talk to JpegDecodeAccelerator in the GPU process
-// through IPC messages.
+// through Mojo messages.
class GpuJpegDecodeAcceleratorHost : public JpegDecodeAccelerator {
public:
GpuJpegDecodeAcceleratorHost(
- scoped_refptr<gpu::GpuChannelHost> channel,
- int32_t route_id,
- const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner);
+ scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
+ mojom::GpuJpegDecodeAcceleratorPtrInfo jpeg_decoder_info);
~GpuJpegDecodeAcceleratorHost() override;
// JpegDecodeAccelerator implementation.
@@ -49,22 +38,16 @@ class GpuJpegDecodeAcceleratorHost : public JpegDecodeAccelerator {
const scoped_refptr<VideoFrame>& video_frame) override;
bool IsSupported() override;
- base::WeakPtr<IPC::Listener> GetReceiver();
-
private:
- class Receiver;
-
- void Send(IPC::Message* message);
-
- scoped_refptr<gpu::GpuChannelHost> channel_;
-
- // Route ID for the associated decoder in the GPU process.
- int32_t decoder_route_id_;
+ void OnDecodeAck(int32_t bitstream_buffer_id, mojom::Error error);
+ void OnDecodeAckOnIOThread(int32_t bitstream_buffer_id, mojom::Error error);
// GPU IO task runner.
scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
- std::unique_ptr<Receiver> receiver_;
+ Client* client_;
+
+ mojom::GpuJpegDecodeAcceleratorPtr jpeg_decoder_;
SEQUENCE_CHECKER(sequence_checker_);
« no previous file with comments | « media/gpu/mojo/client/BUILD.gn ('k') | media/gpu/mojo/client/gpu_jpeg_decode_accelerator_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698