final class SWPresentable extends SWRTTexture implements Presentable
Texture.Usage, Texture.WrapMode| Modifier and Type | Field and Description |
|---|---|
private Pixels |
pixels |
private QueuedPixelSource |
pixelSource |
private PresentableState |
pState |
allocated, contentHeight, contentWidth, employcount, permanent, physicalHeight, physicalWidth| Constructor and Description |
|---|
SWPresentable(PresentableState pState,
SWResourceFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
int |
getContentHeight()
Returns the content height of this texture, in pixels.
|
int |
getContentWidth()
Returns the content width of this texture, in pixels.
|
float |
getPixelScaleFactor() |
boolean |
isMSAA() |
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 dirtyregion)
display the indicated region to the user.
|
boolean |
present()
present the prepared region to the user.
|
createGraphics, getAssociatedScreen, getDimensions, getPixels, getSurface, isOpaque, isVolatile, readPixels, readPixels, setOpaqueallocateBuffer, applyCompositeAlpha, checkDimensions, createSharedLockedTexture, getDataNoClone, getOffset, getPixelFormat, hasAlpha, update, updateallocate, assertLocked, contentsNotUseful, contentsUseful, create, dispose, getContentX, getContentY, getLastImageSerial, getLinearFiltering, getLockCount, getMaxContentHeight, getMaxContentWidth, getPhysicalHeight, getPhysicalWidth, getResourceFactory, getSharedTexture, getUseMipmap, getWrapMode, isLocked, isSurfaceLost, lock, makePermanent, setContentHeight, setContentWidth, setLastImageSerial, setLinearFiltering, unlock, update, update, update, updateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateGraphics, getAssociatedScreen, isOpaque, setOpaquegetContentX, getContentY, getPhysicalHeight, getPhysicalWidthassertLocked, contentsNotUseful, contentsUseful, getContentX, getContentY, getLastImageSerial, getLinearFiltering, getLockCount, getMaxContentHeight, getMaxContentWidth, getPhysicalHeight, getPhysicalWidth, getPixelFormat, getSharedTexture, getUseMipmap, getWrapMode, isLocked, isSurfaceLost, lock, makePermanent, setContentHeight, setContentWidth, setLastImageSerial, setLinearFiltering, unlock, update, update, update, update, update, updatedisposeprivate final PresentableState pState
private Pixels pixels
private QueuedPixelSource pixelSource
public SWPresentable(PresentableState pState, SWResourceFactory factory)
public boolean lockResources(PresentableState pState)
PresentableGraphicsResource 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 PresentablepState - The presentation state for the upcoming pulsepublic boolean prepare(Rectangle dirtyregion)
Presentableprepare in interface Presentabledirtyregion - display region or null for full areapublic boolean present()
Presentablepresent in interface Presentablepublic float getPixelScaleFactor()
getPixelScaleFactor in interface Presentablepublic int getContentWidth()
TextureFor example, if the hardware does not support non-power-of-two textures, and you call ResourceFactory.createTexture(400, 200), the returned Texture will have physical dimensions of 512x256, but the content dimensions will be 400x200.
getContentWidth in interface SurfacegetContentWidth in interface TexturegetContentWidth in class SWTexturepublic int getContentHeight()
TextureFor example, if the hardware does not support non-power-of-two textures, and you call ResourceFactory.createTexture(400, 200), the returned Texture will have physical dimensions of 512x256, but the content dimensions will be 400x200.
getContentHeight in interface SurfacegetContentHeight in interface TexturegetContentHeight in class SWTexturepublic boolean isMSAA()
isMSAA in interface RenderTargetisMSAA in class SWRTTexture