Bug 99722 - [Qt][WK2] Plugins are overscaled with a custom devicePixelRatio
Summary: [Qt][WK2] Plugins are overscaled with a custom devicePixelRatio
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Plug-ins (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Balazs Kelemen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-18 08:14 PDT by Balazs Kelemen
Modified: 2013-01-27 14:21 PST (History)
5 users (show)

See Also:


Attachments
Patch (1.60 KB, patch)
2012-11-28 09:59 PST, Balazs Kelemen
kbalazs: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Balazs Kelemen 2012-10-18 08:14:15 PDT
Context: bug 98518.
This can be seen in MiniBrowser since we use a custom 1.5 devicePixelRatio. If I just make PluginProxy::contentsScaleFactor() return constant 1 it fixes this but we need to understand why, and where is the actual bug or the between us and mac.
Comment 1 Balazs Kelemen 2012-10-29 10:52:55 PDT
I have problems with trying this on Mac. 
The idea of mine was to disable AC in MiniBrowser to trigger the actual code path that is causing the issue for us. Unfortunately I cannot make MiniBrowser use the PluginProcess of my build, for some reason it always use the one installed on the system. run-safari does not show any video for me (probably because I am using vnc, although MiniBrowser is playing them finely). I would appreciate if some of you who have direct access to a Mac could take a try with this ;)
Comment 2 Balazs Kelemen 2012-11-28 09:59:05 PST
Created attachment 176504 [details]
Patch
Comment 3 Allan Sandfeld Jensen 2012-12-05 01:28:37 PST
I think this important for 5.0. I am also concerned were the bug really is at.

Isn't part of the point of devicePixelRatio that content such as text could be rendered at a higher resolution instead of being image scaled? Could it somehow be that we forget to report the correct size of the rendered plugin output?
Comment 4 Balazs Kelemen 2012-12-05 01:50:31 PST
(In reply to comment #3)
> I think this important for 5.0. I am also concerned were the bug really is at.
> 
> Isn't part of the point of devicePixelRatio that content such as text could be rendered at a higher resolution instead of being image scaled? Could it somehow be that we forget to report the correct size of the rendered plugin output?

Although I don't have full understanding of how devicePixelRatio is and should handled, I can say this patch avoids the image scaling, and the plugin size is ok. Actually I cannot follow the logic in PluginProxy, or rather I believe it is wrong. Furthermore that code path is not tested since Mac is using the AC path for plugins, Gtk doesn't support devicePixelRatio yet, EFL doesn't support plugins yet.
Comment 5 Jocelyn Turcotte 2012-12-05 05:59:56 PST
The problem might be that we apply the scaling once more when we blit the already scalled plugin backing store onto our non-composited-content tiles.

The real solution I think would be to get plugin backing stores rendered using AC, passed through a ShareableSurface. It is pretty innefficient to blit it again on tiles using the CPU for each update by the plugin.

I think that we can live with this bug until then, I don't see any real-world use case where we would want a WebView with both plugins and a non-1.0 device pixel ratio. It just happens to be the default (for testing purposes) in MiniBrowser.