[webkit-help] TextureMapper, TextureMapperGL and device scale factors

Trevor Linton trevor.linton at gmail.com
Sun Jun 22 20:53:02 PDT 2014


I’m working on a port of webkit currently and haven’t been able to appropriately address hi-dpi device scale factors while using accelerated compositing with TextureMapper/TextureMapperGL (note i’m not using coordinated graphics and its running on a WebKit1 type interface). 

The issue is I don’t seem to see how to adjust the scale factor without creating all of the root graphics layers at twice the size, handle invalidation and setDisplayInRect in the device pixel size and subsequently start polluting or introducing the always fun issue of “is this pixel in device or logical pixels?” problem.

Is there some sort of way of implementing device scale factors in TextureMapper/TextureMapperGL? I’ve tried Page::setDeviceScaleFactor, Frame::tiledBackingStore()->setContentsScale.

I’ve also tried a patch I found recently for TextureMapper, but it required VERY carefully creating graphics layers, painting them and invalidating rects in different pixel coordinates (logical/device) depending on recursive conditions which makes things uber complicated.  In addition I never was able to get it working correctly with CSS3 animations (they’d typically render with half sized clips, or the x/y would be half size when the device scale factor was 2). 


At anyrate, i’m hoping someone here can help give me some background or guidance on how to start implementing this.  If the only option at the moment is facing the uphill “implement in texture mapper” problem i’m fine with it, i just want to make sure its the only approach to the issue since i’m not using coordinated compositor.

You can find my webcoresupport here:

And the platform API here:

- Trevor

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-help/attachments/20140622/cbd5a5d2/attachment.html>

More information about the webkit-help mailing list