| OLD | NEW |
| 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/paint/PaintLayer.h" | 10 #include "core/paint/PaintLayer.h" |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 } | 43 } |
| 44 | 44 |
| 45 SimCompositor::SimCompositor() | 45 SimCompositor::SimCompositor() |
| 46 : m_needsAnimate(false) | 46 : m_needsAnimate(false) |
| 47 , m_deferCommits(true) | 47 , m_deferCommits(true) |
| 48 , m_hasSelection(false) | 48 , m_hasSelection(false) |
| 49 , m_webViewImpl(0) | 49 , m_webViewImpl(0) |
| 50 , m_lastFrameTimeMonotonic(0) | 50 , m_lastFrameTimeMonotonic(0) |
| 51 { | 51 { |
| 52 FrameView::setInitialTracksPaintInvalidationsForTesting(true); | 52 FrameView::setInitialTracksPaintInvalidationsForTesting(true); |
| 53 // Disable the debug red fill so the output display list doesn't differ in | |
| 54 // size in Release vs Debug builds. | |
| 55 GraphicsLayer::setDrawDebugRedFillForTesting(false); | |
| 56 } | 53 } |
| 57 | 54 |
| 58 SimCompositor::~SimCompositor() | 55 SimCompositor::~SimCompositor() |
| 59 { | 56 { |
| 60 FrameView::setInitialTracksPaintInvalidationsForTesting(false); | 57 FrameView::setInitialTracksPaintInvalidationsForTesting(false); |
| 61 GraphicsLayer::setDrawDebugRedFillForTesting(true); | |
| 62 } | 58 } |
| 63 | 59 |
| 64 void SimCompositor::setWebViewImpl(WebViewImpl& webViewImpl) | 60 void SimCompositor::setWebViewImpl(WebViewImpl& webViewImpl) |
| 65 { | 61 { |
| 66 m_webViewImpl = &webViewImpl; | 62 m_webViewImpl = &webViewImpl; |
| 67 } | 63 } |
| 68 | 64 |
| 69 void SimCompositor::setNeedsAnimate() | 65 void SimCompositor::setNeedsAnimate() |
| 70 { | 66 { |
| 71 m_needsAnimate = true; | 67 m_needsAnimate = true; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 101 | 97 |
| 102 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); | 98 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); |
| 103 | 99 |
| 104 SimDisplayItemList displayList; | 100 SimDisplayItemList displayList; |
| 105 paintFrames(*root, displayList); | 101 paintFrames(*root, displayList); |
| 106 | 102 |
| 107 return displayList; | 103 return displayList; |
| 108 } | 104 } |
| 109 | 105 |
| 110 } // namespace blink | 106 } // namespace blink |
| OLD | NEW |