[Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread Mike Mountain
Just messing around converting some double buffering AS2 routines to AS3
when I stumbled upon lock() and unlock() - does this make double
buffering unnecessary? I'm not noticing any immediate speed differences
between my routine using double buffering and my test with
lock()/unlock().

Cheers

M
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread dan
WHEN IS FLASH WITH AS3 COMING OUT?
NOT THE BETA?
ANY IDEAS?


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread Meinte van't Kruis

from the AS3 reference:

Locks an image so that any objects that reference the BitmapData object,
such as Bitmap objects, are not updated when this BitmapData object changes.
To improve performance, use this method along with the unlock() method
before and after numerous calls to the setPixel() or setPixel32() method.


With this in mind, it does seem to function like a double buffering
mechanism, since you can actually
alter bitmapdata before showing it on screen, therefor avoidoing the image
to show while processing it.

-Meinte

On 8/16/06, dan [EMAIL PROTECTED] wrote:


WHEN IS FLASH WITH AS3 COMING OUT?
NOT THE BETA?
ANY IDEAS?


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread Mike Mountain
That's how I read it, just wondered if anyone had done any real
performance comparisions - my test is fairly simple.

M

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Meinte van't Kruis
 Sent: 16 August 2006 10:43
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] AS3 bitmapdata lock/unlock
 
 from the AS3 reference:
 
 Locks an image so that any objects that reference the 
 BitmapData object, such as Bitmap objects, are not updated 
 when this BitmapData object changes.
 To improve performance, use this method along with the 
 unlock() method before and after numerous calls to the 
 setPixel() or setPixel32() method.
 
 
 With this in mind, it does seem to function like a double 
 buffering mechanism, since you can actually alter bitmapdata 
 before showing it on screen, therefor avoidoing the image to 
 show while processing it.
 
 -Meinte
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread Nicolas Cannasse
 WHEN IS FLASH WITH AS3 COMING OUT?
 NOT THE BETA?
 ANY IDEAS?

With next version of haXe you'll be able to build Flash9 content ;)
http://haxe.org

Nicolas
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread Hauwert, Ralph
Actually doublebuffering or pageflipping routines could easily use these
functions for optimizations. The thing is, that as soon as you swap out
one bitmapdata for another (or the holder bitmap class), you lock it
anyway.

The lock function on itself does not replace the functions of a double /
triple / frame buffer or a pageflipping routine. But you could easily
intergrate these functions.

I've did some speed comparisons; lock and unlock make a great deal of
difference in speed; if you are writing a large amount of pixels,
rectangles; be sure to lock first.

Ralph.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Meinte
van't Kruis
Sent: woensdag 16 augustus 2006 11:43
To: Flashcoders mailing list
Subject: Re: [Flashcoders] AS3 bitmapdata lock/unlock

from the AS3 reference:

Locks an image so that any objects that reference the BitmapData object,
such as Bitmap objects, are not updated when this BitmapData object
changes.
To improve performance, use this method along with the unlock() method
before and after numerous calls to the setPixel() or setPixel32()
method.


With this in mind, it does seem to function like a double buffering
mechanism, since you can actually
alter bitmapdata before showing it on screen, therefor avoidoing the
image
to show while processing it.

-Meinte

On 8/16/06, dan [EMAIL PROTECTED] wrote:

 WHEN IS FLASH WITH AS3 COMING OUT?
 NOT THE BETA?
 ANY IDEAS?


 ___
 Flashcoders@chattyfig.figleaf.com
 To change your subscription options or search the archive:
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 Brought to you by Fig Leaf Software
 Premier Authorized Adobe Consulting and Training
 http://www.figleaf.com
 http://training.figleaf.com

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread Mike Mountain
Hi Ralph

If you're feeling generous I'd be interested in seeing the source for
those comparisons

Cheers

