| 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/LayoutView.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" |
| 11 #include "platform/graphics/ContentLayerDelegate.h" | 11 #include "platform/graphics/ContentLayerDelegate.h" |
| 12 #include "public/platform/WebRect.h" | 12 #include "public/platform/WebRect.h" |
| 13 #include "web/WebLocalFrameImpl.h" | 13 #include "web/WebLocalFrameImpl.h" |
| 14 #include "web/WebViewImpl.h" | 14 #include "web/WebViewImpl.h" |
| 15 #include "web/tests/sim/SimDisplayItemList.h" | 15 #include "web/tests/sim/SimDisplayItemList.h" |
| 16 #include "wtf/CurrentTime.h" | 16 #include "wtf/CurrentTime.h" |
| 17 | 17 |
| 18 namespace blink { | 18 namespace blink { |
| (...skipping 11 matching lines...) Expand all Loading... |
| 30 } | 30 } |
| 31 for (PaintLayer* child = layer.firstChild(); child; child = child->nextSibli
ng()) | 31 for (PaintLayer* child = layer.firstChild(); child; child = child->nextSibli
ng()) |
| 32 paintLayers(*child, displayList); | 32 paintLayers(*child, displayList); |
| 33 } | 33 } |
| 34 | 34 |
| 35 static void paintFrames(LocalFrame& root, SimDisplayItemList& displayList) | 35 static void paintFrames(LocalFrame& root, SimDisplayItemList& displayList) |
| 36 { | 36 { |
| 37 for (Frame* frame = &root; frame; frame = frame->tree().traverseNext(&root))
{ | 37 for (Frame* frame = &root; frame; frame = frame->tree().traverseNext(&root))
{ |
| 38 if (!frame->isLocalFrame()) | 38 if (!frame->isLocalFrame()) |
| 39 continue; | 39 continue; |
| 40 PaintLayer* layer = toLocalFrame(frame)->view()->layoutView()->layer(); | 40 PaintLayer* layer = toLocalFrame(frame)->view()->layoutViewItem().layer(
); |
| 41 paintLayers(*layer, displayList); | 41 paintLayers(*layer, displayList); |
| 42 } | 42 } |
| 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) |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 101 |
| 102 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); | 102 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); |
| 103 | 103 |
| 104 SimDisplayItemList displayList; | 104 SimDisplayItemList displayList; |
| 105 paintFrames(*root, displayList); | 105 paintFrames(*root, displayList); |
| 106 | 106 |
| 107 return displayList; | 107 return displayList; |
| 108 } | 108 } |
| 109 | 109 |
| 110 } // namespace blink | 110 } // namespace blink |
| OLD | NEW |