| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/output/gl_renderer.h" | 5 #include "cc/output/gl_renderer.h" |
| 6 | 6 |
| 7 #include "cc/output/compositor_frame_metadata.h" | 7 #include "cc/output/compositor_frame_metadata.h" |
| 8 #include "cc/resources/prioritized_resource_manager.h" | 8 #include "cc/resources/prioritized_resource_manager.h" |
| 9 #include "cc/resources/resource_provider.h" | 9 #include "cc/resources/resource_provider.h" |
| 10 #include "cc/test/fake_impl_proxy.h" | 10 #include "cc/test/fake_impl_proxy.h" |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 842 // scaled_tile_quad also uses GL_LINEAR. | 842 // scaled_tile_quad also uses GL_LINEAR. |
| 843 EXPECT_CALL(*context, drawElements(_, _, _, _)); | 843 EXPECT_CALL(*context, drawElements(_, _, _, _)); |
| 844 | 844 |
| 845 // The remaining quads also use GL_LINEAR because nearest neighbor | 845 // The remaining quads also use GL_LINEAR because nearest neighbor |
| 846 // filtering is currently only used with tile quads. | 846 // filtering is currently only used with tile quads. |
| 847 EXPECT_CALL(*context, drawElements(_, _, _, _)).Times(6); | 847 EXPECT_CALL(*context, drawElements(_, _, _, _)).Times(6); |
| 848 } | 848 } |
| 849 | 849 |
| 850 cc::DirectRenderer::DrawingFrame drawing_frame; | 850 cc::DirectRenderer::DrawingFrame drawing_frame; |
| 851 renderer.BeginDrawingFrame(&drawing_frame); | 851 renderer.BeginDrawingFrame(&drawing_frame); |
| 852 EXPECT_EQ(context->active_texture(), GL_TEXTURE0); | 852 EXPECT_EQ(static_cast<unsigned>(GL_TEXTURE0), context->active_texture()); |
| 853 | 853 |
| 854 for (cc::QuadList::BackToFrontIterator | 854 for (cc::QuadList::BackToFrontIterator |
| 855 it = pass->quad_list.BackToFrontBegin(); | 855 it = pass->quad_list.BackToFrontBegin(); |
| 856 it != pass->quad_list.BackToFrontEnd(); | 856 it != pass->quad_list.BackToFrontEnd(); |
| 857 ++it) { | 857 ++it) { |
| 858 renderer.DoDrawQuad(&drawing_frame, *it); | 858 renderer.DoDrawQuad(&drawing_frame, *it); |
| 859 } | 859 } |
| 860 renderer.FinishDrawingQuadList(); | 860 renderer.FinishDrawingQuadList(); |
| 861 EXPECT_EQ(context->active_texture(), GL_TEXTURE0); | 861 EXPECT_EQ(static_cast<unsigned>(GL_TEXTURE0), context->active_texture()); |
| 862 Mock::VerifyAndClearExpectations(context); | 862 Mock::VerifyAndClearExpectations(context); |
| 863 } | 863 } |
| 864 | 864 |
| 865 class NoClearRootRenderPassFakeClient : public FakeRendererClient { | 865 class NoClearRootRenderPassFakeClient : public FakeRendererClient { |
| 866 public: | 866 public: |
| 867 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return false; } | 867 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return false; } |
| 868 }; | 868 }; |
| 869 | 869 |
| 870 class NoClearRootRenderPassMockContext : public TestWebGraphicsContext3D { | 870 class NoClearRootRenderPassMockContext : public TestWebGraphicsContext3D { |
| 871 public: | 871 public: |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1343 } | 1343 } |
| 1344 }; | 1344 }; |
| 1345 | 1345 |
| 1346 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) { | 1346 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) { |
| 1347 EXPECT_CALL(output_surface_, SendFrameToParentCompositor(_)).Times(1); | 1347 EXPECT_CALL(output_surface_, SendFrameToParentCompositor(_)).Times(1); |
| 1348 DrawFrame(); | 1348 DrawFrame(); |
| 1349 } | 1349 } |
| 1350 | 1350 |
| 1351 } // namespace | 1351 } // namespace |
| 1352 } // namespace cc | 1352 } // namespace cc |
| OLD | NEW |