-
Notifications
You must be signed in to change notification settings - Fork 4
/
IDisplaySynchronizer.java
60 lines (52 loc) · 1.74 KB
/
IDisplaySynchronizer.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*******************************************************************************************************
*
* IDisplaySynchronizer.java, in msi.gama.core, is part of the source code of the GAMA modeling and simulation platform
* (v.1.8.2).
*
* (c) 2007-2022 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
********************************************************************************************************/
package msi.gama.common.interfaces;
/**
* A simple object that can synchronize the 3 threads in charge of the drawing of the displays: simulation thread
* (simulation-view update mechanism), update thread, and rendering thread
*
* @author drogoul
*
*/
public interface IDisplaySynchronizer {
/**
* Allows any object calling this method to release the thread waiting for the scene to be rendered (called by the
* rendering processes or when this surface is disposed). Nothing to do by default
*/
void signalRenderingIsFinished();
/**
* Makes any thread calling this method wait until either the scene is rendered or the surface is disposed
*/
void waitForRenderingToBeFinished();
/**
* Allows any object calling this method to release the thread waiting for the view to be updated
*/
void authorizeViewUpdate();
/**
* Makes any thread calling this method wait until can be updated
*/
void waitForViewUpdateAuthorisation();
/**
* Wait for surface to be realized.
*/
void waitForSurfaceToBeRealized();
/**
* Signal surface is realized.
*/
void signalSurfaceIsRealized();
/**
* Sets the surface.
*
* @param displaySurface
* the new surface
*/
void setSurface(IDisplaySurface displaySurface);
}