Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: cc/output/gl_renderer_unittest.cc

Issue 13206004: cc: Fix build issues for adding ‘chromium_code’: 1 to cc.gyp and cc_tests.gyp (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 843 matching lines...) Expand 10 before | Expand all | Expand 10 after
854 // scaled_tile_quad also uses GL_LINEAR. 854 // scaled_tile_quad also uses GL_LINEAR.
855 EXPECT_CALL(*context, drawElements(_, _, _, _)); 855 EXPECT_CALL(*context, drawElements(_, _, _, _));
856 856
857 // The remaining quads also use GL_LINEAR because nearest neighbor 857 // The remaining quads also use GL_LINEAR because nearest neighbor
858 // filtering is currently only used with tile quads. 858 // filtering is currently only used with tile quads.
859 EXPECT_CALL(*context, drawElements(_, _, _, _)).Times(6); 859 EXPECT_CALL(*context, drawElements(_, _, _, _)).Times(6);
860 } 860 }
861 861
862 cc::DirectRenderer::DrawingFrame drawing_frame; 862 cc::DirectRenderer::DrawingFrame drawing_frame;
863 renderer.BeginDrawingFrame(&drawing_frame); 863 renderer.BeginDrawingFrame(&drawing_frame);
864 EXPECT_EQ(context->active_texture(), GL_TEXTURE0); 864 EXPECT_EQ(static_cast<unsigned>(GL_TEXTURE0), context->active_texture());
865 865
866 for (cc::QuadList::BackToFrontIterator 866 for (cc::QuadList::BackToFrontIterator
867 it = pass->quad_list.BackToFrontBegin(); 867 it = pass->quad_list.BackToFrontBegin();
868 it != pass->quad_list.BackToFrontEnd(); 868 it != pass->quad_list.BackToFrontEnd();
869 ++it) { 869 ++it) {
870 renderer.DoDrawQuad(&drawing_frame, *it); 870 renderer.DoDrawQuad(&drawing_frame, *it);
871 } 871 }
872 renderer.FinishDrawingQuadList(); 872 renderer.FinishDrawingQuadList();
873 EXPECT_EQ(context->active_texture(), GL_TEXTURE0); 873 EXPECT_EQ(static_cast<unsigned>(GL_TEXTURE0), context->active_texture());
874 Mock::VerifyAndClearExpectations(context); 874 Mock::VerifyAndClearExpectations(context);
875 } 875 }
876 876
877 class NoClearRootRenderPassFakeClient : public FakeRendererClient { 877 class NoClearRootRenderPassFakeClient : public FakeRendererClient {
878 public: 878 public:
879 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return false; } 879 virtual bool ShouldClearRootRenderPass() const OVERRIDE { return false; }
880 }; 880 };
881 881
882 class NoClearRootRenderPassMockContext : public TestWebGraphicsContext3D { 882 class NoClearRootRenderPassMockContext : public TestWebGraphicsContext3D {
883 public: 883 public:
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 } 1355 }
1356 }; 1356 };
1357 1357
1358 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) { 1358 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) {
1359 EXPECT_CALL(output_surface_, SendFrameToParentCompositor(_)).Times(1); 1359 EXPECT_CALL(output_surface_, SendFrameToParentCompositor(_)).Times(1);
1360 DrawFrame(); 1360 DrawFrame();
1361 } 1361 }
1362 1362
1363 } // namespace 1363 } // namespace
1364 } // namespace cc 1364 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/output_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698