Closed Bug 316305 Opened 19 years ago Closed 19 years ago

[BeOS]Reduce communication with app_server at painting.

Categories

(Core Graveyard :: GFX: BeOS, defect)

x86
BeOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sergei_d, Assigned: sergei_d)

References

Details

(Keywords: fixed1.8.1)

Attachments

(1 file)

Single repaint may involve several calls for same rendering context, but we are poking app_server with SetFont() and SetColor() at each paint "atom" in LockAndUpdateView();
Actually Font and Color must be set for BView via corresponding nsRenderingContextBeOS methods, and set in LockAndUpdateView() only in case when those wasn't set before.

Seems working here, but i need to test more carefully if we need also to call renderingContext->SetFont/Color in nsWindow::OnPaint() for chrome/XUL items.

Unfortunately this approach don't work for ClipRegion/Rect, especially for chrome. Maybe will return to this one later.
Assignee: beos → sergei_d
Confirming this patch works well under Zeta 1.1.
Ignore comment #1, please.  Posted in wrong bug - sorry.
Attached patch patchSplinter Review
review request.

Setting BView font and color in nsRenderingContext SetFont/Color methods, thus avoiding to reset it at each drawing primitive call inside LockAndUpdate().
Also fixing "float to int" warning.
Attachment #205484 - Flags: review?(thesuckiestemail)
Comment on attachment 205484 [details] [diff] [review]
patch

r=thesuckiestemail@yahoo.se
Attachment #205484 - Flags: review?(thesuckiestemail) → review+
landed in trunk
Checking in mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp;
/cvsroot/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp,v  <--  nsRenderingContextBeOS.cpp
new revision: 1.57; previous revision: 1.56
done
Checking in mozilla/gfx/src/beos/nsRenderingContextBeOS.h;
/cvsroot/mozilla/gfx/src/beos/nsRenderingContextBeOS.h,v  <--  nsRenderingContextBeOS.h
new revision: 1.30; previous revision: 1.29
done
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
this broke the build for me (no matching function for call to GetFontHandle); I checked in a fix (changed the cast to (nsFontHandle&))
Is going to land in the branch.
Blocks: 311032
Comment on attachment 205484 [details] [diff] [review]
patch

Requesting permission to land in the MOZILLA_1_8_BRANCH.

This is a BeOS-only change and does not affect other platforms.

Note: sergei_d: apply after bug 283225.
Attachment #205484 - Flags: approval1.8.1?
Attachment #205484 - Flags: approval1.8.1? → approval1.8.1+
Checking in mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp;
/cvsroot/mozilla/gfx/src/beos/nsRenderingContextBeOS.cpp,v  <--  nsRenderingContextBeOS.cpp
new revision: 1.51.12.6; previous revision: 1.51.12.5
done
Checking in mozilla/gfx/src/beos/nsRenderingContextBeOS.h;
/cvsroot/mozilla/gfx/src/beos/nsRenderingContextBeOS.h,v  <--  nsRenderingContextBeOS.h
new revision: 1.28.12.2; previous revision: 1.28.12.1
done  
Keywords: fixed1.8.1
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: