Chromium Code Reviews| Index: cc/trees/layer_tree_host_unittest.cc |
| diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc |
| index e75b3e9a2ba4a0324fee2176942bc83c2080f5a7..afe7b99021fa66d78050dfe7cc3076c2665754a1 100644 |
| --- a/cc/trees/layer_tree_host_unittest.cc |
| +++ b/cc/trees/layer_tree_host_unittest.cc |
| @@ -35,6 +35,7 @@ |
| #include "cc/test/fake_display_list_recording_source.h" |
| #include "cc/test/fake_layer_tree_host_client.h" |
| #include "cc/test/fake_output_surface.h" |
| +#include "cc/test/fake_output_surface_client.h" |
|
danakj
2015/10/24 00:08:07
not needed?
oshima
2015/10/27 20:28:09
Done.
|
| #include "cc/test/fake_painted_scrollbar_layer.h" |
| #include "cc/test/fake_picture_layer.h" |
| #include "cc/test/fake_picture_layer_impl.h" |
| @@ -6378,5 +6379,28 @@ class LayerTreeHostTestDestroyWhileInitializingOutputSurface |
| MULTI_THREAD_TEST_F(LayerTreeHostTestDestroyWhileInitializingOutputSurface); |
| +// Makes sure that painted_device_scale_factor is propagated to the |
| +// frame's metadata. |
| +class LayerTreeHostTestPaintedDeviceScaleFactor : public LayerTreeHostTest { |
| + protected: |
| + void BeginTest() override { |
| + layer_tree_host()->SetPaintedDeviceScaleFactor(2.0f); |
| + EXPECT_EQ(1.0f, layer_tree_host()->device_scale_factor()); |
| + PostSetNeedsCommitToMainThread(); |
| + } |
| + |
| + void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override { |
| + EXPECT_EQ(2.0f, |
|
danakj
2015/10/24 00:07:00
Great, thanks. The cc parts LGTM
|
| + output_surface()->last_sent_frame().metadata.device_scale_factor); |
| + EXPECT_EQ(2.0f, host_impl->active_tree()->painted_device_scale_factor()); |
| + EXPECT_EQ(1.0f, host_impl->active_tree()->device_scale_factor()); |
| + EndTest(); |
| + } |
| + |
| + void AfterTest() override {} |
| +}; |
| + |
| +MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
|
danakj
2015/10/24 00:08:07
Why is it MULTI only and not SINGLE_AND_MULTI?
oshima
2015/10/27 20:28:09
Done.
|
| + |
| } // namespace |
| } // namespace cc |