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/synchronization/lock.h" | 10 #include "base/synchronization/lock.h" |
(...skipping 2527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2538 | 2538 |
2539 virtual DrawResult PrepareToDrawOnThread( | 2539 virtual DrawResult PrepareToDrawOnThread( |
2540 LayerTreeHostImpl* host_impl, | 2540 LayerTreeHostImpl* host_impl, |
2541 LayerTreeHostImpl::FrameData* frame, | 2541 LayerTreeHostImpl::FrameData* frame, |
2542 DrawResult draw_result) OVERRIDE { | 2542 DrawResult draw_result) OVERRIDE { |
2543 Mock::VerifyAndClearExpectations(&mock_context_); | 2543 Mock::VerifyAndClearExpectations(&mock_context_); |
2544 ResourceProvider* resource_provider = host_impl->resource_provider(); | 2544 ResourceProvider* resource_provider = host_impl->resource_provider(); |
2545 EXPECT_EQ(1u, resource_provider->num_resources()); | 2545 EXPECT_EQ(1u, resource_provider->num_resources()); |
2546 CHECK_EQ(1u, frame->render_passes.size()); | 2546 CHECK_EQ(1u, frame->render_passes.size()); |
2547 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); | 2547 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); |
2548 const DrawQuad* quad = frame->render_passes[0]->quad_list[0]; | 2548 const DrawQuad* quad = frame->render_passes[0]->quad_list.front(); |
2549 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); | 2549 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); |
2550 const IOSurfaceDrawQuad* io_surface_draw_quad = | 2550 const IOSurfaceDrawQuad* io_surface_draw_quad = |
2551 IOSurfaceDrawQuad::MaterialCast(quad); | 2551 IOSurfaceDrawQuad::MaterialCast(quad); |
2552 EXPECT_SIZE_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); | 2552 EXPECT_SIZE_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); |
2553 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id); | 2553 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id); |
2554 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), | 2554 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), |
2555 resource_provider->TargetForTesting( | 2555 resource_provider->TargetForTesting( |
2556 io_surface_draw_quad->io_surface_resource_id)); | 2556 io_surface_draw_quad->io_surface_resource_id)); |
2557 | 2557 |
2558 EXPECT_CALL(*mock_context_, bindTexture(GL_TEXTURE_RECTANGLE_ARB, 1)) | 2558 EXPECT_CALL(*mock_context_, bindTexture(GL_TEXTURE_RECTANGLE_ARB, 1)) |
(...skipping 2458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5017 const gfx::Size bounds_; | 5017 const gfx::Size bounds_; |
5018 FakeContentLayerClient client_; | 5018 FakeContentLayerClient client_; |
5019 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; | 5019 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; |
5020 scoped_refptr<FakePictureLayer> picture_layer_; | 5020 scoped_refptr<FakePictureLayer> picture_layer_; |
5021 Layer* child_layer_; | 5021 Layer* child_layer_; |
5022 }; | 5022 }; |
5023 | 5023 |
5024 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); | 5024 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); |
5025 | 5025 |
5026 } // namespace cc | 5026 } // namespace cc |
OLD | NEW |