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

Side by Side Diff: cc/blink/web_layer_impl_fixed_bounds_unittest.cc

Issue 1739743003: Blink Compositor Animation: Erase old animation system. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Exclude histograms.xml Created 4 years, 9 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/blink/web_layer_impl.cc ('k') | cc/blink/web_scrollbar_layer_impl.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <vector> 5 #include <vector>
6 #include "cc/blink/web_layer_impl_fixed_bounds.h" 6 #include "cc/blink/web_layer_impl_fixed_bounds.h"
7 #include "cc/layers/layer_settings.h" 7 #include "cc/layers/layer_settings.h"
8 #include "cc/layers/picture_image_layer.h" 8 #include "cc/layers/picture_image_layer.h"
9 #include "cc/test/fake_layer_tree_host.h" 9 #include "cc/test/fake_layer_tree_host.h"
10 #include "cc/test/geometry_test_utils.h" 10 #include "cc/test/geometry_test_utils.h"
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 const float kDeviceScaleFactor = 2.f; 84 const float kDeviceScaleFactor = 2.f;
85 const float kPageScaleFactor = 1.5f; 85 const float kPageScaleFactor = 1.5f;
86 86
87 WebSize bounds(150, 200); 87 WebSize bounds(150, 200);
88 WebFloatPoint position(20, 30); 88 WebFloatPoint position(20, 30);
89 gfx::Size fixed_bounds(160, 70); 89 gfx::Size fixed_bounds(160, 70);
90 90
91 scoped_ptr<WebLayerImplFixedBounds> root_layer(new WebLayerImplFixedBounds()); 91 scoped_ptr<WebLayerImplFixedBounds> root_layer(new WebLayerImplFixedBounds());
92 92
93 WebLayerImplFixedBounds* fixed_bounds_layer = new WebLayerImplFixedBounds( 93 WebLayerImplFixedBounds* fixed_bounds_layer = new WebLayerImplFixedBounds(
94 cc::PictureImageLayer::Create(WebLayerImpl::LayerSettings())); 94 cc::PictureImageLayer::Create(cc::LayerSettings()));
95 fixed_bounds_layer->setBounds(bounds); 95 fixed_bounds_layer->setBounds(bounds);
96 fixed_bounds_layer->SetFixedBounds(fixed_bounds); 96 fixed_bounds_layer->SetFixedBounds(fixed_bounds);
97 fixed_bounds_layer->setTransform(transform.matrix()); 97 fixed_bounds_layer->setTransform(transform.matrix());
98 fixed_bounds_layer->setPosition(position); 98 fixed_bounds_layer->setPosition(position);
99 root_layer->addChild(fixed_bounds_layer); 99 root_layer->addChild(fixed_bounds_layer);
100 100
101 WebLayerImpl* normal_layer( 101 WebLayerImpl* normal_layer(
102 new WebLayerImpl(cc::PictureImageLayer::Create(cc::LayerSettings()))); 102 new WebLayerImpl(cc::PictureImageLayer::Create(cc::LayerSettings())));
103 103
104 normal_layer->setBounds(bounds); 104 normal_layer->setBounds(bounds);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 171
172 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), transform); 172 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0, 0), transform);
173 173
174 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to 174 // With non-zero anchor point, WebLayerImplFixedBounds will fall back to
175 // WebLayerImpl. 175 // WebLayerImpl.
176 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), transform); 176 CompareFixedBoundsLayerAndNormalLayer(WebFloatPoint(0.4f, 0.6f), transform);
177 } 177 }
178 178
179 } // namespace 179 } // namespace
180 } // namespace cc_blink 180 } // namespace cc_blink
OLDNEW
« no previous file with comments | « cc/blink/web_layer_impl.cc ('k') | cc/blink/web_scrollbar_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698