OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 4168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4179 | 4179 |
4180 TileDrawQuad* test_blending_draw_quad = | 4180 TileDrawQuad* test_blending_draw_quad = |
4181 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); | 4181 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); |
4182 test_blending_draw_quad->SetNew(shared_quad_state, | 4182 test_blending_draw_quad->SetNew(shared_quad_state, |
4183 quad_rect_, | 4183 quad_rect_, |
4184 opaque_rect, | 4184 opaque_rect, |
4185 visible_quad_rect, | 4185 visible_quad_rect, |
4186 resource_id_, | 4186 resource_id_, |
4187 gfx::RectF(0.f, 0.f, 1.f, 1.f), | 4187 gfx::RectF(0.f, 0.f, 1.f, 1.f), |
4188 gfx::Size(1, 1), | 4188 gfx::Size(1, 1), |
| 4189 false, |
4189 false); | 4190 false); |
4190 test_blending_draw_quad->visible_rect = quad_visible_rect_; | 4191 test_blending_draw_quad->visible_rect = quad_visible_rect_; |
4191 EXPECT_EQ(blend_, test_blending_draw_quad->ShouldDrawWithBlending()); | 4192 EXPECT_EQ(blend_, test_blending_draw_quad->ShouldDrawWithBlending()); |
4192 EXPECT_EQ(has_render_surface_, !!render_surface()); | 4193 EXPECT_EQ(has_render_surface_, !!render_surface()); |
4193 } | 4194 } |
4194 | 4195 |
4195 void SetExpectation(bool blend, bool has_render_surface) { | 4196 void SetExpectation(bool blend, bool has_render_surface) { |
4196 blend_ = blend; | 4197 blend_ = blend; |
4197 has_render_surface_ = has_render_surface; | 4198 has_render_surface_ = has_render_surface; |
4198 quads_appended_ = false; | 4199 quads_appended_ = false; |
(...skipping 3706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7905 // surface. | 7906 // surface. |
7906 EXPECT_EQ(0, num_lost_surfaces_); | 7907 EXPECT_EQ(0, num_lost_surfaces_); |
7907 host_impl_->DidLoseOutputSurface(); | 7908 host_impl_->DidLoseOutputSurface(); |
7908 EXPECT_EQ(1, num_lost_surfaces_); | 7909 EXPECT_EQ(1, num_lost_surfaces_); |
7909 host_impl_->DidLoseOutputSurface(); | 7910 host_impl_->DidLoseOutputSurface(); |
7910 EXPECT_LE(1, num_lost_surfaces_); | 7911 EXPECT_LE(1, num_lost_surfaces_); |
7911 } | 7912 } |
7912 | 7913 |
7913 } // namespace | 7914 } // namespace |
7914 } // namespace cc | 7915 } // namespace cc |
OLD | NEW |