/src/mozilla-central/widget/gtk/CompositorWidgetChild.cpp
Line | Count | Source (jump to first uncovered line) |
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 | | #include "gfxPlatform.h" |
9 | | |
10 | | namespace mozilla { |
11 | | namespace widget { |
12 | | |
13 | | CompositorWidgetChild::CompositorWidgetChild(RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher, |
14 | | RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver) |
15 | | : mVsyncDispatcher(aVsyncDispatcher) |
16 | | , mVsyncObserver(aVsyncObserver) |
17 | 0 | { |
18 | 0 | MOZ_ASSERT(XRE_IsParentProcess()); |
19 | 0 | MOZ_ASSERT(!gfxPlatform::IsHeadless()); |
20 | 0 | } |
21 | | |
22 | | CompositorWidgetChild::~CompositorWidgetChild() |
23 | 0 | { |
24 | 0 | } |
25 | | |
26 | | mozilla::ipc::IPCResult |
27 | | CompositorWidgetChild::RecvObserveVsync() |
28 | 0 | { |
29 | 0 | mVsyncDispatcher->SetCompositorVsyncObserver(mVsyncObserver); |
30 | 0 | return IPC_OK(); |
31 | 0 | } |
32 | | |
33 | | mozilla::ipc::IPCResult |
34 | | CompositorWidgetChild::RecvUnobserveVsync() |
35 | 0 | { |
36 | 0 | mVsyncDispatcher->SetCompositorVsyncObserver(nullptr); |
37 | 0 | return IPC_OK(); |
38 | 0 | } |
39 | | |
40 | | void |
41 | | CompositorWidgetChild::NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) |
42 | 0 | { |
43 | 0 | Unused << SendNotifyClientSizeChanged(aClientSize); |
44 | 0 | } |
45 | | |
46 | | } // namespace widget |
47 | | } // namespace mozilla |