summaryrefslogtreecommitdiffstats
path: root/lib/backing_store_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use a QImage instead of QPixmap in BackingStoreQt.Jocelyn Turcotte2013-11-151-18/+21
| | | | | | | | | | | | | | | | | This is mainly to get rid of the warning shown when using QQuickWebEngineView without delegated rendering with the threaded scene graph render loop: "QPainter: It is not safe to use drawPixmap() outside the GUI thread" The main advantage that QPixmap gave us was that QPixmap::scroll is provided. This patch pulls out some of its implementation to make the use case work with QImage. Since QPixmap is backed by a QImage with the raster paint engine, the previous behavior should remain except on the DirectFB platform, which we don't ship to yet. Change-Id: If77c9079ee95218519be1d092cad24635e29a279 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* [Autotests fixes] Don't assert if there's no QWindowPierre Rossi2013-11-131-2/+0
| | | | | | | | Or we won't be able to run QWebEnginePage autotests in debug. Change-Id: I0b479fe7de6bd10984201f292514c343a15135cd Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Fix rendering on Retina displaysAndras Becsi2013-09-021-10/+34
| | | | | | | | | | Since the QWindow returned by the RWHV delegates was always 0 we never actually propagated a valid WebScreenInfo to chromium. Additionally the painting and scrolling in the backing store had to be fixed so that the device pixel ratio is taken into account. Change-Id: I22dc135e8e090362201292863ed911464b9fc133 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Silence compiler warningsAndras Becsi2013-07-261-2/+0
| | | | | | | | Remove unused variables, add missing return and avoid comparing unsigned integers with signed ones. Change-Id: I9b295a5dc10927ec89471a424c93cf3b168cf078 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Uncomment and fix implementation of CopyFromBackingStore.Zeno Albisser2013-07-031-17/+33
| | | | | | | | | | | | | | This was commented out when we were using QBackingStore. But since we switched back to using a simple QPixmap, this code can be reinserted. However the copy part of the code required some fixes. We copy rect.height() number of lines with rect.width()*bytesPerPixel length each, and then apply an offset of m_backingStore.width()*bytesPerPixel to get the start of the next copy rect line. Change-Id: I0979fab969b6237b847ce82e95a3dd3478f3cf7b Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Include header for skia::PlatformBitmap.Zeno Albisser2013-07-011-0/+1
| | | | | Change-Id: Iacf9e37b5bfe8df9eb061073103d90c79832eca1 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Replace include by forward declaration in the private headersAndras Becsi2013-06-271-1/+0
| | | | | | | Also remove some unneeded includes. Change-Id: I335bfb1d8c74b2e44d7bf576c3b76f6c32af35c3 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Move API layer-only classes back from the shared static lib.Jocelyn Turcotte2013-06-191-0/+143
| | | | | | | Since ContentBrowserClientQt::OverrideCreateWebContentsView now takes care of using our Qt layer at runtime without relying on the static RenderWidgetHostView::CreateViewForWidget, we can now avoid linking this layer into the render process.
* Fix undefined symbols in debug builds.Jocelyn Turcotte2013-06-101-164/+0
| | | | | | | process uses the same code as lib and decides at runtime which code to run. Fix the debug build by making sure that all infrastructure code is available in both process and lib by building common code not shared directly through chromium sources in a separate static lib.
* Implement support for QtQuick2.Zeno Albisser2013-06-051-3/+2
| | | | | | | | | | | | | | | | | The current preliminary implementation uses the QQuickPaintedItem. The RasterWindow is being replaced by an abstract NativeViewQt class, which can be instantiated as QWidgetNativeView or QQuickNativeView. The NativeViewContainerQt builds a wrapper around an instance of these classes and serves as a common api towards chromium. Due to the current design where the view is being created by the shell, we introduce a browser_window.qml which provides a very basic browser UI. The content is then being injected into an item within that browser window. Just executing the example the "regular" way will launch the Widgets example. To launch the QtQuick2 example, the environment variable QQUICKWEBENGINE must be defined.
* Add standard license boilerplateSimon Hausmann2013-05-311-0/+41
|
* Exclude the scrollbars from being scrolled.Zeno Albisser2013-05-311-1/+1
|
* Fix source coordinates for backingstore when reloading.Zeno Albisser2013-05-311-2/+2
|
* PaintToBackingStore: src and dst rect are the same as long as we do not ↵Zeno Albisser2013-05-311-4/+4
| | | | implement scalin.
* Fix scrollingZeno Albisser2013-05-311-6/+6
|
* Fix flickering when resizing.Zeno Albisser2013-05-311-0/+5
|
* Make sure that newly created BackingStores respect the size of the view.Zeno Albisser2013-05-311-3/+4
|
* make the backingstore use a QPixmap instead of QBackingStoreZeno Albisser2013-05-311-24/+14
|
* Introduce RasterWindowContainer to allow reusing the container with ↵Zeno Albisser2013-05-221-13/+7
| | | | | | | | | different child views. Pass the view to BackingStoreQt::displayBuffer instead of creating it implicitly. Rename RenderWidgetHostView to RenderWidgetHostViewQt and move it into namespace content. Copy in web_contents_view from gtk to allow for modifications outside of the chromium tree. Remove the ViewHostFactory, as it is meant to be used for testing only.
* Cleaning up and splitting things up into separate h/cpp files.Zeno Albisser2013-05-151-0/+134