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

Side by Side Diff: third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositorTest.cpp

Issue 2577123002: Add optional debugging output of what paint chunks go into what layers. (Closed)
Patch Set: none Created 4 years 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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "platform/graphics/compositing/PaintArtifactCompositor.h" 5 #include "platform/graphics/compositing/PaintArtifactCompositor.h"
6 6
7 #include "base/test/test_simple_task_runner.h" 7 #include "base/test/test_simple_task_runner.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "cc/layers/layer.h" 9 #include "cc/layers/layer.h"
10 #include "cc/test/fake_compositor_frame_sink.h" 10 #include "cc/test/fake_compositor_frame_sink.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 return *m_webLayerTreeView->layerTreeHost() 87 return *m_webLayerTreeView->layerTreeHost()
88 ->GetLayerTree() 88 ->GetLayerTree()
89 ->property_trees(); 89 ->property_trees();
90 } 90 }
91 91
92 const cc::TransformNode& transformNode(const cc::Layer* layer) { 92 const cc::TransformNode& transformNode(const cc::Layer* layer) {
93 return *propertyTrees().transform_tree.Node(layer->transform_tree_index()); 93 return *propertyTrees().transform_tree.Node(layer->transform_tree_index());
94 } 94 }
95 95
96 void update(const PaintArtifact& artifact) { 96 void update(const PaintArtifact& artifact) {
97 m_paintArtifactCompositor->update(artifact, nullptr); 97 m_paintArtifactCompositor->update(artifact, nullptr, false);
98 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers(); 98 m_webLayerTreeView->layerTreeHost()->LayoutAndUpdateLayers();
99 } 99 }
100 100
101 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); } 101 cc::Layer* rootLayer() { return m_paintArtifactCompositor->rootLayer(); }
102 102
103 size_t contentLayerCount() { 103 size_t contentLayerCount() {
104 return m_paintArtifactCompositor->getExtraDataForTesting() 104 return m_paintArtifactCompositor->getExtraDataForTesting()
105 ->contentLayers.size(); 105 ->contentLayers.size();
106 } 106 }
107 107
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 scrollTree.current_scroll_offset(contentLayerAt(1)->id())); 715 scrollTree.current_scroll_offset(contentLayerAt(1)->id()));
716 716
717 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & 717 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons &
718 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); 718 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
719 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons & 719 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons &
720 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); 720 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
721 } 721 }
722 722
723 } // namespace 723 } // namespace
724 } // namespace blink 724 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698