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

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

Issue 2391943002: Rewrap comments to 80 columns in platform/graphics/{compositing,cpu,gpu,skia}/. (Closed)
Patch Set: One space 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
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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 .rectDrawing(FloatRect(0, 0, 100, 100), Color::white); 531 .rectDrawing(FloatRect(0, 0, 100, 100), Color::white);
532 artifact.chunk(nullptr, nullptr, effect1.get()) 532 artifact.chunk(nullptr, nullptr, effect1.get())
533 .rectDrawing(FloatRect(0, 0, 100, 100), Color::white); 533 .rectDrawing(FloatRect(0, 0, 100, 100), Color::white);
534 artifact.chunk(nullptr, nullptr, effect3.get()) 534 artifact.chunk(nullptr, nullptr, effect3.get())
535 .rectDrawing(FloatRect(0, 0, 100, 100), Color::white); 535 .rectDrawing(FloatRect(0, 0, 100, 100), Color::white);
536 update(artifact.build()); 536 update(artifact.build());
537 537
538 ASSERT_EQ(3u, contentLayerCount()); 538 ASSERT_EQ(3u, contentLayerCount());
539 539
540 const cc::EffectTree& effectTree = propertyTrees().effect_tree; 540 const cc::EffectTree& effectTree = propertyTrees().effect_tree;
541 // Node #0 reserved for null; #1 for root render surface; #2 for dummyRootEffe ct, 541 // Node #0 reserved for null; #1 for root render surface; #2 for
542 // plus 3 nodes for those created by this test. 542 // dummyRootEffect, plus 3 nodes for those created by this test.
543 ASSERT_EQ(6u, effectTree.size()); 543 ASSERT_EQ(6u, effectTree.size());
544 544
545 const cc::EffectNode& convertedDummyRootEffect = *effectTree.Node(2); 545 const cc::EffectNode& convertedDummyRootEffect = *effectTree.Node(2);
546 EXPECT_EQ(1, convertedDummyRootEffect.parent_id); 546 EXPECT_EQ(1, convertedDummyRootEffect.parent_id);
547 547
548 const cc::EffectNode& convertedEffect1 = *effectTree.Node(3); 548 const cc::EffectNode& convertedEffect1 = *effectTree.Node(3);
549 EXPECT_EQ(convertedDummyRootEffect.id, convertedEffect1.parent_id); 549 EXPECT_EQ(convertedDummyRootEffect.id, convertedEffect1.parent_id);
550 EXPECT_FLOAT_EQ(0.5, convertedEffect1.opacity); 550 EXPECT_FLOAT_EQ(0.5, convertedEffect1.opacity);
551 551
552 const cc::EffectNode& convertedEffect2 = *effectTree.Node(4); 552 const cc::EffectNode& convertedEffect2 = *effectTree.Node(4);
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 scrollTree.current_scroll_offset(contentLayerAt(1)->id())); 652 scrollTree.current_scroll_offset(contentLayerAt(1)->id()));
653 653
654 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons & 654 EXPECT_TRUE(scrollNodeA.main_thread_scrolling_reasons &
655 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); 655 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
656 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons & 656 EXPECT_FALSE(scrollNodeB.main_thread_scrolling_reasons &
657 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects); 657 MainThreadScrollingReason::kHasBackgroundAttachmentFixedObjects);
658 } 658 }
659 659
660 } // namespace 660 } // namespace
661 } // namespace blink 661 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698