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

Side by Side Diff: Source/core/compositing/DisplayListCompositingBuilderTest.cpp

Issue 1287093004: Slimming Paint phase 2 compositing algorithm plumbing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase from space Created 5 years, 4 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "config.h"
6 #include "core/compositing/DisplayListCompositingBuilder.h"
7
8 #include "platform/RuntimeEnabledFeatures.h"
9 #include <gtest/gtest.h>
10
11 namespace blink {
12
13 class DisplayListCompositingBuilderTest : public ::testing::Test {
14 public:
15 DisplayListCompositingBuilderTest()
16 : m_originalSlimmingPaintV2Enabled(RuntimeEnabledFeatures::slimmingPaint V2Enabled()) { }
17
18 private:
19 void SetUp() override
20 {
21 ASSERT_TRUE(RuntimeEnabledFeatures::slimmingPaintEnabled());
22 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(true);
23 }
24
25 void TearDown() override
26 {
27 RuntimeEnabledFeatures::setSlimmingPaintV2Enabled(m_originalSlimmingPain tV2Enabled);
28 }
29
30 bool m_originalSlimmingPaintV2Enabled;
31 };
32
33 TEST_F(DisplayListCompositingBuilderTest, BasicTransformPropertyTree)
34 {
35 OwnPtr<DisplayItemList> displayItemList = DisplayItemList::create();
36 DisplayListDiff displayListDiff;
37 displayItemList->commitNewDisplayItems(&displayListDiff);
38
39 DisplayListCompositingBuilder compositingBuilder(*displayItemList, displayLi stDiff);
40 CompositedDisplayList compositedDisplayList;
41 compositingBuilder.build(compositedDisplayList);
42
43 const auto& tree = *compositedDisplayList.transformTree;
44 ASSERT_EQ(1u, tree.nodeCount());
45 EXPECT_TRUE(tree.nodeAt(0).isRoot());
46 EXPECT_TRUE(tree.nodeAt(0).matrix.isIdentity());
47 }
48
49 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/compositing/DisplayListCompositingBuilder.cpp ('k') | Source/core/compositing/DisplayListCompositingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698