| 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 2529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2540 | 2540 |
| 2541 virtual DrawResult PrepareToDrawOnThread( | 2541 virtual DrawResult PrepareToDrawOnThread( |
| 2542 LayerTreeHostImpl* host_impl, | 2542 LayerTreeHostImpl* host_impl, |
| 2543 LayerTreeHostImpl::FrameData* frame, | 2543 LayerTreeHostImpl::FrameData* frame, |
| 2544 DrawResult draw_result) OVERRIDE { | 2544 DrawResult draw_result) OVERRIDE { |
| 2545 Mock::VerifyAndClearExpectations(&mock_context_); | 2545 Mock::VerifyAndClearExpectations(&mock_context_); |
| 2546 ResourceProvider* resource_provider = host_impl->resource_provider(); | 2546 ResourceProvider* resource_provider = host_impl->resource_provider(); |
| 2547 EXPECT_EQ(1u, resource_provider->num_resources()); | 2547 EXPECT_EQ(1u, resource_provider->num_resources()); |
| 2548 CHECK_EQ(1u, frame->render_passes.size()); | 2548 CHECK_EQ(1u, frame->render_passes.size()); |
| 2549 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); | 2549 CHECK_LE(1u, frame->render_passes[0]->quad_list.size()); |
| 2550 const DrawQuad* quad = frame->render_passes[0]->quad_list[0]; | 2550 const DrawQuad* quad = frame->render_passes[0]->quad_list.front(); |
| 2551 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); | 2551 CHECK_EQ(DrawQuad::IO_SURFACE_CONTENT, quad->material); |
| 2552 const IOSurfaceDrawQuad* io_surface_draw_quad = | 2552 const IOSurfaceDrawQuad* io_surface_draw_quad = |
| 2553 IOSurfaceDrawQuad::MaterialCast(quad); | 2553 IOSurfaceDrawQuad::MaterialCast(quad); |
| 2554 EXPECT_SIZE_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); | 2554 EXPECT_SIZE_EQ(io_surface_size_, io_surface_draw_quad->io_surface_size); |
| 2555 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id); | 2555 EXPECT_NE(0u, io_surface_draw_quad->io_surface_resource_id); |
| 2556 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), | 2556 EXPECT_EQ(static_cast<GLenum>(GL_TEXTURE_RECTANGLE_ARB), |
| 2557 resource_provider->TargetForTesting( | 2557 resource_provider->TargetForTesting( |
| 2558 io_surface_draw_quad->io_surface_resource_id)); | 2558 io_surface_draw_quad->io_surface_resource_id)); |
| 2559 | 2559 |
| 2560 EXPECT_CALL(*mock_context_, bindTexture(GL_TEXTURE_RECTANGLE_ARB, 1)) | 2560 EXPECT_CALL(*mock_context_, bindTexture(GL_TEXTURE_RECTANGLE_ARB, 1)) |
| (...skipping 2472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5033 const gfx::Size bounds_; | 5033 const gfx::Size bounds_; |
| 5034 FakeContentLayerClient client_; | 5034 FakeContentLayerClient client_; |
| 5035 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; | 5035 scoped_refptr<ContentLayerWithUpdateTracking> content_layer_; |
| 5036 scoped_refptr<FakePictureLayer> picture_layer_; | 5036 scoped_refptr<FakePictureLayer> picture_layer_; |
| 5037 Layer* child_layer_; | 5037 Layer* child_layer_; |
| 5038 }; | 5038 }; |
| 5039 | 5039 |
| 5040 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); | 5040 MULTI_THREAD_TEST_F(LayerTreeHostTestContinuousPainting); |
| 5041 | 5041 |
| 5042 } // namespace cc | 5042 } // namespace cc |
| OLD | NEW |