Closed Bug 391604 Opened 17 years ago Closed 13 years ago

Add NULL gfx backend

Categories

(Core :: Graphics, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: vlad, Unassigned)

Details

Attachments

(1 file)

We could use a NULL gfx backend to be used for perf testing when the effects of rendering aren't relevant (e.g. testing layout).

Here's a patch that does this; it's currently hooked into win32 only, xlib and OSX just need a tiny bit of work done in their widget code to create a NullSurface instead of the platform surface.
Comment on attachment 276044 [details] [diff] [review]
add null platform, via MOZ_NULL_PLATFORM env var

Should this get compiled in only if --enable-tests is on?
Attachment #276044 - Flags: review?(pavlov)
Comment on attachment 276044 [details] [diff] [review]
add null platform, via MOZ_NULL_PLATFORM env var

diff -r 8a482169f2e4 gfx/cairo/cairo/src/Makefile.in

can you use spaces there like everything else?  or change them all to tabs?

should the cairo null surface just be part of cairo.h?

is there a less intrusive way to get these same results?  Having to maintain another surface, font impl, platform impl, etc seems like a lot of overhead for this... that said i'm not coming up with a better way to do it :/
Well, I figure this is also a good example of "smallest amount of code needed to get things compiling", if someone wants to implement a new surface/font/etc impl.  I don't think it should be part of cairo.h, really; it's more of a testing thing.  (I hate that I have to add the NULL identifier to cairo.h, I might change that scheme at some point in the future if I can get carl to agree.)  I'll fix the spacing/tab stuff though, I didn't even notice it wasn't using tabs.
Attachment #276044 - Flags: review?(pavlov) → review+
This is an interesting patch. This patch is only useful if someone plans to use this configuration to profile and grab measurements. This isn't the case at the moment so resolving WONTFIX for now. Let's reopen this when we have a need for this.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: