< prev index next >
src/java.desktop/macosx/classes/sun/java2d/OSXOffScreenSurfaceData.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2011, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 169,179 ****
SurfaceType sType = SurfaceType.Custom;
int transferType = cm.getTransferType();
int pixelSize = cm.getPixelSize();
int numOfComponents = cm.getNumColorComponents();
if ((numOfComponents == 3) && (cm instanceof ComponentColorModel) && (sm instanceof PixelInterleavedSampleModel)) {
! int sizes[] = cm.getComponentSize();
boolean validsizes = (sizes[0] == 8) && (sizes[1] == 8) && (sizes[2] == 8);
int[] offs = ((ComponentSampleModel) sm).getBandOffsets();
int numBands = raster.getNumBands();
boolean bigendian = (offs[0] == numBands - 3) && (offs[1] == numBands - 2) && (offs[2] == numBands - 1);
boolean littleendian = (offs[0] == numBands - 1) && (offs[1] == numBands - 2) && (offs[2] == numBands - 3);
--- 169,179 ----
SurfaceType sType = SurfaceType.Custom;
int transferType = cm.getTransferType();
int pixelSize = cm.getPixelSize();
int numOfComponents = cm.getNumColorComponents();
if ((numOfComponents == 3) && (cm instanceof ComponentColorModel) && (sm instanceof PixelInterleavedSampleModel)) {
! int[] sizes = cm.getComponentSize();
boolean validsizes = (sizes[0] == 8) && (sizes[1] == 8) && (sizes[2] == 8);
int[] offs = ((ComponentSampleModel) sm).getBandOffsets();
int numBands = raster.getNumBands();
boolean bigendian = (offs[0] == numBands - 3) && (offs[1] == numBands - 2) && (offs[2] == numBands - 1);
boolean littleendian = (offs[0] == numBands - 1) && (offs[1] == numBands - 2) && (offs[2] == numBands - 3);
< prev index next >