Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1168)

Unified Diff: Source/web/tests/sim/SimCompositor.h

Issue 1329553004: Add a FOUC painting test. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix build. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/web/tests/sim/SimCanvas.cpp ('k') | Source/web/tests/sim/SimCompositor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/sim/SimCompositor.h
diff --git a/Source/web/tests/sim/SimCompositor.h b/Source/web/tests/sim/SimCompositor.h
new file mode 100644
index 0000000000000000000000000000000000000000..53975e3be79c44bfcc8f788946398fcb4dd57f42
--- /dev/null
+++ b/Source/web/tests/sim/SimCompositor.h
@@ -0,0 +1,42 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef SimCompositor_h
+#define SimCompositor_h
+
+namespace blink {
+
+class SimDisplayItemList;
+class SimLayerTreeView;
+class WebViewImpl;
+
+// Simulated very basic compositor that's capable of running the BeginMainFrame
+// processing steps on WebView: beginFrame, layout, paint.
+//
+// The painting capabilities are very limited in that only the main layer of
+// every CompositedDeprecatedPaintLayerMapping will be painted, squashed layers
+// are not supported and the entirety of every layer is always repainted even if
+// only part of the layer was invalid.
+//
+// Note: This also does not support compositor driven animations.
+class SimCompositor final {
+public:
+ explicit SimCompositor(SimLayerTreeView&);
+ ~SimCompositor();
+
+ void setWebViewImpl(WebViewImpl&);
+
+ // Execute the BeginMainFrame processing steps, an approximation of what
+ // cc::ThreadProxy::BeginMainFrame would do.
+ SimDisplayItemList beginFrame();
+
+private:
+ SimLayerTreeView* m_layerTreeView;
+ WebViewImpl* m_webViewImpl;
+ double m_lastFrameTimeMonotonic;
+};
+
+} // namespace blink
+
+#endif
« no previous file with comments | « Source/web/tests/sim/SimCanvas.cpp ('k') | Source/web/tests/sim/SimCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698