| 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/layer_tree_host_impl.h" | 5 #include "cc/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 3702 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3713 gfx::Size m_viewportSize; | 3713 gfx::Size m_viewportSize; |
| 3714 base::hash_set<RenderPass::Id> m_textures; | 3714 base::hash_set<RenderPass::Id> m_textures; |
| 3715 }; | 3715 }; |
| 3716 | 3716 |
| 3717 static void configureRenderPassTestData(const char* testScript, RenderPassRemova
lTestData& testData, TestRenderer* renderer) | 3717 static void configureRenderPassTestData(const char* testScript, RenderPassRemova
lTestData& testData, TestRenderer* renderer) |
| 3718 { | 3718 { |
| 3719 renderer->clearCachedTextures(); | 3719 renderer->clearCachedTextures(); |
| 3720 | 3720 |
| 3721 // One shared state for all quads - we don't need the correct details | 3721 // One shared state for all quads - we don't need the correct details |
| 3722 testData.sharedQuadState = SharedQuadState::Create(); | 3722 testData.sharedQuadState = SharedQuadState::Create(); |
| 3723 testData.sharedQuadState->SetAll(gfx::Transform(), gfx::Rect(), gfx::Rect(),
gfx::Rect(), false, 1.0); | 3723 testData.sharedQuadState->SetAll(gfx::Transform(), gfx::Rect(), gfx::Rect(),
false, 1.0); |
| 3724 | 3724 |
| 3725 const char* currentChar = testScript; | 3725 const char* currentChar = testScript; |
| 3726 | 3726 |
| 3727 // Pre-create root pass | 3727 // Pre-create root pass |
| 3728 RenderPass::Id rootRenderPassId = RenderPass::Id(testScript[0], testScript[1
]); | 3728 RenderPass::Id rootRenderPassId = RenderPass::Id(testScript[0], testScript[1
]); |
| 3729 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); | 3729 scoped_ptr<TestRenderPass> pass = TestRenderPass::Create(); |
| 3730 pass->SetNew(rootRenderPassId, gfx::Rect(), gfx::Rect(), gfx::Transform()); | 3730 pass->SetNew(rootRenderPassId, gfx::Rect(), gfx::Rect(), gfx::Transform()); |
| 3731 testData.renderPassCache.add(rootRenderPassId, pass.Pass()); | 3731 testData.renderPassCache.add(rootRenderPassId, pass.Pass()); |
| 3732 while (*currentChar) { | 3732 while (*currentChar) { |
| 3733 int layerId = *currentChar; | 3733 int layerId = *currentChar; |
| (...skipping 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4676 m_hostImpl->didDrawAllLayers(frame); | 4676 m_hostImpl->didDrawAllLayers(frame); |
| 4677 } | 4677 } |
| 4678 } | 4678 } |
| 4679 | 4679 |
| 4680 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, | 4680 INSTANTIATE_TEST_CASE_P(LayerTreeHostImplTests, |
| 4681 LayerTreeHostImplTest, | 4681 LayerTreeHostImplTest, |
| 4682 ::testing::Values(false, true)); | 4682 ::testing::Values(false, true)); |
| 4683 | 4683 |
| 4684 } // namespace | 4684 } // namespace |
| 4685 } // namespace cc | 4685 } // namespace cc |
| OLD | NEW |