I set my program to render 10 frames and exit
First execution, with the following code (backgroundColor=Color.BLACK)
if(backgroundColor!=null){
g.setBackground(backgroundColor);
g.clearRect(0,0,800,600);
g.setBackground(null);
}
I also tried fillRect, but with the same performance
if(backgroundColor!=null){
g.setColor(backgroundColor);
g.fillRect(0,0,800,600);
}
59 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
13 calls to sun.java2d.loops.Blit::Blit(ByteIndexedBm, SrcOverNoEa, IntRgb)
7 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbBm)
14 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcOverNoEa, IntRgb)
7 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(IntArgbBm,
SrcOverNoEa, IntArgbBm)
7 calls to sun.java2d.loops.SetFillRectANY::FillRect(AnyColor, SrcNoEa, Any)
5040 calls to sun.java2d.loops.MaskFill::MaskFill(AnyColor, Src, IntRgb)
13 calls to sun.java2d.loops.Blit::Blit(ThreeByteBgr, SrcNoEa, IntRgb)
7 calls to
sun.awt.windows.Win32BlitLoops$DelegateBlitBgLoop::BlitBg(Any, SrcNoEa,
"Integer RGB DirectDraw with 1 bit transp")
11 calls to DDFillRect
7 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgbBm,
SrcOverNoEa, IntArgbBm)
113 calls to sun.awt.windows.Win32BlitLoops::Blit("Integer RGB
DirectDraw with 1 bit transp", SrcOverNoEa, "Integer RGB DirectDraw")
7 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcNoEa, IntArgb)
7 calls to sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbBm)
1579 calls to sun.awt.windows.Win32BlitLoops::Blit("Integer RGB
DirectDraw", SrcNoEa, "Integer RGB DirectDraw")
6891 total calls to 15 different primitives
This time I removed the code to fill the background
7 calls to
sun.awt.windows.Win32BlitLoops$DelegateBlitBgLoop::BlitBg(Any, SrcNoEa,
"Integer RGB DirectDraw with 1 bit transp")
14 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcOverNoEa, IntRgb)
13 calls to sun.java2d.loops.Blit::Blit(ByteIndexedBm, SrcOverNoEa, IntRgb)
59 calls to sun.java2d.loops.Blit::Blit(IntRgb, SrcNoEa, IntRgb)
290 calls to sun.java2d.loops.MaskFill::MaskFill(AnyColor, Src, IntRgb)
7 calls to sun.java2d.loops.MaskBlit::MaskBlit(IntArgb, AnyAlpha, IntArgbBm)
113 calls to sun.awt.windows.Win32BlitLoops::Blit("Integer RGB
DirectDraw with 1 bit transp", SrcOverNoEa, "Integer RGB DirectDraw")
7 calls to sun.java2d.loops.MaskBlit$General::MaskBlit(IntArgbBm,
SrcOverNoEa, IntArgbBm)
13 calls to sun.java2d.loops.Blit::Blit(ThreeByteBgr, SrcNoEa, IntRgb)
13 calls to DDFillRect
7 calls to sun.java2d.loops.Blit$GeneralMaskBlit::Blit(IntArgbBm,
SrcOverNoEa, IntArgbBm)
7 calls to sun.java2d.loops.SetFillRectANY::FillRect(AnyColor, SrcNoEa, Any)
7 calls to sun.java2d.loops.Blit::Blit(IntArgbBm, SrcNoEa, IntArgb)
7 calls to sun.java2d.loops.Blit::Blit(ByteIndexed, SrcNoEa, IntArgbBm)
1580 calls to sun.awt.windows.Win32BlitLoops::Blit("Integer RGB
DirectDraw", SrcNoEa, "Integer RGB DirectDraw")
2144 total calls to 15 different primitives
Looks like the problem is the MaskBlit
The fill color is solid. Maybe I used something somewhere else? What
could have caused the fillRect function to cause so many MaskFills?
anyway, thanks for your help
Bira
Dmitri Trembovetski wrote:
Hi Bira,
On Sat, Oct 29, 2005 at 07:55:55PM -0300, Bira Neto wrote:
> Hi, I took a little time trying to update my drivers, for video card, mb
> bios, etc. I managed to achieve the same performance I was getting in
> the old system, so it probably was a driver issue.
>
> I still have some doubts.
> I'm using Windows XP and a MSI NX6600 video card on a semprom [EMAIL
PROTECTED]
> The game is being tested with Java 1.5.4
> The game consists of 500x500 tiled sprites as the background with a few
> others 150x150 sprites running over them.
>
> The game performance is
> [EMAIL PROTECTED] windowed, (65 fps lock)
> [EMAIL PROTECTED] fullscreen, (65 fps lock)
>
> Fullscreen is slower than windowed (this one gets me a little confused)
> Filling background (fillrect(0 , 0, 800, 600) ) causes the bad
> performance above.
>
> Without the fillrect method (that was called just once per frame)
> [EMAIL PROTECTED] windowed (65 fps lock)
> [EMAIL PROTECTED] fullscreen (65 fps lock)
>
> My doubts are
>
> Is fullscreen slower than windowed? If so, is the reason portability?
The reason you're getting 60fps in full screen mode is that the
buffer swap is synch-ed to the refresh rate of the monitor. Change
your display mode to 75 Hz, and you'll get a 75fps (or half as that
if your rendering can't keep up).
> The fillRect isn't hardware accelerated? If it's not, could it be?
It sure is, but only for opaque colors. Do you fill with a
translucent color by any chance?
Could you run your application with -Dsun.java2d.trace=count (this
will print the count of rendering primitives used by Java2D at the
program exit) with and w/o the fill rect, and send the results?
Thanks,
Dmitri
Java2D Team
>
> Bira
>
>
>
> Dmitri Trembovetski wrote:
>
> > Hi Bira,
> >
> > could you provide mode details? Which releae are you using? What
> > platform/os?
> >
> > Are you setting any jav2d-related flags/properties?
> >
> > Also, w/o knowing what your application is doing it'd be hard to
> > guess what could be wrong.
> >
> > Thanks,
> > Dmitri
> >
> >
> >
> >On Sun, Oct 23, 2005 at 03:58:28PM -0300, Bira Neto wrote:
> >> I am developing a game using java2d. I had a GEForce4 MX 440, and I was
> >> getting about 40 fps. A few days ago I update to a GEForce 6600, and
> >> even if I was thinking I would get a major fps increase it droped to
> >> abou 30fps.
> >>
> >> Any ideas why it happens (or if there is something wrong with my
> >> configuration...)?
> >>
> >>
> >===========================================================================
> >> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> >body
> >> of the message "signoff JAVA2D-INTEREST". For general help, send email
> >to
> >> [EMAIL PROTECTED] and include in the body of the message "help".
> >
> >===========================================================================
> >To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> >of the message "signoff JAVA2D-INTEREST". For general help, send email to
> >[EMAIL PROTECTED] and include in the body of the message "help".
> >
> >
> >
> >
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff JAVA2D-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".