| Index: content/child/child_io_surface_manager_mac.h
|
| diff --git a/content/child/child_io_surface_manager_mac.h b/content/child/child_io_surface_manager_mac.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f8f892387798b94b4e6a4846f25516dfac5722e6
|
| --- /dev/null
|
| +++ b/content/child/child_io_surface_manager_mac.h
|
| @@ -0,0 +1,46 @@
|
| +// 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 CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
|
| +#define CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
|
| +
|
| +#include "base/mac/scoped_mach_port.h"
|
| +#include "base/macros.h"
|
| +#include "base/memory/singleton.h"
|
| +#include "content/common/mac/io_surface_manager.h"
|
| +#include "gpu/command_buffer/common/mailbox.h"
|
| +
|
| +namespace content {
|
| +
|
| +// Implementation of IOSurfaceManager that registers and acquires IOSurfaces
|
| +// through the browser process.
|
| +class CONTENT_EXPORT ChildIOSurfaceManager : public IOSurfaceManager {
|
| + public:
|
| + // Returns the global ChildIOSurfaceManager.
|
| + static ChildIOSurfaceManager* GetInstance();
|
| +
|
| + // Overridden from IOSurfaceManager:
|
| + bool RegisterIOSurface(int io_surface_id,
|
| + int client_id,
|
| + IOSurfaceRef io_surface) override;
|
| + void UnregisterIOSurface(int io_surface_id, int client_id) override;
|
| + IOSurfaceRef AcquireIOSurface(int io_surface_id) override;
|
| +
|
| + void set_mailbox(const gpu::Mailbox& mailbox) { mailbox_ = mailbox; }
|
| +
|
| + private:
|
| + friend struct DefaultSingletonTraits<ChildIOSurfaceManager>;
|
| +
|
| + ChildIOSurfaceManager();
|
| + ~ChildIOSurfaceManager() override;
|
| +
|
| + base::mac::ScopedMachSendRight send_port_;
|
| + gpu::Mailbox mailbox_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(ChildIOSurfaceManager);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_CHILD_CHILD_IO_SURFACE_MANAGER_MAC_H_
|
|
|