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

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

Issue 2713773003: Add test for paint underinvalidation fix with animated transform overflow. (Closed)
Patch Set: 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
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 #include "web/tests/sim/SimCompositor.h" 5 #include "web/tests/sim/SimCompositor.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/layout/api/LayoutViewItem.h" 8 #include "core/layout/api/LayoutViewItem.h"
9 #include "core/layout/compositing/CompositedLayerMapping.h" 9 #include "core/layout/compositing/CompositedLayerMapping.h"
10 #include "core/layout/compositing/PaintLayerCompositor.h" 10 #include "core/layout/compositing/PaintLayerCompositor.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 72 }
73 73
74 void SimCompositor::registerSelection(const WebSelection&) { 74 void SimCompositor::registerSelection(const WebSelection&) {
75 m_hasSelection = true; 75 m_hasSelection = true;
76 } 76 }
77 77
78 void SimCompositor::clearSelection() { 78 void SimCompositor::clearSelection() {
79 m_hasSelection = false; 79 m_hasSelection = false;
80 } 80 }
81 81
82 SimDisplayItemList SimCompositor::beginFrame() { 82 SimDisplayItemList SimCompositor::beginFrame(double dt) {
83 DCHECK(m_webViewImpl); 83 DCHECK(m_webViewImpl);
84 DCHECK(!m_deferCommits); 84 DCHECK(!m_deferCommits);
85 DCHECK(m_needsBeginFrame); 85 DCHECK(m_needsBeginFrame);
86 m_needsBeginFrame = false; 86 m_needsBeginFrame = false;
87 87
88 // Always advance the time as if the compositor was running at 60fps. 88 m_lastFrameTimeMonotonic = monotonicallyIncreasingTime() + dt;
89 m_lastFrameTimeMonotonic = monotonicallyIncreasingTime() + 0.016;
90 89
91 m_webViewImpl->beginFrame(m_lastFrameTimeMonotonic); 90 m_webViewImpl->beginFrame(m_lastFrameTimeMonotonic);
92 m_webViewImpl->updateAllLifecyclePhases(); 91 m_webViewImpl->updateAllLifecyclePhases();
93 92
94 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); 93 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame();
95 94
96 SimDisplayItemList displayList; 95 SimDisplayItemList displayList;
97 paintFrames(*root, displayList); 96 paintFrames(*root, displayList);
98 97
99 return displayList; 98 return displayList;
100 } 99 }
101 100
102 } // namespace blink 101 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698