modules/graphics/src/main/java/com/sun/prism/sw/SWPresentable.java
Print this page
@@ -56,11 +56,11 @@
* 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);
+ 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,12 +73,18 @@
pixelSource.enqueuePixels(pixels);
pState.uploadPixels(pixelSource);
return true;
}
- public float getPixelScaleFactor() {
- return pState.getRenderScale();
+ @Override
+ public float getPixelScaleFactorX() {
+ return pState.getRenderScaleX();
+ }
+
+ @Override
+ public float getPixelScaleFactorY() {
+ return pState.getRenderScaleY();
}
public int getContentWidth() {
return pState.getOutputWidth();
}