| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> | 5 #include <stddef.h> |
| 6 | 6 |
| 7 #include "cc/layers/layer_iterator.h" | 7 #include "cc/layers/layer_iterator.h" |
| 8 #include "cc/output/copy_output_request.h" | 8 #include "cc/output/copy_output_request.h" |
| 9 #include "cc/output/copy_output_result.h" | 9 #include "cc/output/copy_output_result.h" |
| 10 #include "cc/test/fake_content_layer_client.h" | 10 #include "cc/test/fake_content_layer_client.h" |
| (...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 FakeContentLayerClient client_; | 141 FakeContentLayerClient client_; |
| 142 scoped_refptr<FakePictureLayer> root; | 142 scoped_refptr<FakePictureLayer> root; |
| 143 scoped_refptr<FakePictureLayer> child; | 143 scoped_refptr<FakePictureLayer> child; |
| 144 scoped_refptr<FakePictureLayer> grand_child; | 144 scoped_refptr<FakePictureLayer> grand_child; |
| 145 }; | 145 }; |
| 146 | 146 |
| 147 // Readback can't be done with a delegating renderer. | 147 // Readback can't be done with a delegating renderer. |
| 148 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, | 148 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, |
| 149 GLRenderer_RunSingleThread) { | 149 GLRenderer_RunSingleThread) { |
| 150 use_gl_renderer_ = true; | 150 use_gl_renderer_ = true; |
| 151 RunTest(CompositorMode::SingleThreaded, false); | 151 RunTest(CompositorMode::SINGLE_THREADED, false); |
| 152 } | 152 } |
| 153 | 153 |
| 154 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, | 154 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, |
| 155 GLRenderer_RunMultiThread) { | 155 GLRenderer_RunMultiThread) { |
| 156 use_gl_renderer_ = true; | 156 use_gl_renderer_ = true; |
| 157 RunTest(CompositorMode::Threaded, false); | 157 RunTest(CompositorMode::THREADED, false); |
| 158 } | 158 } |
| 159 | 159 |
| 160 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, | 160 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, |
| 161 GLRenderer_RunSingleThread_OutOfOrderCallbacks) { | 161 GLRenderer_RunSingleThread_OutOfOrderCallbacks) { |
| 162 use_gl_renderer_ = true; | 162 use_gl_renderer_ = true; |
| 163 out_of_order_callbacks_ = true; | 163 out_of_order_callbacks_ = true; |
| 164 RunTest(CompositorMode::SingleThreaded, false); | 164 RunTest(CompositorMode::SINGLE_THREADED, false); |
| 165 } | 165 } |
| 166 | 166 |
| 167 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, | 167 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, |
| 168 GLRenderer_RunMultiThread_OutOfOrderCallbacks) { | 168 GLRenderer_RunMultiThread_OutOfOrderCallbacks) { |
| 169 use_gl_renderer_ = true; | 169 use_gl_renderer_ = true; |
| 170 out_of_order_callbacks_ = true; | 170 out_of_order_callbacks_ = true; |
| 171 RunTest(CompositorMode::Threaded, false); | 171 RunTest(CompositorMode::THREADED, false); |
| 172 } | 172 } |
| 173 | 173 |
| 174 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, | 174 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, |
| 175 SoftwareRenderer_RunSingleThread) { | 175 SoftwareRenderer_RunSingleThread) { |
| 176 use_gl_renderer_ = false; | 176 use_gl_renderer_ = false; |
| 177 RunTest(CompositorMode::SingleThreaded, false); | 177 RunTest(CompositorMode::SINGLE_THREADED, false); |
| 178 } | 178 } |
| 179 | 179 |
| 180 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, | 180 TEST_F(LayerTreeHostCopyRequestTestMultipleRequests, |
| 181 SoftwareRenderer_RunMultiThread) { | 181 SoftwareRenderer_RunMultiThread) { |
| 182 use_gl_renderer_ = false; | 182 use_gl_renderer_ = false; |
| 183 RunTest(CompositorMode::Threaded, false); | 183 RunTest(CompositorMode::THREADED, false); |
| 184 } | 184 } |
| 185 | 185 |
| 186 // TODO(crbug.com/564832): Remove this test when the workaround it tests is no | 186 // TODO(crbug.com/564832): Remove this test when the workaround it tests is no |
| 187 // longer needed. | 187 // longer needed. |
| 188 class LayerTreeHostCopyRequestCompletionCausesCommit | 188 class LayerTreeHostCopyRequestCompletionCausesCommit |
| 189 : public LayerTreeHostCopyRequestTest { | 189 : public LayerTreeHostCopyRequestTest { |
| 190 protected: | 190 protected: |
| 191 void SetupTree() override { | 191 void SetupTree() override { |
| 192 root_ = FakePictureLayer::Create(layer_settings(), &client_); | 192 root_ = FakePictureLayer::Create(layer_settings(), &client_); |
| 193 root_->SetBounds(gfx::Size(20, 20)); | 193 root_->SetBounds(gfx::Size(20, 20)); |
| (...skipping 1070 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1264 int num_draws_; | 1264 int num_draws_; |
| 1265 bool copy_happened_; | 1265 bool copy_happened_; |
| 1266 bool draw_happened_; | 1266 bool draw_happened_; |
| 1267 }; | 1267 }; |
| 1268 | 1268 |
| 1269 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( | 1269 SINGLE_AND_MULTI_THREAD_DIRECT_RENDERER_TEST_F( |
| 1270 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); | 1270 LayerTreeHostCopyRequestTestMultipleDrawsHiddenCopyRequest); |
| 1271 | 1271 |
| 1272 } // namespace | 1272 } // namespace |
| 1273 } // namespace cc | 1273 } // namespace cc |
| OLD | NEW |