OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef SimCompositor_h |
| 6 #define SimCompositor_h |
| 7 |
| 8 namespace blink { |
| 9 |
| 10 class SimDisplayItemList; |
| 11 class SimLayerTreeView; |
| 12 class WebViewImpl; |
| 13 |
| 14 // Simulated very basic compositor that's capable of running the BeginMainFrame |
| 15 // processing steps on WebView: beginFrame, layout, paint. |
| 16 // |
| 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. |
| 21 // |
| 22 // Note: This also does not support compositor driven animations. |
| 23 class SimCompositor final { |
| 24 public: |
| 25 explicit SimCompositor(SimLayerTreeView&); |
| 26 ~SimCompositor(); |
| 27 |
| 28 void setWebViewImpl(WebViewImpl&); |
| 29 |
| 30 // Execute the BeginMainFrame processing steps, an approximation of what |
| 31 // cc::ThreadProxy::BeginMainFrame would do. |
| 32 SimDisplayItemList beginFrame(); |
| 33 |
| 34 private: |
| 35 SimLayerTreeView* m_layerTreeView; |
| 36 WebViewImpl* m_webViewImpl; |
| 37 double m_lastFrameTimeMonotonic; |
| 38 }; |
| 39 |
| 40 } // namespace blink |
| 41 |
| 42 #endif |
OLD | NEW |