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

Side by Side Diff: cc/layers/layer_position_constraint_unittest.cc

Issue 332873005: Rendering context information added to SharedQuadState (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rendering context now in Layers, removed is_3d_sorted Created 6 years, 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "cc/layers/layer_position_constraint.h" 5 #include "cc/layers/layer_position_constraint.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "cc/layers/layer_impl.h" 9 #include "cc/layers/layer_impl.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
11 #include "cc/test/fake_layer_tree_host_impl.h" 11 #include "cc/test/fake_layer_tree_host_impl.h"
12 #include "cc/test/geometry_test_utils.h" 12 #include "cc/test/geometry_test_utils.h"
13 #include "cc/test/test_shared_bitmap_manager.h" 13 #include "cc/test/test_shared_bitmap_manager.h"
14 #include "cc/trees/layer_tree_host_common.h" 14 #include "cc/trees/layer_tree_host_common.h"
15 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
16 16
17 namespace cc { 17 namespace cc {
18 namespace { 18 namespace {
19 19
20 void SetLayerPropertiesForTesting(LayerImpl* layer, 20 void SetLayerPropertiesForTesting(LayerImpl* layer,
21 const gfx::Transform& transform, 21 const gfx::Transform& transform,
22 const gfx::Point3F& transform_origin, 22 const gfx::Point3F& transform_origin,
23 const gfx::PointF& position, 23 const gfx::PointF& position,
24 const gfx::Size& bounds, 24 const gfx::Size& bounds,
25 bool flatten_transform, 25 bool flatten_transform,
26 bool is_3d_sorted) { 26 bool is_3d_sorted) {
danakj 2014/06/15 18:15:36 Nothing in this file even sets this to true. You c
troyhildebrandt 2014/06/17 00:29:43 Done.
27 layer->SetTransform(transform); 27 layer->SetTransform(transform);
28 layer->SetTransformOrigin(transform_origin); 28 layer->SetTransformOrigin(transform_origin);
29 layer->SetPosition(position); 29 layer->SetPosition(position);
30 layer->SetBounds(bounds); 30 layer->SetBounds(bounds);
31 layer->SetShouldFlattenTransform(flatten_transform); 31 layer->SetShouldFlattenTransform(flatten_transform);
32 layer->SetIs3dSorted(is_3d_sorted); 32 layer->SetRenderingContextId(is_3d_sorted ? 1 : 0);
33 layer->SetContentBounds(bounds); 33 layer->SetContentBounds(bounds);
34 } 34 }
35 35
36 void ExecuteCalculateDrawProperties(LayerImpl* root_layer, 36 void ExecuteCalculateDrawProperties(LayerImpl* root_layer,
37 float device_scale_factor, 37 float device_scale_factor,
38 float page_scale_factor, 38 float page_scale_factor,
39 LayerImpl* page_scale_application_layer, 39 LayerImpl* page_scale_application_layer,
40 bool can_use_lcd_text) { 40 bool can_use_lcd_text) {
41 gfx::Transform identity_matrix; 41 gfx::Transform identity_matrix;
42 std::vector<LayerImpl*> dummy_render_surface_layer_list; 42 std::vector<LayerImpl*> dummy_render_surface_layer_list;
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1163 fixed_to_container1->draw_transform()); 1163 fixed_to_container1->draw_transform());
1164 1164
1165 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform, 1165 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_container2_transform,
1166 container2->draw_transform()); 1166 container2->draw_transform());
1167 1167
1168 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform, 1168 EXPECT_TRANSFORMATION_MATRIX_EQ(expected_fixed_to_container2_transform,
1169 fixed_to_container2->draw_transform()); 1169 fixed_to_container2->draw_transform());
1170 } 1170 }
1171 } // namespace 1171 } // namespace
1172 } // namespace cc 1172 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698