1 /* 2 * Copyright 2021 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package android.gui; 18 19 import android.gui.BitTube; 20 import android.gui.ParcelableVsyncEventData; 21 import android.gui.SchedulingPolicy; 22 23 /** @hide */ 24 interface IDisplayEventConnection { 25 /* 26 * stealReceiveChannel() returns a BitTube to receive events from. Only the receive file 27 * descriptor of outChannel will be initialized, and this effectively "steals" the receive 28 * channel from the remote end (such that the remote end can only use its send channel). 29 */ stealReceiveChannel(out BitTube outChannel)30 void stealReceiveChannel(out BitTube outChannel); 31 32 /* 33 * setVsyncRate() sets the vsync event delivery rate. A value of 1 returns every vsync event. 34 * A value of 2 returns every other event, etc. A value of 0 returns no event unless 35 * requestNextVsync() has been called. 36 */ setVsyncRate(in int count)37 void setVsyncRate(in int count); 38 39 /* 40 * requestNextVsync() schedules the next vsync event. It has no effect if the vsync rate is > 0. 41 */ requestNextVsync()42 oneway void requestNextVsync(); // Asynchronous 43 44 /* 45 * getLatestVsyncEventData() gets the latest vsync event data. 46 */ getLatestVsyncEventData()47 ParcelableVsyncEventData getLatestVsyncEventData(); 48 49 /* 50 * getSchedulingPolicy() used in tests to validate the binder thread pririty 51 */ getSchedulingPolicy()52 SchedulingPolicy getSchedulingPolicy(); 53 } 54