Cross Reference: OGLSurfaceDataProxy.java
xref
: /
openjdk7
/
jdk
/
src
/
share
/
classes
/
sun
/
java2d
/
opengl
/
OGLSurfaceDataProxy.java
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
0
N/A
/*
5875
N/A
* Copyright (c) 2013, Oracle
and
/
or
its affiliates. All rights reserved.
0
N/A
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0
N/A
*
0
N/A
* This code is free software; you can redistribute it
and
/
or
modify it
0
N/A
* under the terms of the GNU General Public License version 2 only, as
2362
N/A
* published by the Free Software Foundation. Oracle designates this
0
N/A
* particular file as subject to the "Classpath" exception as provided
2362
N/A
* by Oracle in the LICENSE file that accompanied this code.
0
N/A
*
0
N/A
* This code is distributed in the hope that it will be useful, but WITHOUT
0
N/A
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0
N/A
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0
N/A
* version 2 for more details (a copy is included in the LICENSE file that
0
N/A
* accompanied this code).
0
N/A
*
0
N/A
* You should have received a copy of the GNU General Public License version
0
N/A
* 2 along with this work; if not, write to the Free Software Foundation,
0
N/A
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0
N/A
*
2362
N/A
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362
N/A
* or visit www.oracle.com if you need additional information or have any
2362
N/A
* questions.
0
N/A
*/
0
N/A
0
N/A
package
sun
.
java2d
.
opengl
;
0
N/A
0
N/A
import
java
.
awt
.
Color
;
0
N/A
import
java
.
awt
.
Transparency
;
0
N/A
0
N/A
import
sun
.
java2d
.
SurfaceData
;
0
N/A
import
sun
.
java2d
.
SurfaceDataProxy
;
0
N/A
import
sun
.
java2d
.
loops
.
SurfaceType
;
0
N/A
import
sun
.
java2d
.
loops
.
CompositeType
;
0
N/A
0
N/A
/**
0
N/A
* The proxy class contains the logic for when to replace a
0
N/A
* SurfaceData with a cached OGL Texture and the code to create
0
N/A
* the accelerated surfaces.
0
N/A
*/
0
N/A
public
class
OGLSurfaceDataProxy
extends
SurfaceDataProxy
{
0
N/A
public
static
SurfaceDataProxy
createProxy
(
SurfaceData
srcData
,
0
N/A
OGLGraphicsConfig
dstConfig
)
0
N/A
{
0
N/A
if
(
srcData
instanceof
OGLSurfaceData
) {
0
N/A
// srcData must be a VolatileImage which either matches
0
N/A
// our pixel format or not - either way we do not cache it...
0
N/A
return
UNCACHED
;
0
N/A
}
0
N/A
0
N/A
return
new
OGLSurfaceDataProxy
(
dstConfig
,
srcData
.
getTransparency
());
0
N/A
}
0
N/A
0
N/A
OGLGraphicsConfig
oglgc
;
0
N/A
int
transparency
;
0
N/A
0
N/A
public
OGLSurfaceDataProxy
(
OGLGraphicsConfig
oglgc
,
int
transparency
) {
0
N/A
this
.
oglgc
=
oglgc
;
0
N/A
this
.
transparency
=
transparency
;
0
N/A
}
0
N/A
0
N/A
@
Override
0
N/A
public
SurfaceData
validateSurfaceData
(
SurfaceData
srcData
,
0
N/A
SurfaceData
cachedData
,
0
N/A
int
w,
int
h)
0
N/A
{
0
N/A
if
(
cachedData
==
null
) {
0
N/A
cachedData
=
oglgc
.
createManagedSurface
(w, h,
transparency
);
0
N/A
}
0
N/A
return
cachedData
;
0
N/A
}
0
N/A
0
N/A
@
Override
0
N/A
public
boolean
isSupportedOperation
(
SurfaceData
srcData
,
0
N/A
int
txtype
,
0
N/A
CompositeType
comp
,
0
N/A
Color
bgColor
)
Error!
Full Search
Definition
Symbol
File Path
History
In Project(s)
select all
invert selection
ast
bind-9.11.3
bind-9.6-ESV-R11
dovecot
ec
forgerock
gkrellm-k10addon
glassfish
glassfish-3.1.2
glassfish.hg
hets
httpd
illumos-gate
inkscape
javamail
k10sensor
libmicro
lucene-3.6.0
lxc
ontohub
opengrok
opengrok-jel
opengrok-sun
openjdk7
osnet-11
owl-s
pkg
scfdot
sendmail
solaris-desktop
solaris-userland
solaris-userland-s11u3
solaris-x11-s11
solaris-x11-s12
sssd
sssd-io
systemd
vbox
yui3
Search
Clear
Help
There was an error!
null
java.lang.NullPointerException