summaryrefslogtreecommitdiff
path: root/lib/web_engine_context.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Moving sources to src part 1: Move files.Jocelyn Turcotte2013-11-281-184/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | This only move files without adjusting any paths. This moves: - lib/quick -> src/webengine/api (API files) lib/quick -> src/webengine (other files) This contains the main QtWebEngine module library since <ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>. - lib/widgets -> src/webenginewidgets Also rename this directory to match its module name and rename Api to api. - lib -> src/core - process -> src/process - resources -> src/core/resources - tools/* -> tools/scripts/ The build directory is spread as follow: - build/build.pro -> src/core/gyp_run.pro - build/qmake_extras/* -> src/core/ (for the host and target .pro files) - build/qmake -> tools/qmake - Build related scripts -> tools/buildscripts Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Get rid of the intermediate "shared" static library.Jocelyn Turcotte2013-11-211-1/+0
| | | | | | | | It is not necessary anymore since QtWebEngineProcess dynamically links to the core library which will now contain those symbols. Change-Id: I3475347bab41a00b943f934a5e341326c66dc726 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Delegated renderer: enable by default for QQuickWebView.Jocelyn Turcotte2013-11-151-13/+37
| | | | | | | | | | | This also allows the software code path to be enabled: - Programmatically by setting this dynamic property on the QCoreApplication: "QQuickWebEngineView_DisableHardwareAcceleration" - Through the Chromium command line switch "--disable-delegated-renderer" for quick development use cases. Change-Id: I32136d880444e0a24f042c7c4862950b7ed0c910 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Delegated renderer: Put textures on those quads.Jocelyn Turcotte2013-11-111-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* QtWebEngine Dev Tools (Web Inspector)Chris Hutten-Czapski2013-10-291-0/+7
| | | | | | | | | | | | | | | | | | To implement the Web Inspector we need a delegate to handle the http server and devtools connections, a landing page, a ContentClient to tell the devtools server where to find its frontend resources, those frontend resources, and an API for embedders to turn on inspectability in WebEngineViews. The frontend resources are build by the chromium build and are copied over as part of lib's build. The landing page was taken directly from content_shell. This should be replaced by either a new one for all QtWebEngine embedders or by a mechanism for embedders to supply their own (or both). Change-Id: Id4076d5ede34a91abf8dba443aed4dca4be1b3e5 Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Centralize type conversion functions.Jocelyn Turcotte2013-08-201-1/+2
| | | | | | | | | | | | | 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>
* Once created, keep the WebEngineContext until shutdown.Jocelyn Turcotte2013-08-121-15/+4
| | | | | | | | | Chromium isn't expecting the destruction and reconstruction of the ContentMainRunner and BrowserMainRunner. This will need a few tweaks before we can do this without hitting asserts in debug builds. Change-Id: I0c46a2db27350b3f6352e3eb8a5ec7ecff06784e Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Fix the GPU process launch.Jocelyn Turcotte2013-07-291-0/+1
| | | | | | | | base::FILE_EXE isn't used by this process and we therefore also need to set the kBrowserSubprocessPath switch. Change-Id: I5a5e721c765cc1990d155f6c6d9ac1b442dc44b0 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use command line switch identifiers instead of string constants.Jocelyn Turcotte2013-07-291-9/+6
| | | | | Change-Id: I36007b0c0fbf194df1941e72ae2a93adf5ed6d0b Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix BrowserContextQt::GetPath() to return path to user data directoryAndras Becsi2013-07-261-9/+1
| | | | | | | | | Besides returning a proper application specific user data directory, this patch removes the duplicate definition of GetPath() which was added by accident with the recent chromium update. Change-Id: Ia30d598e3ef99eb88000498ef3a00ccae0593ff8 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Do not leak singletons in WebEngineContextAndras Becsi2013-07-091-14/+10
| | | | | | | | | Prevent leaking ContentMainDelegateQt, ContentMainRunner and BrowserMainRunner in WebEngineContext so that resources are cleaned up and corresponding notifications are executed. Change-Id: Ib4a13b5e739ed0e60c90bf721a943a3ad19c206c Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Refactor process initialization codeAndras Becsi2013-07-091-113/+14
| | | | | | | | | Move parts of the initialization from the WebEngineContext ctor to ContentMainDelegateQt and BrowserMainPartsQt members so that they are executed in their respective stages of startup. Change-Id: Iefa288c6bf775ac530f183c0dcfebb6a3230d68d Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Get rid of or upstream chrome_path patch for zygoteAndras Becsi2013-07-091-28/+21
| | | | | | | | | | | | | Override base::FILE_EXE in ContentMainDelegateQt::PreSandboxStartup() with the path to our child process and get rid of the command line argument and the content::CHILD_PROCESS_EXE override. This reduces 0001-My-local-fixes.patch to export ContentMainRunner so the patch can be renamed to better reflect it's purpose. This hunk is still needed since we need to access ContentMainRunner's Initialize() to set our ContentMainDelegate. Change-Id: I808cb114100300a33f8cb1b154c6cde89cbf5d98 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Disable plugins for nowAndras Becsi2013-07-041-0/+1
| | | | | | | | Do not start the plugin process since pages with flash content do not load. We need to look into plugin support at some point. Change-Id: Ia888fc07531d1b904d43dd4e1e97b7a0f5dcf443 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Support QApplication command line argsPierre Rossi2013-06-141-6/+9
|
* Quick cleanup.Jocelyn Turcotte2013-06-121-4/+1
|
* Rename remaining references of blinq to QtWebEngine.Jocelyn Turcotte2013-06-111-4/+4
|
* Get rid of BlinqApplication.Jocelyn Turcotte2013-06-111-0/+277
Rename the class to WebEngineContext and keep it as a ref-counted member of pages instead. Also: - Change the user-agent product to QtWebEngine - Don't pass actual command line arguments to Chromium anymore - Allow attaching to the event loop through Before/AfterRun instead of blocking