Closed Bug 231202 Opened 21 years ago Closed 21 years ago

[BEOS] transparent images defined as background aren't rendered properly

Categories

(Core Graveyard :: GFX: BeOS, defect)

x86
BeOS
defect
Not set
blocker

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sergei_d, Assigned: tor)

Details

Attachments

(5 files, 3 obsolete files)

follow-up to bug 113561
Attached patch Patch (diff -up) (obsolete) — Splinter Review
It works.
Comment on attachment 139235 [details] [diff] [review]
Patch (diff -up)

review request.
See screenshot for testcases
Attachment #139235 - Flags: review?(tor)
reassigning to bustage "author".
Assignee: beos → tor
That's not nsImage (and DrawTile inside it) which breaks transparency.
it is nsRenderingContextBeOS::CopyOffScreenBits().
Attached file multilayer testcase
Attached image correct rendering
Attached image Screenshot
tor,
i managed to work all properly, but (!)
it seems that alpha depth was 0 for that padded tile image.

All started to work properly with that page when i commented out test for alpha
depth of source image (as you see on screenshot).

Is this situation correct, in consistency sense? That we use transparency,
while initial image isn't transparent?

I understand, that this padding patch was workaround for broken transparency in
case when image size is less than container size, but i really wonder this
situation.

So, now i have working code: if(mAlphaDepth || padding)
SetDrawingMode(B_OP_ALPHA);
but it looks more like hack for me.

If it is really how it should work, i can submit final patch soon.
tor, can you verify if bug 224042  is dup?
Attached patch patch (diff -up against HEAD) (obsolete) — Splinter Review
if(mAlphaDepth || padding)
  SetDrawingMode(B_OP_ALPHA);
also minimal optimization in ::CreateImage()
Attachment #139235 - Attachment is obsolete: true
Comment on attachment 139336 [details] [diff] [review]
patch (diff -up against HEAD)

review request
Attachment #139336 - Flags: review?(tor)
Attached patch patch (diff -up against HEAD) (obsolete) — Splinter Review
Same as previous, but there was typo - comment and actual statement were
swapped, so it wouldn'g compile against current tree.
Attachment #139336 - Attachment is obsolete: true
Summary: [BEOS] transparent images defined as background aren't rendern properly → [BEOS] transparent images defined as background aren't rendered properly
Heh, why nobody asks what for we need for x loop for non-padded case? (heh, 3
"for" in 1sentense)
Lets  memcopy perform CPU-featured task itself at max grade.
So, maybe there is reason to separate padded and non padded tiling.
Marking previous patch as concept prove. Maybe checked in case of review to fix
build bustage, but anyway, i will improve it in future
per comment
http://bugzilla.mozilla.org/show_bug.cgi?id=231202#c13
Don't listen. That's result of sleep deprivation.
Obsoleted
Actually i meant such algorythm. Prefilling first mHeight rows in target bitmap
in simple 2d loop, then memcpy in another Y-only loop whole already filled rows.

But cannot predict performance difference at moment.

Only known truth about optimization is that existance of processor cache makes
sometimes loop with single writes much less effective than using big chunks to
write.
Hope it will be checked in
Attachment #139338 - Attachment is obsolete: true
Comment on attachment 139235 [details] [diff] [review]
Patch (diff -up)

removin r=? from old version
Attachment #139235 - Flags: review?(tor)
Comment on attachment 139336 [details] [diff] [review]
patch (diff -up against HEAD)

removing r?
Attachment #139336 - Flags: review?(tor)
Comment on attachment 139410 [details] [diff] [review]
Patch (diff -up against HEAD)

review request.
Time to fix build bustage
Attachment #139410 - Flags: review?(tor)
Attachment #139410 - Flags: review?(tor) → review+
cvs commit: Examining gfx/src/beos
Checking in gfx/src/beos/nsImageBeOS.cpp;
/cvsroot/mozilla/gfx/src/beos/nsImageBeOS.cpp,v  <--  nsImageBeOS.cpp
new revision: 1.26; previous revision: 1.25
done
Checking in gfx/src/beos/nsImageBeOS.h;
/cvsroot/mozilla/gfx/src/beos/nsImageBeOS.h,v  <--  nsImageBeOS.h
new revision: 1.17; previous revision: 1.16
done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
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: