modules/graphics/src/main/java/com/sun/prism/sw/SWPresentable.java
Print this page
*** 56,66 ****
* TODO: make sure the imgrep matches the Pixels.getNativeFormat()
* TODO: dirty region support
*/
int w = getPhysicalWidth();
int h = getPhysicalHeight();
! pixels = pixelSource.getUnusedPixels(w, h, 1.0f);
IntBuffer pixBuf = (IntBuffer) pixels.getPixels();
IntBuffer buf = getSurface().getDataIntBuffer();
assert buf.hasArray();
System.arraycopy(buf.array(), 0, pixBuf.array(), 0, w*h);
return true;
--- 56,66 ----
* TODO: make sure the imgrep matches the Pixels.getNativeFormat()
* TODO: dirty region support
*/
int w = getPhysicalWidth();
int h = getPhysicalHeight();
! pixels = pixelSource.getUnusedPixels(w, h, 1.0f, 1.0f);
IntBuffer pixBuf = (IntBuffer) pixels.getPixels();
IntBuffer buf = getSurface().getDataIntBuffer();
assert buf.hasArray();
System.arraycopy(buf.array(), 0, pixBuf.array(), 0, w*h);
return true;
*** 73,84 ****
pixelSource.enqueuePixels(pixels);
pState.uploadPixels(pixelSource);
return true;
}
! public float getPixelScaleFactor() {
! return pState.getRenderScale();
}
public int getContentWidth() {
return pState.getOutputWidth();
}
--- 73,90 ----
pixelSource.enqueuePixels(pixels);
pState.uploadPixels(pixelSource);
return true;
}
! @Override
! public float getPixelScaleFactorX() {
! return pState.getRenderScaleX();
! }
!
! @Override
! public float getPixelScaleFactorY() {
! return pState.getRenderScaleY();
}
public int getContentWidth() {
return pState.getOutputWidth();
}