| 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 5080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5091 TileDrawQuad* test_blending_draw_quad = | 5091 TileDrawQuad* test_blending_draw_quad = |
| 5092 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); | 5092 render_pass->CreateAndAppendDrawQuad<TileDrawQuad>(); |
| 5093 test_blending_draw_quad->SetNew(shared_quad_state, | 5093 test_blending_draw_quad->SetNew(shared_quad_state, |
| 5094 quad_rect_, | 5094 quad_rect_, |
| 5095 opaque_rect, | 5095 opaque_rect, |
| 5096 visible_quad_rect, | 5096 visible_quad_rect, |
| 5097 resource_id_, | 5097 resource_id_, |
| 5098 gfx::RectF(0.f, 0.f, 1.f, 1.f), | 5098 gfx::RectF(0.f, 0.f, 1.f, 1.f), |
| 5099 gfx::Size(1, 1), | 5099 gfx::Size(1, 1), |
| 5100 false, | 5100 false, |
| 5101 false, |
| 5101 false); | 5102 false); |
| 5102 test_blending_draw_quad->visible_rect = quad_visible_rect_; | 5103 test_blending_draw_quad->visible_rect = quad_visible_rect_; |
| 5103 EXPECT_EQ(blend_, test_blending_draw_quad->ShouldDrawWithBlending()); | 5104 EXPECT_EQ(blend_, test_blending_draw_quad->ShouldDrawWithBlending()); |
| 5104 EXPECT_EQ(has_render_surface_, !!render_surface()); | 5105 EXPECT_EQ(has_render_surface_, !!render_surface()); |
| 5105 } | 5106 } |
| 5106 | 5107 |
| 5107 void SetExpectation(bool blend, bool has_render_surface) { | 5108 void SetExpectation(bool blend, bool has_render_surface) { |
| 5108 blend_ = blend; | 5109 blend_ = blend; |
| 5109 has_render_surface_ = has_render_surface; | 5110 has_render_surface_ = has_render_surface; |
| 5110 quads_appended_ = false; | 5111 quads_appended_ = false; |
| (...skipping 3461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8572 // Hold an unowned pointer to the output surface to use for mock expectations. | 8573 // Hold an unowned pointer to the output surface to use for mock expectations. |
| 8573 MockReclaimResourcesOutputSurface* mock_output_surface = output_surface.get(); | 8574 MockReclaimResourcesOutputSurface* mock_output_surface = output_surface.get(); |
| 8574 | 8575 |
| 8575 CreateHostImpl(DefaultSettings(), output_surface.Pass()); | 8576 CreateHostImpl(DefaultSettings(), output_surface.Pass()); |
| 8576 EXPECT_CALL(*mock_output_surface, ForceReclaimResources()).Times(1); | 8577 EXPECT_CALL(*mock_output_surface, ForceReclaimResources()).Times(1); |
| 8577 host_impl_->BeginCommit(); | 8578 host_impl_->BeginCommit(); |
| 8578 } | 8579 } |
| 8579 | 8580 |
| 8580 } // namespace | 8581 } // namespace |
| 8581 } // namespace cc | 8582 } // namespace cc |
| OLD | NEW |