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

Unified Diff: media/gpu/ipc/service/gpu_jpeg_decode_accelerator.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/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
deleted file mode 100644
index 811ad6ec6ad12a51bf118ad72334d10c84767a82..0000000000000000000000000000000000000000
--- a/media/gpu/ipc/service/gpu_jpeg_decode_accelerator.h
+++ /dev/null
@@ -1,116 +0,0 @@
-// Copyright 2015 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 MEDIA_GPU_IPC_SERVICE_GPU_JPEG_DECODE_ACCELERATOR_H_
-#define MEDIA_GPU_IPC_SERVICE_GPU_JPEG_DECODE_ACCELERATOR_H_
-
-#include <stdint.h>
-
-#include <memory>
-
-#include "base/macros.h"
-#include "base/memory/ref_counted.h"
-#include "base/memory/weak_ptr.h"
-#include "base/sequence_checker.h"
-#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 {
-class SingleThreadTaskRunner;
-}
-
-namespace gpu {
-class FilteredSender;
-}
-
-namespace media {
-
-class GpuJpegDecodeAcceleratorFactoryProvider {
- public:
- using CreateAcceleratorCB =
- base::Callback<std::unique_ptr<JpegDecodeAccelerator>(
- scoped_refptr<base::SingleThreadTaskRunner>)>;
-
- // Static query for JPEG supported. This query calls the appropriate
- // platform-specific version.
- static bool IsAcceleratedJpegDecodeSupported();
-
- 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.
- // This convenience constructor internally calls
- // GpuJpegDecodeAcceleratorFactoryProvider::GetAcceleratorFactories() to
- // fill |accelerator_factory_functions_|.
- GpuJpegDecodeAccelerator(
- gpu::FilteredSender* channel,
- scoped_refptr<base::SingleThreadTaskRunner> io_task_runner);
-
- // |channel| must outlive this object.
- GpuJpegDecodeAccelerator(
- gpu::FilteredSender* channel,
- scoped_refptr<base::SingleThreadTaskRunner> io_task_runner,
- std::vector<GpuJpegDecodeAcceleratorFactoryProvider::CreateAcceleratorCB>
- accelerator_factory_functions);
- ~GpuJpegDecodeAccelerator() override;
-
- void AddClient(int32_t route_id, base::Callback<void(bool)> response);
-
- void NotifyDecodeStatus(int32_t route_id,
- 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;
-
- private:
- class Client;
- class MessageFilter;
-
- void ClientRemoved();
-
- std::vector<GpuJpegDecodeAcceleratorFactoryProvider::CreateAcceleratorCB>
- accelerator_factory_functions_;
-
- gpu::FilteredSender* channel_;
-
- // The message filter to run JpegDecodeAccelerator::Decode on IO thread.
- scoped_refptr<MessageFilter> filter_;
-
- // GPU child task runner.
- scoped_refptr<base::SingleThreadTaskRunner> child_task_runner_;
-
- // GPU IO task runner.
- scoped_refptr<base::SingleThreadTaskRunner> io_task_runner_;
-
- // Number of clients added to |filter_|.
- int client_number_;
-
- SEQUENCE_CHECKER(sequence_checker_);
-
- DISALLOW_IMPLICIT_CONSTRUCTORS(GpuJpegDecodeAccelerator);
-};
-
-} // namespace media
-
-#endif // MEDIA_GPU_IPC_SERVICE_GPU_JPEG_DECODE_ACCELERATOR_H_
« 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