Closed
Bug 230632
Opened 21 years ago
Closed 21 years ago
[BEOS] nsImage::DrawTile() to be rewritten
Categories
(Core Graveyard :: GFX: BeOS, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: sergei_d, Assigned: sergei_d)
References
()
Details
Attachments
(1 file, 3 obsolete files)
20.89 KB,
patch
|
Details | Diff | Splinter Review |
Currently DrawTile uses two-dimesnional loop which is calling
BView::DrawBitmapSaync() to render tiled background.
On such sites as http:://www.nbc.com it causes calling DrawBitmap up to about
MILLION (1 000 000) times, depending on window size.
As DrawBitmap*() involves app_server even called on BView, attached to
off-screen BBitmap, it causes absolutely untolerable speed drop. Especially
if/when some scaling/cropping appears
Such code must be replaced. Idea is:
1)create temporary bitmap with size of repaint area.
2)render tile image on that tmpbitmap using memcpy() operations
3)use DrawBitmap once - to render prepared image of repaint-area to drawing surface.
Notice for those who are unfamiliar with Mozilla drawing. We cannot use memcpy
to render tiles on drawin surface itself, without tmpbitmap.
Because that surfce is abstractions over several type of canvas and there may be
as BBitmap behind it, but also BWindow. We don't know it, and we shoudln't rely
on such assumptions.
Draft patch for testers will be submittted soon.
Assignee | ||
Comment 1•21 years ago
|
||
rewrite of DrawTile. Adds huge performance boost on some sites. Needs testing
for
proper rendering in sense of +/- 1 bounds' size of tiled images - there is bigg
mess between inclusive and exclusive rects in Mozilla API and BeOS API.
NB. There is something weird with CVS here, so i got fii like patch for bug
230457 wasn't checked in. So you should look at your sources, if that pattch
don't apply cleanly.
Assignee | ||
Comment 2•21 years ago
|
||
Additionally to mentioned above changes:
Get rid of BView::DrawBitmapAsync everywhere - no need for it if we immediately
foloowed it with BView::Sync().
Replaced with DrawBitmap(). All BView::Sync() calls removed
No more need for DrawNoLock() method - removed
Removed unpaired BView::LockLooper() occurence
And, bacuse half of code was in
foo {
}
style,
and half with
foo
{
}
i restyled it with preffered by me and BeIDE
Assignee | ||
Updated•21 years ago
|
Attachment #138806 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Assignee: arougthopher → sergei_d
Assignee | ||
Comment 3•21 years ago
|
||
Comment on attachment 138819 [details] [diff] [review]
Attempt of final patch (diff -uwp)
review request.
Ohh...
Attachment #138819 -
Flags: review?(timeless)
Comment on attachment 138819 [details] [diff] [review]
Attempt of final patch (diff -uwp)
>Index: nsImageBeOS.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/gfx/src/beos/nsImageBeOS.cpp,v
>retrieving revision 1.24
>diff -u -w -p -r1.24 nsImageBeOS.cpp
>--- nsImageBeOS.cpp 10 Jan 2004 14:37:08 -0000 1.24
>+++ nsImageBeOS.cpp 11 Jan 2004 21:31:38 -0000
>@@ -183,7 +201,8 @@ NS_IMETHODIMP nsImageBeOS::Draw(nsIRende
>
> // Draw the bitmap, this draw just has destination coordinates
> NS_IMETHODIMP nsImageBeOS::Draw(nsIRenderingContext &aContext, nsDrawingSurface aSurface,
>- PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight) {
>+ PRInt32 aX, PRInt32 aY, PRInt32 aWidth, PRInt32 aHeight)
>+ {
Shouldn't this { not be indented?
>
> // XXX kipp: this is temporary code until we eliminate the
> // width/height arguments from the draw method.
Assignee | ||
Updated•21 years ago
|
Summary: [BEOS] nsImage::DrawTile() to be rewitten → [BEOS] nsImage::DrawTile() to be rewritten
Assignee | ||
Comment 5•21 years ago
|
||
Ident corrected.
Timeless, can you checkin that immediately?
I need to do cvs co update, in order to test renewed patch for nsWindow, and
don wish to mess with restring my gfx folder after checkout
Assignee | ||
Updated•21 years ago
|
Attachment #138819 -
Attachment is obsolete: true
Attachment #138819 -
Flags: review?(timeless)
Comment on attachment 138879 [details] [diff] [review]
Patch (diff -uwp_
i can't commit -w patches
Attachment #138879 -
Flags: review+
Assignee | ||
Comment 7•21 years ago
|
||
Exactly as previous. Diff flags changed
Assignee | ||
Updated•21 years ago
|
Attachment #138879 -
Attachment is obsolete: true
Assignee | ||
Comment 8•21 years ago
|
||
It seems timeless checked it in already.
So, marking FIXED
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Updated•16 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•