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

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

Issue 2254543004: cc : Delete LayerImpl::transform (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use test properties transform Created 4 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
« no previous file with comments | « cc/layers/layer_utils_unittest.cc ('k') | cc/test/layer_tree_json_parser_unittest.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 "cc/layers/render_surface_impl.h" 5 #include "cc/layers/render_surface_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "cc/layers/append_quads_data.h" 9 #include "cc/layers/append_quads_data.h"
10 #include "cc/quads/render_pass_draw_quad.h" 10 #include "cc/quads/render_pass_draw_quad.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 std::unique_ptr<LayerImpl> root = 72 std::unique_ptr<LayerImpl> root =
73 LayerImpl::Create(impl.host_impl()->active_tree(), 2); 73 LayerImpl::Create(impl.host_impl()->active_tree(), 2);
74 root->SetHasRenderSurface(true); 74 root->SetHasRenderSurface(true);
75 std::unique_ptr<LayerImpl> surface = 75 std::unique_ptr<LayerImpl> surface =
76 LayerImpl::Create(impl.host_impl()->active_tree(), 3); 76 LayerImpl::Create(impl.host_impl()->active_tree(), 3);
77 surface->SetBounds(layer_size); 77 surface->SetBounds(layer_size);
78 surface->SetHasRenderSurface(true); 78 surface->SetHasRenderSurface(true);
79 79
80 gfx::Transform scale; 80 gfx::Transform scale;
81 scale.Scale(2, 2); 81 scale.Scale(2, 2);
82 surface->SetTransform(scale); 82 surface->test_properties()->transform = scale;
83 83
84 surface->test_properties()->SetMaskLayer( 84 surface->test_properties()->SetMaskLayer(
85 FakeMaskLayerImpl::Create(impl.host_impl()->active_tree(), 4)); 85 FakeMaskLayerImpl::Create(impl.host_impl()->active_tree(), 4));
86 surface->test_properties()->mask_layer->SetDrawsContent(true); 86 surface->test_properties()->mask_layer->SetDrawsContent(true);
87 surface->test_properties()->mask_layer->SetBounds(layer_size); 87 surface->test_properties()->mask_layer->SetBounds(layer_size);
88 88
89 std::unique_ptr<LayerImpl> child = 89 std::unique_ptr<LayerImpl> child =
90 LayerImpl::Create(impl.host_impl()->active_tree(), 5); 90 LayerImpl::Create(impl.host_impl()->active_tree(), 5);
91 child->SetDrawsContent(true); 91 child->SetDrawsContent(true);
92 child->SetBounds(layer_size); 92 child->SetBounds(layer_size);
(...skipping 20 matching lines...) Expand all
113 RenderPassId(1, 1)); 113 RenderPassId(1, 1));
114 114
115 const RenderPassDrawQuad* quad = 115 const RenderPassDrawQuad* quad =
116 RenderPassDrawQuad::MaterialCast(render_pass->quad_list.front()); 116 RenderPassDrawQuad::MaterialCast(render_pass->quad_list.front());
117 EXPECT_EQ(gfx::Vector2dF(0.0005f, 0.0005f), quad->mask_uv_scale); 117 EXPECT_EQ(gfx::Vector2dF(0.0005f, 0.0005f), quad->mask_uv_scale);
118 EXPECT_EQ(gfx::Vector2dF(2.f, 2.f), quad->filters_scale); 118 EXPECT_EQ(gfx::Vector2dF(2.f, 2.f), quad->filters_scale);
119 } 119 }
120 120
121 } // namespace 121 } // namespace
122 } // namespace cc 122 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_utils_unittest.cc ('k') | cc/test/layer_tree_json_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698