Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (804)
Games in Android Showcase (237)
games submitted by our members
Games in WIP (867)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  what is sun.java.loops.MaskBlit.MaskBlit?  (Read 2848 times)
0 Members and 1 Guest are viewing this topic.
Offline phu004

JGO Knight


Medals: 19
Projects: 10
Exp: 10 years


NoSuchPersonException


« Posted 2007-02-16 11:33:04 »

HI,  I tried to runned my application with "-Xprof", and I found roughly 15% of the time was spent on sun.java.loops.MaskBlit.MaskBlit. Can anyone breifly tell me what the
hell is sun.java.loops.MaskBlit.MaskBlit, and what it does? I couldn't get any useful imformation from google.

Thanks
Offline Mr_Light

Senior Devvie


Medals: 1


shiny.


« Reply #1 - Posted 2007-02-16 13:05:45 »

do you mean sun.java2d.loops.MaskBlit.MaskBlit ?

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline princec

« JGO Spiffy Duke »


Medals: 1136
Projects: 3
Exp: 20 years


Eh? Who? What? ... Me?


« Reply #2 - Posted 2007-02-16 13:59:48 »

All it is, is an internal blitting routine for drawing images.

Cas Smiley

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline phu004

JGO Knight


Medals: 19
Projects: 10
Exp: 10 years


NoSuchPersonException


« Reply #3 - Posted 2007-02-16 23:06:32 »

All it is, is an internal blitting routine for drawing images.

Cas Smiley

Thanks.  It seems drawing images is quite expensive. I only draw one image(640*480*32) at each frame, the image itself is created using MemoryImageSource.
Later I tried to construct MemoryImageSource using a different way:

source = new MemoryImageSource(640, 480, new DirectColorModel(24, 0x00ff0000, 0x0000ff00, 0x000000ff),  screen, 0, 640);
(now source will create image with 24 bits color  instead of 32 bits)

The performance increased significantly,  and the "sun.java2d.loops.Blit.Blit" now only occupies 7% of the cpu.
Offline Abuse

JGO Ninja


Medals: 72


falling into the abyss of reality


« Reply #4 - Posted 2007-02-23 00:20:36 »

MemoryImageSource is not the optimal way of drawing images, it was made redundant by BufferedImage(and supporting classes) way back in java1.2
Pages: [1]
  ignore  |  Print  
 
 

 
Riven (463 views)
2019-09-04 15:33:17

hadezbladez (5323 views)
2018-11-16 13:46:03

hadezbladez (2249 views)
2018-11-16 13:41:33

hadezbladez (5599 views)
2018-11-16 13:35:35

hadezbladez (1164 views)
2018-11-16 13:32:03

EgonOlsen (4600 views)
2018-06-10 19:43:48

EgonOlsen (5474 views)
2018-06-10 19:43:44

EgonOlsen (3139 views)
2018-06-10 19:43:20

DesertCoockie (4033 views)
2018-05-13 18:23:11

nelsongames (4782 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!