Why not login to Qiita and try out its useful features?

We'll deliver articles that match you.

You can read useful information later.

2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Qt5 WebKit調査メモ

Last updated at Posted at 2014-03-14

Qt5のWebKit対応、主に描画部分に関する調査メモ。

WebKitとWebKit2の違い

Webkit2は"Webkit version 2"という意味ではなく、マルチプロセスモデルを採用した別種の存在であり、APIはWebkitと大幅に異なっている。
ただしWebkitとWebkit2は同一リポジトリ上で管理されており、コア部分であるWebCoreはWebkitとWebkit2で共通である。

QtのWebKit対応

Qt5ではWebkit2に対応したQtWebkitと、Webkitに対応したQtWebKitWidgetが存在している。
両者の違いとしては、QtWebKitはQMLからの使用が想定されており、従来のC++ APIとしてはQtWebKitWidgetを使用することになる。
C++からQtWebKitを使用するにはQQmlComponent経由で呼び出す必要がある。

QtWebKitWidget(WebKit)での描画

QWebViewはQWidgetを継承しており、QWebView::paintEventでは自身をQPaintDeviceとしてQPainterを生成して描画処理を行っている。
基本的にその他のQWidgetと同様の描画処理が行われると考えられる。

QtWebKit(WebKit2)での描画

(調査途中)
WebKit2ではUIプロセスとWebプロセスが分離しており描画データをShareableBitmap(またはGraphicsSurface)で受け渡ししている。
QtWebKitではSahreableBitmap(またはGraphicsSurface)はQImageで実装されている。

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
itage
ITAGEは「IT」のAGENCYになることを夢、目標として進化、変化していきます。「It’s It Agency」

Comments

No comments

Let's comment your feelings that are more than good

Being held Article posting campaign

2
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Login to continue?

Login or Sign up with social account

Login or Sign up with your email address