M

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Hauwert, Ralph
 Sent: 16 August 2006 11:16
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] AS3 bitmapdata lock/unlock
 
 Actually doublebuffering or pageflipping routines could 
 easily use these functions for optimizations. The thing is, 
 that as soon as you swap out one bitmapdata for another (or 
 the holder bitmap class), you lock it anyway.
 
 The lock function on itself does not replace the functions of 
 a double / triple / frame buffer or a pageflipping routine. 
 But you could easily intergrate these functions.
 
 I've did some speed comparisons; lock and unlock make a great 
 deal of difference in speed; if you are writing a large 
 amount of pixels, rectangles; be sure to lock first.
 
 Ralph.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread Hauwert, Ralph
Hi Mike,

I won't be posting the source of this one yet (it's a mess), but I
quickly converted this Beta 2 / 3 example I did to illustrate the power
of .lock().

http://www.unitzeroone.com/flex_2/mandelbrot_explorer/

It's a simple Mandelbrot explorer, it was one of my first attempts of
creating a Flex component. I just polished it up so it works again, it's
not finished.
If you first change the settings to one of the larger ones (Either HUGE,
Fraczilla or WS), then hit draw, look at the Ms, then change the lock
checkbox, hit draw again, and see the MS rise. On my duo core machine it
makes about 200Ms of difference in WS size.

Ralph.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Mountain
Sent: woensdag 16 augustus 2006 12:19
To: Flashcoders mailing list
Subject: RE: [Flashcoders] AS3 bitmapdata lock/unlock

Hi Ralph

If you're feeling generous I'd be interested in seeing the source for
those comparisons

Cheers

M

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf 
 Of Hauwert, Ralph
 Sent: 16 August 2006 11:16
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] AS3 bitmapdata lock/unlock
 
 Actually doublebuffering or pageflipping routines could 
 easily use these functions for optimizations. The thing is, 
 that as soon as you swap out one bitmapdata for another (or 
 the holder bitmap class), you lock it anyway.
 
 The lock function on itself does not replace the functions of 
 a double / triple / frame buffer or a pageflipping routine. 
 But you could easily intergrate these functions.
 
 I've did some speed comparisons; lock and unlock make a great 
 deal of difference in speed; if you are writing a large 
 amount of pixels, rectangles; be sure to lock first.
 
 Ralph.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] AS3 bitmapdata lock/unlock

2006-08-16 Thread David Rorex

Wow that's neat, I'm a big fan of the Mandelbrot set. (offtopic, I
just created an explorer for the nintendo DS: http://blog.davr.org/ ).
I definately look forward to seeing the source when you finish it up.

-David R

On 8/16/06, Hauwert, Ralph [EMAIL PROTECTED] wrote:

Hi Mike,

I won't be posting the source of this one yet (it's a mess), but I
quickly converted this Beta 2 / 3 example I did to illustrate the power
of .lock().

http://www.unitzeroone.com/flex_2/mandelbrot_explorer/

It's a simple Mandelbrot explorer, it was one of my first attempts of
creating a Flex component. I just polished it up so it works again, it's
not finished.
If you first change the settings to one of the larger ones (Either HUGE,
Fraczilla or WS), then hit draw, look at the Ms, then change the lock
checkbox, hit draw again, and see the MS rise. On my duo core machine it
makes about 200Ms of difference in WS size.

Ralph.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike
Mountain
Sent: woensdag 16 augustus 2006 12:19
To: Flashcoders mailing list
Subject: RE: [Flashcoders] AS3 bitmapdata lock/unlock

Hi Ralph

If you're feeling generous I'd be interested in seeing the source for
those comparisons

Cheers

M

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf
 Of Hauwert, Ralph
 Sent: 16 August 2006 11:16
 To: Flashcoders mailing list
 Subject: RE: [Flashcoders] AS3 bitmapdata lock/unlock

 Actually doublebuffering or pageflipping routines could
 easily use these functions for optimizations. The thing is,
 that as soon as you swap out one bitmapdata for another (or
 the holder bitmap class), you lock it anyway.

 The lock function on itself does not replace the functions of
 a double / triple / frame buffer or a pageflipping routine.
 But you could easily intergrate these functions.

 I've did some speed comparisons; lock and unlock make a great
 deal of difference in speed; if you are writing a large
 amount of pixels, rectangles; be sure to lock first.

 Ralph.
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com