1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef SimCompositor_h
6 #define SimCompositor_h
10 class SimDisplayItemList
;
11 class SimLayerTreeView
;
14 // Simulated very basic compositor that's capable of running the BeginMainFrame
15 // processing steps on WebView: beginFrame, layout, paint.
17 // The painting capabilities are very limited in that only the main layer of
18 // every CompositedDeprecatedPaintLayerMapping will be painted, squashed layers
19 // are not supported and the entirety of every layer is always repainted even if
20 // only part of the layer was invalid.
22 // Note: This also does not support compositor driven animations.
23 class SimCompositor final
{
25 explicit SimCompositor(SimLayerTreeView
&);
28 void setWebViewImpl(WebViewImpl
&);
30 // Execute the BeginMainFrame processing steps, an approximation of what
31 // cc::ThreadProxy::BeginMainFrame would do.
32 SimDisplayItemList
beginFrame();
35 SimLayerTreeView
* m_layerTreeView
;
36 WebViewImpl
* m_webViewImpl
;
37 double m_lastFrameTimeMonotonic
;