后缓冲区充当tile内容的屏下(off-screen)后缓冲区并且可以采用Qt的画笔绘制到Qt widget上。在更新后缓冲区的过程中(In
the process of updateBackBuffer),对于无效操作(invalidate)引起的脏区域,WebKit绘制脏区域的内容到屏下缓冲区,它使用的画笔因为有缩放请求或许带有缩放等几何变换。
冻结状态(Frozen State):TiledBackingStore has nothing to do in
frozen state, for example, it will not update back buffer and create tiles. The frozen state is introduced mainly for avoiding time-consuming operations on TiledBackingStore in some scenarios,
such as content scale. On exiting frozen state by setContentsFrozen(false), TiledBackingStore will check the pending scale factor. If the pending scale is not 0, it has to update the back buffer in accordance with the pending scale.
tiledBackingStorePaintBegin:更新tiled backing store开始之前必须做完的事情。Render engine should make sure the contents being painted to TiledBackingStore off-screen
buffer are correct at that time, so it has to flush all deferred repaint operation.
tiledBackingStorePaintEnd: 更新tiled
backing store开始之后必须做完的事情T. Once the off-screen buffer for TiledBackingStore is updated, a question naturally comes in the way:
‘‘‘How does UI front know such update immediately and then schedule a repaint event to their widget to draw the content?Download
The answer is, at the end of TiledBackingStore update, it will notify the WebCore::ChromeClient (ChromeClientQt for WebKit port) to invalidate contents by calling invalidateContentsAndWindow. In QtWebKit, invalidateContentsAndWindow finally schedules
a paint event through PageClientQGraphicsWidget to QGraphicsWebView.
tiledBackingStoreContentsRect Return the content size of web frame.
tiledBackingStoreVisibleRect Return the visible area of the graphics item used for drawing web content. It is actually the visible rect of QGraphicsWebView.