Closed
Bug 553943
Opened 16 years ago
Closed 15 years ago
Replace XShm+NPImageExpose with normal windowless direct rendering
Categories
(Core Graveyard :: Plug-ins, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: romaxa, Assigned: romaxa)
References
Details
Attachments
(1 file, 4 obsolete files)
|
38.12 KB,
patch
|
Details | Diff | Splinter Review |
NPImageExpose API usage does not make any sense when we are rendering to XSurface (RenderDocument called from xlibSurface content).
In attachment patch which is painting plugin to chached XSurface and then copy surface to target XWindow.
Also with this patch we have much faster painting on zoomed layout, also it is scaling plugin content with plugin zooming (in flash we have high text quality rendering).
Attachment #433838 -
Flags: review?(dougt)
| Assignee | ||
Comment 1•16 years ago
|
||
Also with this patch fast plugins rendering will work for all plugins.
| Assignee | ||
Comment 2•16 years ago
|
||
When this patch applied, we can remove current NPImageExpose implementation, and replace it with more better version.
| Assignee | ||
Comment 3•16 years ago
|
||
Flash text rendering quality can be tested on this page:
http://www.verticalmoon.com/products/textosterone/samples.php?exid=5
Comment 4•16 years ago
|
||
on GTK:
with wmode=opaque:
###!!! ABORT: X_CreateGC: BadDrawable (invalid Pixmap or Window parameter); 392 requests ago: file /home/dougt/builds/mozilla-central/toolkit/xre/nsX11ErrorHandler.cpp, line 184
without the pref:
the plugin isn't drawn
| Assignee | ||
Comment 5•16 years ago
|
||
hmm.. that is flash plugin problem, and going to be fixed in PR1.2
Updated•16 years ago
|
Attachment #433838 -
Flags: review?(dougt) → review?(karlt)
Comment 6•16 years ago
|
||
update the patch against the latest trunk
Comment 8•16 years ago
|
||
Comment on attachment 433838 [details] [diff] [review]
Replace XShm
Yes, I agree that it makes sense to use X drawing rather than image drawing in
X-surface-based browsers.
I had viewed our direct drawing mostly as a hack to get something working
quickly for 1.9.2. I'm not clear what the drawing model for the next version
will be (with layers etc.) and so don't know whether this will still be used.
But, until that is clear, this seems a sensible improvement.
Just a couple of things to sort out:
> #if (MOZ_PLATFORM_MAEMO == 5) && defined(MOZ_WIDGET_GTK2)
> #define MOZ_COMPOSITED_PLUGINS 1
>-#define MOZ_USE_IMAGE_EXPOSE 1
>+#endif
>+#ifdef MOZ_X11
>+#define MOZ_USE_DIRECT_PAINT 1
I'd prefer not to compile this code except for Fennec (and other apps that
have a front end using SetAbsoluteScreenPosition?).
>+ Visual *visual = DefaultVisual(dpy, DefaultScreen(dpy));
>+ mXSurface = new gfxXlibSurface(dpy, visual, gfxIntSize(mPluginSize.width, mPluginSize.height));
This visual (and the colormap passed to the plugin) should be the one used
on mBlitWindow. (XCopyArea relies on src and dest having the same depth.)
>+ NS_ENSURE_TRUE(mXSurface, PR_FALSE);
new won't return NULL.
>+// DirectPluginDraw
> //
> // This method supports the NPImageExpose API which is specific to the
> // HILDON platform. Basically what it allows us to do is to pass a
> // memory buffer into a plugin (namely flash), and have flash draw
> // directly into the buffer.
Can you update the comment here now that this is not using NPImageExpose,
please?
Attachment #433838 -
Flags: review?(karlt) → review-
| Assignee | ||
Comment 9•16 years ago
|
||
Assignee: nobody → romaxa
Attachment #433838 -
Attachment is obsolete: true
Attachment #446958 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #450582 -
Flags: review?(karlt)
Comment 10•16 years ago
|
||
Comment on attachment 450582 [details] [diff] [review]
kill NPImageExpose without loosing perf on maemo 5
>+#include "cairo-xlib.h"
This is already included (#ifdef MOZ_X11).
>+static Window GetClosestWindow(nsIDOMElement *element, Visual **aVisual, Colormap *aColormap)
Keep this within 80 columns (probably by putting "GetClosestWindow" on a new
line).
>+ if (aVisual)
>+ *aVisual = GDK_VISUAL_XVISUAL(gdk_drawable_get_visual(w));
>+ if (aColormap)
>+ *aColormap = GDK_COLORMAP_XCOLORMAP(gdk_drawable_get_colormap(w));
>+ if (aVisual)
>+ *aVisual = (Visual*)w->x11Info().visual();
>+ if (aColormap)
>+ *aColormap = w->x11Info().colormap();
No need to NULL check aVisual and aColormap for this private function.
>+ return nsnull;
return None for Window.
>+ // information not set:
> exposeEvent.count = 0;
> exposeEvent.serial = 0;
exposeEvent.count is set to the appropriate value (0), so the comment should
be after that statement.
r+ with those changes.
Attachment #450582 -
Flags: review?(karlt) → review+
Comment 11•16 years ago
|
||
Oleg, did you intend to land this?
| Assignee | ||
Comment 12•15 years ago
|
||
I think it does not make sense anymore...
I suggest to cleanup plugins code and drop
MOZ_COMPOSITED_PLUGINS
MOZ_USE_IMAGE_EXPOSE
from layout code.
Attachment #450582 -
Attachment is obsolete: true
| Assignee | ||
Comment 13•15 years ago
|
||
I've created another bug 624165.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → WONTFIX
Updated•4 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•