2016-06-11 05:27:24 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=99: */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef _include_mozilla_gfx_ipc_GPUChild_h_
|
|
|
|
#define _include_mozilla_gfx_ipc_GPUChild_h_
|
|
|
|
|
2016-07-19 21:56:06 +03:00
|
|
|
#include "mozilla/RefPtr.h"
|
2016-06-11 05:37:03 +03:00
|
|
|
#include "mozilla/UniquePtr.h"
|
2016-07-19 21:56:06 +03:00
|
|
|
#include "mozilla/gfx/PGPUChild.h"
|
2016-08-04 21:33:42 +03:00
|
|
|
#include "mozilla/gfx/gfxVarReceiver.h"
|
2016-06-11 05:27:24 +03:00
|
|
|
|
|
|
|
namespace mozilla {
|
|
|
|
namespace gfx {
|
|
|
|
|
2016-06-11 05:37:03 +03:00
|
|
|
class GPUProcessHost;
|
|
|
|
|
2016-08-04 21:33:42 +03:00
|
|
|
class GPUChild final
|
|
|
|
: public PGPUChild,
|
|
|
|
public gfxVarReceiver
|
2016-06-11 05:27:24 +03:00
|
|
|
{
|
|
|
|
public:
|
2016-06-11 05:37:03 +03:00
|
|
|
explicit GPUChild(GPUProcessHost* aHost);
|
2016-06-11 05:27:24 +03:00
|
|
|
~GPUChild();
|
2016-06-11 05:37:03 +03:00
|
|
|
|
2016-06-27 09:33:20 +03:00
|
|
|
void Init();
|
|
|
|
|
2016-08-04 21:33:42 +03:00
|
|
|
// gfxVarReceiver overrides.
|
|
|
|
void OnVarChanged(const GfxVarUpdate& aVar) override;
|
2016-06-11 05:37:03 +03:00
|
|
|
|
2016-08-04 21:33:42 +03:00
|
|
|
// PGPUChild overrides.
|
2016-06-11 05:37:03 +03:00
|
|
|
void ActorDestroy(ActorDestroyReason aWhy) override;
|
|
|
|
|
2016-08-04 21:33:42 +03:00
|
|
|
static void Destroy(UniquePtr<GPUChild>&& aChild);
|
|
|
|
|
2016-06-11 05:37:03 +03:00
|
|
|
private:
|
|
|
|
GPUProcessHost* mHost;
|
2016-06-11 05:27:24 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace gfx
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // _include_mozilla_gfx_ipc_GPUChild_h_
|