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

Side by Side Diff: third_party/WebKit/Source/web/tests/sim/SimCompositor.h

Issue 2746223003: Enable control over frame time in SimTests (Closed)
Patch Set: reviewchange Created 3 years, 9 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SimCompositor_h 5 #ifndef SimCompositor_h
6 #define SimCompositor_h 6 #define SimCompositor_h
7 7
8 #include "public/platform/WebLayerTreeView.h" 8 #include "public/platform/WebLayerTreeView.h"
9 9
10 namespace blink { 10 namespace blink {
(...skipping 12 matching lines...) Expand all
23 // Note: This also does not support compositor driven animations. 23 // Note: This also does not support compositor driven animations.
24 class SimCompositor final : public WebLayerTreeView { 24 class SimCompositor final : public WebLayerTreeView {
25 public: 25 public:
26 explicit SimCompositor(); 26 explicit SimCompositor();
27 ~SimCompositor(); 27 ~SimCompositor();
28 28
29 void setWebViewImpl(WebViewImpl&); 29 void setWebViewImpl(WebViewImpl&);
30 30
31 // Execute the BeginMainFrame processing steps, an approximation of what 31 // Execute the BeginMainFrame processing steps, an approximation of what
32 // cc::ThreadProxy::BeginMainFrame would do. 32 // cc::ThreadProxy::BeginMainFrame would do.
33 SimDisplayItemList beginFrame(); 33 // If time is not specified a 60Hz frame rate time progression is used.
34 SimDisplayItemList beginFrame(double timeDeltaInSeconds = 0.016);
34 35
35 bool needsBeginFrame() const { return m_needsBeginFrame; } 36 bool needsBeginFrame() const { return m_needsBeginFrame; }
36 bool deferCommits() const { return m_deferCommits; } 37 bool deferCommits() const { return m_deferCommits; }
37 38
38 bool hasSelection() const { return m_hasSelection; } 39 bool hasSelection() const { return m_hasSelection; }
39 40
40 private: 41 private:
41 void setNeedsBeginFrame() override; 42 void setNeedsBeginFrame() override;
42 void setNeedsCompositorUpdate() override; 43 void setNeedsCompositorUpdate() override;
43 void setDeferCommits(bool) override; 44 void setDeferCommits(bool) override;
44 void registerSelection(const WebSelection&) override; 45 void registerSelection(const WebSelection&) override;
45 void clearSelection() override; 46 void clearSelection() override;
46 47
47 bool m_needsBeginFrame; 48 bool m_needsBeginFrame;
48 bool m_deferCommits; 49 bool m_deferCommits;
49 bool m_hasSelection; 50 bool m_hasSelection;
50 WebViewImpl* m_webViewImpl; 51 WebViewImpl* m_webViewImpl;
51 double m_lastFrameTimeMonotonic; 52 double m_lastFrameTimeMonotonic;
52 }; 53 };
53 54
54 } // namespace blink 55 } // namespace blink
55 56
56 #endif 57 #endif
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/web/tests/sim/SimCompositor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698