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

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

Issue 1908593002: cc : Stop pushing transform origin from Layer and LayerImpl. (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') | 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 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 26 matching lines...) Expand all
37 LayerTreeSettings settings; 37 LayerTreeSettings settings;
38 settings.layer_transforms_should_scale_layer_contents = true; 38 settings.layer_transforms_should_scale_layer_contents = true;
39 m_hostImpl.reset(new FakeLayerTreeHostImpl(settings, &m_taskRunnerProvid er, &m_sharedBitmapManager, &m_taskGraphRunner)); 39 m_hostImpl.reset(new FakeLayerTreeHostImpl(settings, &m_taskRunnerProvid er, &m_sharedBitmapManager, &m_taskGraphRunner));
40 m_hostImpl->SetVisible(true); 40 m_hostImpl->SetVisible(true);
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->SetTransformOrigin(gfx::Point3F());
48 layer->SetPosition(gfx::PointF()); 47 layer->SetPosition(gfx::PointF());
49 layer->SetBounds(gfx::Size(100, 100)); 48 layer->SetBounds(gfx::Size(100, 100));
50 layer->SetShouldFlattenTransform(true); 49 layer->SetShouldFlattenTransform(true);
51 layer->Set3dSortingContextId(0); 50 layer->Set3dSortingContextId(0);
52 layer->SetForceRenderSurface(true); 51 layer->SetForceRenderSurface(true);
53 layer->SetDrawsContent(true); 52 layer->SetDrawsContent(true);
54 } 53 }
55 54
56 FakeLayerTreeHostImpl& hostImpl() { return *m_hostImpl; } 55 FakeLayerTreeHostImpl& hostImpl() { return *m_hostImpl; }
57 56
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 EXPECT_TRUE(mutation.isScrollLeftMutated()); 159 EXPECT_TRUE(mutation.isScrollLeftMutated());
161 EXPECT_TRUE(mutation.isScrollTopMutated()); 160 EXPECT_TRUE(mutation.isScrollTopMutated());
162 161
163 EXPECT_EQ(0.5, mutation.opacity()); 162 EXPECT_EQ(0.5, mutation.opacity());
164 EXPECT_EQ(zero.ToString(), gfx::Transform(mutation.transform()).ToString()); 163 EXPECT_EQ(zero.ToString(), gfx::Transform(mutation.transform()).ToString());
165 EXPECT_EQ(1.0, mutation.scrollLeft()); 164 EXPECT_EQ(1.0, mutation.scrollLeft());
166 EXPECT_EQ(1.0, mutation.scrollTop()); 165 EXPECT_EQ(1.0, mutation.scrollTop());
167 } 166 }
168 167
169 } // namespace blink 168 } // namespace blink
OLDNEW
« no previous file with comments | « cc/trees/property_tree_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698