Line data Source code
1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* This Source Code Form is subject to the terms of the Mozilla Public
3 : * License, v. 2.0. If a copy of the MPL was not distributed with this
4 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 :
6 : #include "CompositorWidgetChild.h"
7 : #include "mozilla/Unused.h"
8 :
9 : namespace mozilla {
10 : namespace widget {
11 :
12 0 : CompositorWidgetChild::CompositorWidgetChild(RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher,
13 0 : RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver)
14 : : mVsyncDispatcher(aVsyncDispatcher)
15 0 : , mVsyncObserver(aVsyncObserver)
16 : {
17 0 : MOZ_ASSERT(XRE_IsParentProcess());
18 0 : }
19 :
20 0 : CompositorWidgetChild::~CompositorWidgetChild()
21 : {
22 0 : }
23 :
24 : mozilla::ipc::IPCResult
25 0 : CompositorWidgetChild::RecvObserveVsync()
26 : {
27 0 : mVsyncDispatcher->SetCompositorVsyncObserver(mVsyncObserver);
28 0 : return IPC_OK();
29 : }
30 :
31 : mozilla::ipc::IPCResult
32 0 : CompositorWidgetChild::RecvUnobserveVsync()
33 : {
34 0 : mVsyncDispatcher->SetCompositorVsyncObserver(nullptr);
35 0 : return IPC_OK();
36 : }
37 :
38 : void
39 0 : CompositorWidgetChild::NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize)
40 : {
41 0 : Unused << SendNotifyClientSizeChanged(aClientSize);
42 0 : }
43 :
44 : } // namespace widget
45 : } // namespace mozilla
|