OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 #include "cc/layers/content_layer_client.h" | 6 #include "cc/layers/content_layer_client.h" |
7 #include "cc/layers/picture_image_layer.h" | 7 #include "cc/layers/picture_image_layer.h" |
8 #include "cc/layers/picture_layer.h" | 8 #include "cc/layers/picture_layer.h" |
9 #include "cc/layers/solid_color_layer.h" | 9 #include "cc/layers/solid_color_layer.h" |
10 #include "cc/test/fake_content_layer_client.h" | 10 #include "cc/test/fake_content_layer_client.h" |
11 #include "cc/test/layer_tree_pixel_test.h" | 11 #include "cc/test/layer_tree_pixel_test.h" |
12 #include "cc/test/pixel_comparator.h" | 12 #include "cc/test/pixel_comparator.h" |
13 | 13 |
14 #if !defined(OS_ANDROID) | 14 #if !defined(OS_ANDROID) |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 namespace { | 17 namespace { |
18 | 18 |
19 class LayerTreeHostSynchronousPixelTest : public LayerTreePixelTest { | 19 class LayerTreeHostSynchronousPixelTest : public LayerTreePixelTest { |
20 public: | 20 public: |
21 void InitializeSettings(LayerTreeSettings* settings) override { | 21 void InitializeSettings(LayerTreeSettings* settings) override { |
22 LayerTreePixelTest::InitializeSettings(settings); | 22 LayerTreePixelTest::InitializeSettings(settings); |
23 settings->single_thread_proxy_scheduler = false; | 23 settings->single_thread_proxy_scheduler = false; |
| 24 settings->use_zero_copy = true; |
24 } | 25 } |
25 | 26 |
26 void BeginTest() override { | 27 void BeginTest() override { |
27 LayerTreePixelTest::BeginTest(); | 28 LayerTreePixelTest::BeginTest(); |
28 PostCompositeImmediatelyToMainThread(); | 29 PostCompositeImmediatelyToMainThread(); |
29 } | 30 } |
30 }; | 31 }; |
31 | 32 |
32 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) { | 33 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) { |
33 gfx::Size bounds(200, 200); | 34 gfx::Size bounds(200, 200); |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 root->SetIsDrawable(true); | 72 root->SetIsDrawable(true); |
72 | 73 |
73 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root, | 74 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root, |
74 base::FilePath(FILE_PATH_LITERAL("green.png"))); | 75 base::FilePath(FILE_PATH_LITERAL("green.png"))); |
75 } | 76 } |
76 | 77 |
77 } // namespace | 78 } // namespace |
78 } // namespace cc | 79 } // namespace cc |
79 | 80 |
80 #endif // OS_ANDROID | 81 #endif // OS_ANDROID |
OLD | NEW |