PUiCompositorController.ipdl (1846B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 * vim: sw=2 ts=8 et : 3 */ 4 /* This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 7 8 using mozilla::CSSRect from "Units.h"; 9 using mozilla::CSSToScreenScale from "Units.h"; 10 using mozilla::ScreenIntSize from "Units.h"; 11 using mozilla::ScreenPoint from "Units.h"; 12 using mozilla::layers::CompositorScrollUpdate from "mozilla/layers/CompositorScrollUpdate.h"; 13 14 include "mozilla/GfxMessageUtils.h"; 15 include "mozilla/layers/LayersMessageUtils.h"; 16 17 namespace mozilla { 18 namespace layers { 19 20 /** 21 * The PUiCompositorController protocol is used to pause and resume the 22 * compositor from the UI thread. Primarily used on Android to coordinate registering and 23 * releasing the surface with the compositor. 24 */ 25 [NeedsOtherPid, ParentProc=compositor, ChildProc=Parent] 26 sync protocol PUiCompositorController 27 { 28 29 parent: 30 // Pause/resume the compositor. These are intended to be used on mobile, when 31 // the compositor needs to pause/resume in lockstep with the application. 32 sync Pause(); 33 sync Resume() returns (bool aOutResumed); 34 sync ResumeAndResize(int32_t aX, int32_t aY, int32_t aWidth, int32_t aHeight) 35 returns (bool aOutResumed); 36 37 async InvalidateAndRender(); 38 async MaxToolbarHeight(int32_t aHeight); 39 async FixedBottomOffset(int32_t aOffset); 40 async DefaultClearColor(uint32_t aColor); 41 async RequestScreenPixels(); 42 async EnableLayerUpdateNotifications(bool aEnable); 43 child: 44 async ToolbarAnimatorMessageFromCompositor(int32_t aMessage); 45 async NotifyCompositorScrollUpdate(CompositorScrollUpdate aUpdate); 46 async ScreenPixels(Shmem aMem, ScreenIntSize aSize, bool aNeedsYFlip); 47 }; 48 49 } // layers 50 } // mozilla