| 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 settings->use_zero_copy = true; |
| 25 settings->use_one_copy = false; |
| 25 } | 26 } |
| 26 | 27 |
| 27 void BeginTest() override { | 28 void BeginTest() override { |
| 28 LayerTreePixelTest::BeginTest(); | 29 LayerTreePixelTest::BeginTest(); |
| 29 PostCompositeImmediatelyToMainThread(); | 30 PostCompositeImmediatelyToMainThread(); |
| 30 } | 31 } |
| 31 }; | 32 }; |
| 32 | 33 |
| 33 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) { | 34 TEST_F(LayerTreeHostSynchronousPixelTest, OneContentLayer) { |
| 34 gfx::Size bounds(200, 200); | 35 gfx::Size bounds(200, 200); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 root->SetIsDrawable(true); | 75 root->SetIsDrawable(true); |
| 75 | 76 |
| 76 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root, | 77 RunSingleThreadedPixelTest(PIXEL_TEST_GL, root, |
| 77 base::FilePath(FILE_PATH_LITERAL("green.png"))); | 78 base::FilePath(FILE_PATH_LITERAL("green.png"))); |
| 78 } | 79 } |
| 79 | 80 |
| 80 } // namespace | 81 } // namespace |
| 81 } // namespace cc | 82 } // namespace cc |
| 82 | 83 |
| 83 #endif // OS_ANDROID | 84 #endif // OS_ANDROID |
| OLD | NEW |