class DummySwapChain extends DummyResource implements Presentable
DummyResource.DummyRecord
Modifier and Type | Field and Description |
---|---|
private int |
h |
private boolean |
opaque |
private PresentableState |
pState |
private DummyRTTexture |
texBackBuffer |
private int |
w |
context
disposerRecord
Constructor and Description |
---|
DummySwapChain(DummyContext context,
PresentableState pState,
DummyRTTexture rtt) |
Modifier and Type | Method and Description |
---|---|
Graphics |
createGraphics() |
void |
dispose() |
Screen |
getAssociatedScreen() |
int |
getContentHeight() |
int |
getContentWidth() |
int |
getContentX() |
int |
getContentY() |
int |
getPhysicalHeight() |
int |
getPhysicalWidth() |
float |
getPixelScaleFactor() |
boolean |
isMSAA() |
boolean |
isOpaque() |
boolean |
lockResources(PresentableState pState)
Locks any underlying resources needed for a createGraphics/prepare/present
sequence and returns a boolean indicating if the presentable needs to be
recreated.
|
boolean |
prepare(Rectangle clip)
display the indicated region to the user.
|
boolean |
present()
present the prepared region to the user.
|
void |
setOpaque(boolean opaque) |
private final PresentableState pState
private final DummyRTTexture texBackBuffer
private int w
private int h
private boolean opaque
DummySwapChain(DummyContext context, PresentableState pState, DummyRTTexture rtt)
public void dispose()
dispose
in interface GraphicsResource
dispose
in class DummyResource
public boolean lockResources(PresentableState pState)
Presentable
GraphicsResource
then its dispose()
method will be
called prior to recreating a new Presentable
object and
so no resource should need to be locked in that case.
The resources will be unlocked in either #prepare()
or
Presentable.present()
.lockResources
in interface Presentable
pState
- The presentation state for the upcoming pulsepublic boolean prepare(Rectangle clip)
Presentable
prepare
in interface Presentable
clip
- display region or null for full areapublic boolean present()
Presentable
present
in interface Presentable
public int getPhysicalWidth()
getPhysicalWidth
in interface Surface
public int getPhysicalHeight()
getPhysicalHeight
in interface Surface
public int getContentWidth()
getContentWidth
in interface Surface
public int getContentHeight()
getContentHeight
in interface Surface
public int getContentX()
getContentX
in interface Surface
public int getContentY()
getContentY
in interface Surface
public float getPixelScaleFactor()
getPixelScaleFactor
in interface Presentable
public Graphics createGraphics()
createGraphics
in interface RenderTarget
public Screen getAssociatedScreen()
getAssociatedScreen
in interface RenderTarget
public boolean isOpaque()
isOpaque
in interface RenderTarget
public void setOpaque(boolean opaque)
setOpaque
in interface RenderTarget
public boolean isMSAA()
isMSAA
in interface RenderTarget