Closed
Bug 328116
Opened 19 years ago
Closed 18 years ago
Implement Cairo-on-OSX for Thebes gfx
Categories
(Core :: Graphics, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: vlad, Assigned: vlad)
References
Details
Attachments
(2 files)
(deleted),
patch
|
mark
:
review+
|
Details | Diff | Splinter Review |
(deleted),
patch
|
pavlov
:
review+
|
Details | Diff | Splinter Review |
Add native CG rendering using cairo on Cocoa-widget-based Gecko builds.
Assignee | ||
Comment 1•19 years ago
|
||
Small set of glue needed in cocoa widgets code to get cairo rendering going; will be expanded as time goes on, but this gets things up in the first run. Eventually a lot of the QD-specific rendering code will be able to just go away (this patch already bypasses a large chunk for cairo builds).
Attachment #212646 -
Flags: review?(joshmoz)
Assignee | ||
Comment 2•19 years ago
|
||
this has most of the work, including a CG-backed cairo surface implementation.
This also moves SystemFont stuff into separate per-platform files in gfx/src/thebes, instead of having things like GTK be handled differently than windows.
gfxAtsuiFonts is a bare rough outline needed to get text on the screen; this will be the focus of future work.
Attachment #212647 -
Flags: review?(pavlov)
Updated•19 years ago
|
Attachment #212647 -
Flags: review?(pavlov) → review+
Comment 3•19 years ago
|
||
Comment on attachment 212646 [details] [diff] [review]
cocoa widget changes
+ifeq ($(MOZ_ENABLE_CAIRO_GFX),1)
Ew, why not ifdef MOZ_ENABLE_CAIRO_GFX?
+ fprintf (stderr, "nsChildView[%p]::UpdateWidget called!\n", this);
You've got a few of these scattered throughout. Any reason they're not within #ifdef DEBUG or something else?
r=me with satisfactory answers to those questions.
Attachment #212646 -
Flags: review?(joshmoz) → review+
Assignee | ||
Comment 4•19 years ago
|
||
(In reply to comment #3)
> (From update of attachment 212646 [details] [diff] [review] [edit])
> +ifeq ($(MOZ_ENABLE_CAIRO_GFX),1)
>
> Ew, why not ifdef MOZ_ENABLE_CAIRO_GFX?
Already changed, just didn't update the patch :)
> + fprintf (stderr, "nsChildView[%p]::UpdateWidget called!\n", this);
>
> You've got a few of these scattered throughout. Any reason they're not within
> #ifdef DEBUG or something else?
Changed those to #ifdef DEBUG_vladimir
Comment 5•19 years ago
|
||
Re: finding fonts from their names, see bug 246527.
Comment 6•19 years ago
|
||
Comment on attachment 212646 [details] [diff] [review]
cocoa widget changes
>Index: widget/src/cocoa/nsChildView.mm
>===================================================================
>+#ifdef MOZ_CAIRO_GFX
>+gfxASurface*
>+nsChildView::GetThebesSurface()
>+{
>+ fprintf (stderr, "nsChildView[%p]::GetThebesSurface\n", this);
>+
>+ return new gfxQuartzSurface(gfxASurface::ImageFormatARGB32, 1, 1);
>+}
>+#endif
Do you really want to create one every time? If this is normal, then maybe the method name should be CreateThebesSurface().
>+#if 0
>+ targetContext->Rectangle(gfxRect(aRect.origin.x, aRect.origin.y,
>+ aRect.size.width, aRect.size.height));
>+ targetContext->Clip();
>+#else
>+ const NSRect *rects;
>+ int count, i;
>+ [self getRectsBeingDrawn:&rects count:&count];
>+ for (i = 0; i < count; ++i) {
>+ //fprintf (stderr, " Clip rect[%d]: %f %f %f %f\n", i, rects[i].origin.x, rects[i].origin.y, rects[i].size.width, rects[i].size.height);
>+ targetContext->Rectangle(gfxRect(rects[i].origin.x, rects[i].origin.y,
>+ rects[i].size.width, rects[i].size.height));
>+ }
>+ targetContext->Clip();
>+#endif
"Rectangle" has to be the worst method name ever.
Assignee | ||
Comment 7•19 years ago
|
||
(In reply to comment #6)
> (From update of attachment 212646 [details] [diff] [review] [edit])
> >Index: widget/src/cocoa/nsChildView.mm
> >===================================================================
> >+#ifdef MOZ_CAIRO_GFX
> >+gfxASurface*
> >+nsChildView::GetThebesSurface()
> >+{
> >+ fprintf (stderr, "nsChildView[%p]::GetThebesSurface\n", this);
> >+
> >+ return new gfxQuartzSurface(gfxASurface::ImageFormatARGB32, 1, 1);
> >+}
> >+#endif
>
> Do you really want to create one every time? If this is normal, then maybe the
> method name should be CreateThebesSurface().
It's just returning a dummy surface; this method will go away relatively soon.
>
> "Rectangle" has to be the worst method name ever.
>
Eh, well, it's adding a rectangle to the current path. Much better than Apple's ContextAddRectangleToCurrentPath() variety.
Updated•18 years ago
|
Flags: blocking1.9?
Comment 8•18 years ago
|
||
Has this been checked in?
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•