| 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 <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 5548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5559 | 5559 |
| 5560 EXPECT_EQ(0, software_device->frames_began_); | 5560 EXPECT_EQ(0, software_device->frames_began_); |
| 5561 EXPECT_EQ(0, software_device->frames_ended_); | 5561 EXPECT_EQ(0, software_device->frames_ended_); |
| 5562 | 5562 |
| 5563 DrawFrame(); | 5563 DrawFrame(); |
| 5564 | 5564 |
| 5565 EXPECT_EQ(1, software_device->frames_began_); | 5565 EXPECT_EQ(1, software_device->frames_began_); |
| 5566 EXPECT_EQ(1, software_device->frames_ended_); | 5566 EXPECT_EQ(1, software_device->frames_ended_); |
| 5567 | 5567 |
| 5568 // Call other API methods that are likely to hit NULL pointer in this mode. | 5568 // Call other API methods that are likely to hit NULL pointer in this mode. |
| 5569 EXPECT_TRUE(host_impl_->AsValue()); | 5569 EXPECT_TRUE(host_impl_->AsValue().get()); |
| 5570 EXPECT_TRUE(host_impl_->ActivationStateAsValue()); | 5570 EXPECT_TRUE(host_impl_->ActivationStateAsValue().get()); |
| 5571 } | 5571 } |
| 5572 | 5572 |
| 5573 TEST_F(LayerTreeHostImplTest, | 5573 TEST_F(LayerTreeHostImplTest, |
| 5574 ForcedDrawToSoftwareDeviceSkipsUnsupportedLayers) { | 5574 ForcedDrawToSoftwareDeviceSkipsUnsupportedLayers) { |
| 5575 set_reduce_memory_result(false); | 5575 set_reduce_memory_result(false); |
| 5576 bool delegated_rendering = false; | 5576 bool delegated_rendering = false; |
| 5577 FakeOutputSurface* output_surface = | 5577 FakeOutputSurface* output_surface = |
| 5578 FakeOutputSurface::CreateDeferredGL( | 5578 FakeOutputSurface::CreateDeferredGL( |
| 5579 scoped_ptr<SoftwareOutputDevice>(new CountingSoftwareDevice()), | 5579 scoped_ptr<SoftwareOutputDevice>(new CountingSoftwareDevice()), |
| 5580 delegated_rendering).release(); | 5580 delegated_rendering).release(); |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6988 host_impl_->DidLoseOutputSurface(); | 6988 host_impl_->DidLoseOutputSurface(); |
| 6989 EXPECT_TRUE(host_impl_->IsContextLost()); | 6989 EXPECT_TRUE(host_impl_->IsContextLost()); |
| 6990 EXPECT_EQ(1, num_lost_surfaces_); | 6990 EXPECT_EQ(1, num_lost_surfaces_); |
| 6991 host_impl_->DidLoseOutputSurface(); | 6991 host_impl_->DidLoseOutputSurface(); |
| 6992 EXPECT_TRUE(host_impl_->IsContextLost()); | 6992 EXPECT_TRUE(host_impl_->IsContextLost()); |
| 6993 EXPECT_EQ(1, num_lost_surfaces_); | 6993 EXPECT_EQ(1, num_lost_surfaces_); |
| 6994 } | 6994 } |
| 6995 | 6995 |
| 6996 } // namespace | 6996 } // namespace |
| 6997 } // namespace cc | 6997 } // namespace cc |
| OLD | NEW |