OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 #include <stdint.h> | 6 #include <stdint.h> |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "cc/quads/debug_border_draw_quad.h" | 10 #include "cc/quads/debug_border_draw_quad.h" |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 TEST_F(SurfaceLibQuadTest, TextureQuadEmptyVertexOpacity) { | 146 TEST_F(SurfaceLibQuadTest, TextureQuadEmptyVertexOpacity) { |
147 DrawQuadPtr mus_texture_quad = DrawQuad::New(); | 147 DrawQuadPtr mus_texture_quad = DrawQuad::New(); |
148 mus_texture_quad->material = cc::mojom::Material::TEXTURE_CONTENT; | 148 mus_texture_quad->material = cc::mojom::Material::TEXTURE_CONTENT; |
149 TextureQuadStatePtr mus_texture_state = TextureQuadState::New(); | 149 TextureQuadStatePtr mus_texture_state = TextureQuadState::New(); |
150 mus_texture_quad->texture_quad_state = std::move(mus_texture_state); | 150 mus_texture_quad->texture_quad_state = std::move(mus_texture_state); |
151 RenderPassPtr mus_pass = RenderPass::New(); | 151 RenderPassPtr mus_pass = RenderPass::New(); |
152 mus_pass->id.layer_id = 1; | 152 mus_pass->id.layer_id = 1; |
153 mus_pass->id.index = 1u; | 153 mus_pass->id.index = 1u; |
154 mus_pass->quads.push_back(std::move(mus_texture_quad)); | 154 mus_pass->quads.push_back(std::move(mus_texture_quad)); |
155 mus_pass->shared_quad_states.push_back(cc::SharedQuadState()); | 155 mus_pass->shared_quad_states.AllocateAndConstruct<cc::SharedQuadState>(); |
156 | 156 |
157 std::unique_ptr<cc::RenderPass> pass = | 157 std::unique_ptr<cc::RenderPass> pass = |
158 mus_pass.To<std::unique_ptr<cc::RenderPass>>(); | 158 mus_pass.To<std::unique_ptr<cc::RenderPass>>(); |
159 | 159 |
160 EXPECT_FALSE(pass); | 160 EXPECT_FALSE(pass); |
161 } | 161 } |
162 | 162 |
163 TEST(SurfaceLibTest, RenderPass) { | 163 TEST(SurfaceLibTest, RenderPass) { |
164 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); | 164 std::unique_ptr<cc::RenderPass> pass = cc::RenderPass::Create(); |
165 cc::RenderPassId pass_id(1, 6); | 165 cc::RenderPassId pass_id(1, 6); |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 EXPECT_EQ(needs_blending, mus_quad->needs_blending); | 323 EXPECT_EQ(needs_blending, mus_quad->needs_blending); |
324 ASSERT_TRUE(mus_quad->debug_border_quad_state); | 324 ASSERT_TRUE(mus_quad->debug_border_quad_state); |
325 DebugBorderQuadStatePtr& mus_debug_border_state = | 325 DebugBorderQuadStatePtr& mus_debug_border_state = |
326 mus_quad->debug_border_quad_state; | 326 mus_quad->debug_border_quad_state; |
327 EXPECT_EQ(arbitrary_color, mus_debug_border_state->color); | 327 EXPECT_EQ(arbitrary_color, mus_debug_border_state->color); |
328 EXPECT_EQ(width, mus_debug_border_state->width); | 328 EXPECT_EQ(width, mus_debug_border_state->width); |
329 } | 329 } |
330 | 330 |
331 } // namespace | 331 } // namespace |
332 } // namespace mojo | 332 } // namespace mojo |
OLD | NEW |