summaryrefslogtreecommitdiffstats
path: root/lib/type_conversion.h
Commit message (Collapse)AuthorAgeFilesLines
* Delegated renderer: implement cc::DrawQuad::SOLID_COLOR.Jocelyn Turcotte2013-11-151-0/+7
| | | | | | | | | | | I could currently only test this with --enable-overlay-scrollbars. Background color quads still need some work in Chromium to be able to to use this kind of quads, see <http://code.google.com/p/chromium/issues/detail?id=114658>. Change-Id: I9c9bdb5c72b91827cfdb7e38e44755c6361a05cf Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Delegated renderer: Add YUV video support.Jocelyn Turcotte2013-11-131-0/+5
| | | | | | | This basically reimplements GLRenderer::DrawYUVVideoQuad. Change-Id: I990e224d69b372c76e2174c174c9b82678e25b86 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Delegated renderer: Put textures on those quads.Jocelyn Turcotte2013-11-111-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A few changes are necessary to allow fetching textures provided by the render processes through IPC and bound to their respective GL context in the GPU process and use them in the QtQuick scene graph. - Remove the plain color test textures. - Allow setting the QtQuick QOpenGLContext's handle as the share context for all context set as shared in the Chromium GPU process. We do this by letting the GpuChannelManager ask us for a ShareGroup instance responsible for returning a sharing GL context handle. - Fetch texture IDs from the MailboxManager used by the GPU process using the Mailbox given to us in the DelegatedFrameData. This is the same mechanism used by Chromium to share textures between "client" GL contexts. - Keep the QtQuick scene graph threads and Chromium in-process GPU thread separate. The complicated part of merging those two rendering pipelines on the same thread is that it would force Qt to also use only one thread for rendering. For the moment we will try to synchronize those threads together instead. - Lock the Qt SG thread while waiting for resource sync points. Do so by posting a callback to the Chromium GPU thread and wait until the sync point of every resource has been retired by the producing contexts. - Acknowledge the delegated from once QtQuick swapped the GL buffers instead of right after we added the frame to the scene graph. This fixes some issues where the textures for the previous frame would already be released as Chromium was producing the new frame. There are still a few issues regarding synchronization that have to be fixed, especially when Qt triggers the rendering of a new frame while Chromium is starting to produce the next frame. Note: To enable it we still need to pass the following command switches: --enable-delegated-renderer --enable-threaded-compositing --in-process-gpu Change-Id: I2d4f7fac603b1808ed1495a8d689cb48e9ed41b9 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Implement QWebEnginePage::runJavaScriptPierre Rossi2013-11-041-0/+5
| | | | | | | | | | | | | | | | | | | | | We can't have QWebFrame::evaluateJavascript in its old form for several reasons, the first of which being that we don't have a QWebEngineFrame class anymore. This is worked around by adding an optional QString parameter with the frame's XPath. Another issue is that the WebKit1 API was synchronous, and this would not play nicely with the very asynchronous nature of chromium we're now sitting on top of. In order to make this obvious when porting, we rename it to runJavaScript which doesn't return any result. This also introduces a template member function overload that will accept function pointers, functors and lambdas,much like Qt5's new signal/slot syntax, in order to get the result of the javascript evaluation back. Change-Id: I64e15a6f5a168936c52a4da2cef6285dfd16e0d5 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Add javascript dialogs supportPierre Rossi2013-10-171-1/+6
| | | | | | | | | | This is just the basic core part and widgets plumbing and default implementations of the virtual functions in QWebEnginePage. QtQuick implementation is still yet to be done Change-Id: I7cf8d6e5ec0bf747d45e9914db57bd0e4ef95b7f Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Render delegated renderer frames using the Qt scene graph.Jocelyn Turcotte2013-10-141-0/+23
| | | | | | | | | | | | | | This provides a stub implementation that renders quads and RenderPasses using QSGNodes in QQuickWebEngineView. The BackingStore code path is still supported when the delegated renderer switch is not enabled. To use the new rendering, pass the following switches: --enable-delegated-renderer --enable-threaded-compositing This uses debug, plain color textures until we can fetch tiles and textures from the ResourceProvider across OpenGL context boundaries. Change-Id: I33ea0738dc5a326ef79c1435f75c044c42e8551f Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Centralize type conversion functions.Jocelyn Turcotte2013-08-201-0/+74
This adds the common GURL->QUrl and string16->QString conversions into a common header and use those functions throughout the code. Move the qStringToStringType into the same header and rename it to a name consistent with the others. This also cleans up shared_globals.h by moving content:: forward declarations in the cpp, where they are used. Change-Id: I19527ea7de1f6047aae8b44c97eb4d7c3e5a0e54 Reviewed-by: Andras Becsi <andras.becsi@digia.com>