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

Unified Diff: content/common/gpu/client/ipc/gpu_jpeg_decode_accelerator_host_ipc_transport.h

Issue 1656433002: Sample code: IPC Transport object for GPU Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GpuMemoryBufferService + Transport object. TODO: Eliminate ChildThreadImpl dependency Created 4 years, 10 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: content/common/gpu/client/ipc/gpu_jpeg_decode_accelerator_host_ipc_transport.h
diff --git a/content/common/gpu/client/ipc/gpu_jpeg_decode_accelerator_host_ipc_transport.h b/content/common/gpu/client/ipc/gpu_jpeg_decode_accelerator_host_ipc_transport.h
new file mode 100644
index 0000000000000000000000000000000000000000..59f7a396db7b7bbfe90b32f964a7d72be5ef49f4
--- /dev/null
+++ b/content/common/gpu/client/ipc/gpu_jpeg_decode_accelerator_host_ipc_transport.h
@@ -0,0 +1,43 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_COMMON_GPU_CLIENT_IPC_GPU_JPEG_DECODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
+#define CONTENT_COMMON_GPU_CLIENT_IPC_GPU_JPEG_DECODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_
+
+#include <stdint.h>
+
+#include "media/video/jpeg_decode_accelerator.h"
+
+namespace content {
+
+struct JpegDecodeParams;
+
+// Note: The implementation of this interface is assumed to live on the UI
+// thread.
+class GpuJpegDecodeAcceleratorHostIPCTransport {
+ public:
+ // Note: This listener is assumed to live on the IO thread.
+ class Client {
+ public:
+ virtual void OnDecodeAck(int32_t bitstream_buffer_id,
+ media::JpegDecodeAccelerator::Error error) = 0;
+
+ protected:
+ virtual ~Client() {}
+ };
+
+ virtual ~GpuJpegDecodeAcceleratorHostIPCTransport() {}
+
+ virtual bool CreateJpegDecoder(bool* succeeded) = 0;
+
+ virtual bool Decode(const JpegDecodeParams& params) = 0;
+
+ virtual bool Destroy() = 0;
+
+ virtual void SetClient(Client* client) = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_COMMON_GPU_CLIENT_IPC_GPU_JPEG_DECODE_ACCELERATOR_HOST_IPC_TRANSPORT_H_

Powered by Google App Engine
This is Rietveld 408576698