| 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.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 2301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2312 EXPECT_EQ(1u, resource_provider->num_resources()); | 2312 EXPECT_EQ(1u, resource_provider->num_resources()); |
| 2313 CHECK_EQ(1u, frame->render_passes.size()); | 2313 CHECK_EQ(1u, frame->render_passes.size()); |
| 2314 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); | 2314 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); |
| 2315 const DrawQuad* quad = frame->render_passes[0]->quad_list.front(); | 2315 const DrawQuad* quad = frame->render_passes[0]->quad_list.front(); |
| 2316 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); | 2316 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); |
| 2317 const IOSurfaceDrawQuad* io_surface_draw_quad = | 2317 const IOSurfaceDrawQuad* io_surface_draw_quad = |
| 2318 IOSurfaceDrawQuad::MaterialCast(quad); | 2318 IOSurfaceDrawQuad::MaterialCast(quad); |
| 2319 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); | 2319 EXPECT_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); |
| 2320 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id()); | 2320 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id()); |
| 2321 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), | 2321 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), |
| 2322 resource_provider->TargetForTesting( | 2322 resource_provider->GetResourceTextureTarget( |
| 2323 io_surface_draw_quad->io_surface_resource_id())); | 2323 io_surface_draw_quad->io_surface_resource_id())); |
| 2324 | 2324 |
| 2325 if (delegating_renderer()) { | 2325 if (delegating_renderer()) { |
| 2326 // The io surface layer's resource should be sent to the parent. | 2326 // The io surface layer's resource should be sent to the parent. |
| 2327 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM( | 2327 EXPECT_CALL(*mock_context_, produceTextureDirectCHROMIUM( |
| 2328 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1); | 2328 _, GL_TEXTURE_RECTANGLE_ARB, _)).Times(1); |
| 2329 } else { | 2329 } else { |
| 2330 // The io surface layer's texture is drawn. | 2330 // The io surface layer's texture is drawn. |
| 2331 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1)); | 2331 EXPECT_CALL(*mock_context_, activeTexture(GL_TEXTURE0)).Times(AtLeast(1)); |
| 2332 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _)) | 2332 EXPECT_CALL(*mock_context_, drawElements(GL_TRIANGLES, 6, _, _)) |
| (...skipping 4068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6401 EndTest(); | 6401 EndTest(); |
| 6402 } | 6402 } |
| 6403 | 6403 |
| 6404 void AfterTest() override {} | 6404 void AfterTest() override {} |
| 6405 }; | 6405 }; |
| 6406 | 6406 |
| 6407 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6407 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
| 6408 | 6408 |
| 6409 } // namespace | 6409 } // namespace |
| 6410 } // namespace cc | 6410 } // namespace cc |
| OLD | NEW |