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

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: assert 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 // If time is not specified a 60Hz frame rate time progression is used.
33 SimDisplayItemList beginFrame(); 34 SimDisplayItemList beginFrame();
35 SimDisplayItemList beginFrame(double timeInSeconds);
esprehn 2017/03/14 05:54:12 If we make this: (double timeInSeconds = 0.016)
34 36
35 bool needsBeginFrame() const { return m_needsBeginFrame; } 37 bool needsBeginFrame() const { return m_needsBeginFrame; }
36 bool deferCommits() const { return m_deferCommits; } 38 bool deferCommits() const { return m_deferCommits; }
37 39
38 bool hasSelection() const { return m_hasSelection; } 40 bool hasSelection() const { return m_hasSelection; }
39 41
40 private: 42 private:
41 void setNeedsBeginFrame() override; 43 void setNeedsBeginFrame() override;
42 void setNeedsCompositorUpdate() override; 44 void setNeedsCompositorUpdate() override;
43 void setDeferCommits(bool) override; 45 void setDeferCommits(bool) override;
44 void registerSelection(const WebSelection&) override; 46 void registerSelection(const WebSelection&) override;
45 void clearSelection() override; 47 void clearSelection() override;
46 48
47 bool m_needsBeginFrame; 49 bool m_needsBeginFrame;
48 bool m_deferCommits; 50 bool m_deferCommits;
49 bool m_hasSelection; 51 bool m_hasSelection;
50 WebViewImpl* m_webViewImpl; 52 WebViewImpl* m_webViewImpl;
51 double m_lastFrameTimeMonotonic; 53 double m_lastFrameTimeMonotonic;
52 }; 54 };
53 55
54 } // namespace blink 56 } // namespace blink
55 57
56 #endif 58 #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