Open
Bug 592037
Opened 14 years ago
Updated 2 years ago
Remove mSize from gfx***Surface implementations and use cairo functionality directly
Categories
(Core :: Graphics, defect)
Tracking
()
NEW
People
(Reporter: romaxa, Unassigned)
Details
(Whiteboard: not-ready)
Attachments
(1 file, 5 obsolete files)
14.64 KB,
patch
|
joe
:
review+
romaxa
:
feedback+
|
Details | Diff | Splinter Review |
Joe proposed to remove stored mSize at all from gfx***Surface implemetations https://bugzilla.mozilla.org/show_bug.cgi?id=556487#c103
Reporter | ||
Updated•14 years ago
|
Assignee: nobody → reportbase
Comment 1•14 years ago
|
||
I removed msize from gfxImageSurface and changed gfxASurface::CairoSurface to be a const method. Note: the gfxImageSurface constructor takes a pointer to an image buffer and constructs a cairo surface which takes this image buffer as a parameter and at the same time gfxImageSurface keeps that buffer as a member variable. This should not necessary, as the buffer can always be retrieved from the cairo surface object. Would be a simple matter to clean this up.
Comment 2•14 years ago
|
||
This patch removes msize from gfxImageSurface. That information is available from the cairo_surface. No need to store it again.
Attachment #473705 -
Flags: review?(joe)
Comment 3•14 years ago
|
||
Comment on attachment 473705 [details] [diff] [review] This patch removes msize from gfxImageSurface > gfxSharedImageSurface::gfxSharedImageSurface(const mozilla::ipc::Shmem &aShmem) >- if (!InitSurface(PR_FALSE)) >+ gfxIntSize size(shmInfo->width, shmInfo->height); >+ if (!InitSurface(size, PR_FALSE)) > NS_RUNTIMEABORT("Shared memory is bad"); Indentation's a little wonky here. Looks wonderful otherwise. r=joe
Attachment #473705 -
Flags: review?(joe) → review+
Comment 4•14 years ago
|
||
Small formatting change (push)
Attachment #473705 -
Attachment is obsolete: true
Attachment #474263 -
Flags: review?(joe)
Reporter | ||
Comment 5•14 years ago
|
||
Comment on attachment 474263 [details] [diff] [review] Fixed tab/spacing Push ME Only indentation fixed... moving r+
Attachment #474263 -
Attachment description: Fixed tab/spacing Push → Fixed tab/spacing Push ME
Attachment #474263 -
Attachment mime type: application/octet-stream → text/plain
Attachment #474263 -
Flags: review?(joe) → review+
Reporter | ||
Updated•14 years ago
|
Attachment #473705 -
Attachment is obsolete: false
Updated•14 years ago
|
Keywords: checkin-needed
Updated•14 years ago
|
Attachment #474263 -
Attachment is patch: true
Reporter | ||
Comment 7•14 years ago
|
||
Comment on attachment 474263 [details] [diff] [review] Fixed tab/spacing Push ME I think it is enough safe for 2.0. Joe any help with this?
Attachment #474263 -
Flags: approval2.0?
Comment 8•14 years ago
|
||
Comment on attachment 474263 [details] [diff] [review] Fixed tab/spacing Push ME low risk.
Attachment #474263 -
Flags: approval2.0? → approval2.0+
Reporter | ||
Comment 9•14 years ago
|
||
Comment on attachment 474263 [details] [diff] [review] Fixed tab/spacing Push ME Patch is not applying on latest m-c. Also I found some style issues: >+PRInt32 gfxImageSurface::GetDataSize() const >+{ >+ return mStride*Height(); ^^ spaces needed >+} >+ >+gfxIntSize gfxImageSurface::GetSize() const ^ whitespace >+{ >+ return gfxIntSize(Width(),Height()); ^ here is the tab.. use spaces ^ space missing here Also I think this can be moved into gfxImageSurface header. >+} >+ >+PRInt32 gfxImageSurface::Width() const ^ white space >- const gfxIntSize& GetSize() const { return mSize; } >- PRInt32 Width() const { return mSize.width; } >- PRInt32 Height() const { return mSize.height; } >+ gfxIntSize GetSize() const; >+ PRInt32 Width() const; >+ PRInt32 Height() const; This is fail to apply on latest m-c.... because const gfxIntSize& GetSize() const is virtual now... Could you update patch plz?
Attachment #474263 -
Flags: feedback-
Comment 10•14 years ago
|
||
This patch is a roll up of the previous two patches. Fixed bitrot and formatting issues.
Attachment #473705 -
Attachment is obsolete: true
Attachment #474263 -
Attachment is obsolete: true
Attachment #476083 -
Flags: review?(joe)
Comment 11•14 years ago
|
||
Comment on attachment 476083 [details] [diff] [review] Fixed some bitrot and formatting issues This patch doesn't seem to remove mSize
Attachment #476083 -
Flags: review?(joe) → review-
Comment 12•14 years ago
|
||
Removed msize. It was not removed from the bitrotted version.
Attachment #476083 -
Attachment is obsolete: true
Attachment #476114 -
Flags: review?(joe)
Updated•14 years ago
|
Attachment #476114 -
Attachment is patch: true
Attachment #476114 -
Attachment mime type: application/octet-stream → text/plain
Updated•14 years ago
|
Attachment #476114 -
Flags: review?(joe)
Attachment #476114 -
Flags: review+
Attachment #476114 -
Flags: approval2.0+
Reporter | ||
Comment 13•14 years ago
|
||
I've got crash with this patch... hmm http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1284709363.1284709584.20870.gz&fulltext=1#err0
Reporter | ||
Comment 14•14 years ago
|
||
Comment on attachment 476114 [details] [diff] [review] Removed msize >+ > long > gfxImageSurface::ComputeStride() const > { > long stride; > > if (mFormat == ImageFormatARGB32) >- stride = mSize.width * 4; >+ stride = Width() * 4; this will crash if ComputeStride called before image surface created: http://tinderbox.mozilla.org/showlog.cgi?log=MozillaTry/1284709363.1284709584.20870.gz&fulltext=1#err0 ###!!! ASSERTION: gfxASurface::CairoSurface called with mSurface == nsnull!: 'mSurface != nsnull', file ../../dist/include/gfxASurface.h, line 117 gfxASurface::CairoSurface [gfxASurface.h:118] gfxImageSurface::Width [gfx/thebes/gfxImageSurface.cpp:148] gfxImageSurface::ComputeStride [gfx/thebes/gfxImageSurface.cpp:162] gfxImageSurface::gfxImageSurface [gfx/thebes/gfxImageSurface.cpp:91] imgFrame::Init [modules/libpr0n/src/imgFrame.cpp:232] I think we should call ComputeStride with aSize argument because ComputeStride called usually before image surface created.
Attachment #476114 -
Flags: review-
Comment 15•14 years ago
|
||
Moved ComputeStride into base class and made it a static method. Fixes crash.
Attachment #476114 -
Attachment is obsolete: true
Attachment #476426 -
Flags: review?(joe)
Comment 16•14 years ago
|
||
Moved ComputeStride into base class and made it a static method. Fixed formatting issues. Fixed crash.
Attachment #476426 -
Attachment is obsolete: true
Attachment #476531 -
Flags: review?(joe)
Attachment #476426 -
Flags: review?(joe)
Reporter | ||
Comment 17•14 years ago
|
||
Comment on attachment 476531 [details] [diff] [review] Moved ComputeStride into base class and made it a static method. ok, it seems not cause problems on try server, and don't crash.
Attachment #476531 -
Flags: feedback+
Comment 18•14 years ago
|
||
Comment on attachment 476531 [details] [diff] [review] Moved ComputeStride into base class and made it a static method. Please add a crashtest for the way the previous patch failed too.
Attachment #476531 -
Flags: review?(joe) → review+
Comment 19•14 years ago
|
||
Comment on attachment 474263 [details] [diff] [review] Fixed tab/spacing Push ME (bookkeeping)
Attachment #474263 -
Flags: approval2.0+
Updated•14 years ago
|
Attachment #476114 -
Flags: approval2.0+
Comment 21•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months.
:bhood, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee: reportbase → nobody
Flags: needinfo?(bhood)
Updated•3 years ago
|
Flags: needinfo?(bhood)
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•