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

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

Issue 2380683006: SPv2: Add support for tracking raster paint invalidations in testing. (Closed)
Patch Set: none Created 4 years, 2 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 | « third_party/WebKit/Source/web/LinkHighlightImpl.cpp ('k') | no next file » | 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 #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"
11 #include "core/paint/PaintLayer.h" 11 #include "core/paint/PaintLayer.h"
12 #include "platform/graphics/ContentLayerDelegate.h" 12 #include "platform/graphics/ContentLayerDelegate.h"
13 #include "platform/graphics/GraphicsLayer.h" 13 #include "platform/graphics/GraphicsLayer.h"
14 #include "public/platform/WebRect.h" 14 #include "public/platform/WebRect.h"
15 #include "web/WebLocalFrameImpl.h" 15 #include "web/WebLocalFrameImpl.h"
16 #include "web/WebViewImpl.h" 16 #include "web/WebViewImpl.h"
17 #include "web/tests/sim/SimDisplayItemList.h" 17 #include "web/tests/sim/SimDisplayItemList.h"
18 #include "wtf/CurrentTime.h" 18 #include "wtf/CurrentTime.h"
19 19
20 namespace blink { 20 namespace blink {
21 21
22 static void paintLayers(GraphicsLayer& layer, SimDisplayItemList& displayList) { 22 static void paintLayers(GraphicsLayer& layer, SimDisplayItemList& displayList) {
23 if (layer.drawsContent() && layer.hasTrackedPaintInvalidations()) { 23 if (layer.drawsContent() && layer.hasTrackedRasterInvalidations()) {
24 ContentLayerDelegate* delegate = layer.contentLayerDelegateForTesting(); 24 ContentLayerDelegate* delegate = layer.contentLayerDelegateForTesting();
25 delegate->paintContents(&displayList); 25 delegate->paintContents(&displayList);
26 layer.resetTrackedPaintInvalidations(); 26 layer.resetTrackedRasterInvalidations();
27 } 27 }
28 28
29 if (GraphicsLayer* maskLayer = layer.maskLayer()) 29 if (GraphicsLayer* maskLayer = layer.maskLayer())
30 paintLayers(*maskLayer, displayList); 30 paintLayers(*maskLayer, displayList);
31 if (GraphicsLayer* contentsClippingMaskLayer = 31 if (GraphicsLayer* contentsClippingMaskLayer =
32 layer.contentsClippingMaskLayer()) 32 layer.contentsClippingMaskLayer())
33 paintLayers(*contentsClippingMaskLayer, displayList); 33 paintLayers(*contentsClippingMaskLayer, displayList);
34 34
35 for (auto child : layer.children()) 35 for (auto child : layer.children())
36 paintLayers(*child, displayList); 36 paintLayers(*child, displayList);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame(); 94 LocalFrame* root = m_webViewImpl->mainFrameImpl()->frame();
95 95
96 SimDisplayItemList displayList; 96 SimDisplayItemList displayList;
97 paintFrames(*root, displayList); 97 paintFrames(*root, displayList);
98 98
99 return displayList; 99 return displayList;
100 } 100 }
101 101
102 } // namespace blink 102 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/LinkHighlightImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698