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

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

Issue 1912893002: cc : Stop pushing properties not used by LayerImpl to LayerImpl. (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 | « cc/trees/property_tree_builder.cc ('k') | third_party/WebKit/public/platform/WebLayer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/CompositorMutableState.h" 5 #include "platform/graphics/CompositorMutableState.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "cc/test/fake_impl_task_runner_provider.h" 8 #include "cc/test/fake_impl_task_runner_provider.h"
9 #include "cc/test/fake_layer_tree_host_impl.h" 9 #include "cc/test/fake_layer_tree_host_impl.h"
10 #include "cc/test/fake_output_surface.h" 10 #include "cc/test/fake_output_surface.h"
(...skipping 30 matching lines...) Expand all
41 EXPECT_TRUE(m_hostImpl->InitializeRenderer(m_outputSurface.get())); 41 EXPECT_TRUE(m_hostImpl->InitializeRenderer(m_outputSurface.get()));
42 } 42 }
43 43
44 void SetLayerPropertiesForTesting(LayerImpl* layer) 44 void SetLayerPropertiesForTesting(LayerImpl* layer)
45 { 45 {
46 layer->SetTransform(gfx::Transform()); 46 layer->SetTransform(gfx::Transform());
47 layer->SetPosition(gfx::PointF()); 47 layer->SetPosition(gfx::PointF());
48 layer->SetBounds(gfx::Size(100, 100)); 48 layer->SetBounds(gfx::Size(100, 100));
49 layer->SetShouldFlattenTransform(true); 49 layer->SetShouldFlattenTransform(true);
50 layer->Set3dSortingContextId(0); 50 layer->Set3dSortingContextId(0);
51 layer->SetForceRenderSurface(true);
52 layer->SetDrawsContent(true); 51 layer->SetDrawsContent(true);
53 } 52 }
54 53
55 FakeLayerTreeHostImpl& hostImpl() { return *m_hostImpl; } 54 FakeLayerTreeHostImpl& hostImpl() { return *m_hostImpl; }
56 55
57 LayerImpl* rootLayer() { return m_hostImpl->active_tree()->root_layer(); } 56 LayerImpl* rootLayer() { return m_hostImpl->active_tree()->root_layer(); }
58 57
59 private: 58 private:
60 // The cc testing machinery has fairly deep dependency on having a main 59 // The cc testing machinery has fairly deep dependency on having a main
61 // message loop (one example is the task runner provider). We construct one 60 // message loop (one example is the task runner provider). We construct one
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 EXPECT_TRUE(mutation.isScrollLeftMutated()); 158 EXPECT_TRUE(mutation.isScrollLeftMutated());
160 EXPECT_TRUE(mutation.isScrollTopMutated()); 159 EXPECT_TRUE(mutation.isScrollTopMutated());
161 160
162 EXPECT_EQ(0.5, mutation.opacity()); 161 EXPECT_EQ(0.5, mutation.opacity());
163 EXPECT_EQ(zero.ToString(), gfx::Transform(mutation.transform()).ToString()); 162 EXPECT_EQ(zero.ToString(), gfx::Transform(mutation.transform()).ToString());
164 EXPECT_EQ(1.0, mutation.scrollLeft()); 163 EXPECT_EQ(1.0, mutation.scrollLeft());
165 EXPECT_EQ(1.0, mutation.scrollTop()); 164 EXPECT_EQ(1.0, mutation.scrollTop());
166 } 165 }
167 166
168 } // namespace blink 167 } // namespace blink
OLDNEW
« no previous file with comments | « cc/trees/property_tree_builder.cc ('k') | third_party/WebKit/public/platform/WebLayer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698