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

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

Issue 12665005: cc: Use highp precision for texture coords if available and needed (Closed) Base URL: http://git.chromium.org/chromium/src.git@highp2
Patch Set: Be conservative on Android Created 7 years, 9 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
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/quads/draw_quad.h" 8 #include "cc/quads/draw_quad.h"
9 #include "cc/resources/prioritized_resource_manager.h" 9 #include "cc/resources/prioritized_resource_manager.h"
10 #include "cc/resources/resource_provider.h" 10 #include "cc/resources/resource_provider.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 public: 44 public:
45 void TestShaders() { 45 void TestShaders() {
46 ASSERT_FALSE(renderer_->IsContextLost()); 46 ASSERT_FALSE(renderer_->IsContextLost());
47 EXPECT_PROGRAM_VALID(renderer_->GetTileProgram()); 47 EXPECT_PROGRAM_VALID(renderer_->GetTileProgram());
48 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramOpaque()); 48 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramOpaque());
49 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramAA()); 49 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramAA());
50 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramSwizzle()); 50 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramSwizzle());
51 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramSwizzleOpaque()); 51 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramSwizzleOpaque());
52 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramSwizzleAA()); 52 EXPECT_PROGRAM_VALID(renderer_->GetTileProgramSwizzleAA());
53 EXPECT_PROGRAM_VALID(renderer_->GetTileCheckerboardProgram()); 53 EXPECT_PROGRAM_VALID(renderer_->GetTileCheckerboardProgram());
54 EXPECT_PROGRAM_VALID(renderer_->GetRenderPassProgram()); 54 EXPECT_PROGRAM_VALID(
55 EXPECT_PROGRAM_VALID(renderer_->GetRenderPassProgramAA()); 55 renderer_->GetRenderPassProgram(TexCoordPrecisionMedium));
56 EXPECT_PROGRAM_VALID(renderer_->GetRenderPassMaskProgram()); 56 EXPECT_PROGRAM_VALID(
57 EXPECT_PROGRAM_VALID(renderer_->GetRenderPassMaskProgramAA()); 57 renderer_->GetRenderPassProgramAA(TexCoordPrecisionMedium));
58 EXPECT_PROGRAM_VALID(renderer_->GetTextureProgram()); 58 EXPECT_PROGRAM_VALID(
59 EXPECT_PROGRAM_VALID(renderer_->GetTextureProgramFlip()); 59 renderer_->GetRenderPassMaskProgram(TexCoordPrecisionMedium));
60 EXPECT_PROGRAM_VALID(renderer_->GetTextureIOSurfaceProgram()); 60 EXPECT_PROGRAM_VALID(
61 EXPECT_PROGRAM_VALID(renderer_->GetVideoYUVProgram()); 61 renderer_->GetRenderPassMaskProgramAA(TexCoordPrecisionMedium));
62 EXPECT_PROGRAM_VALID(
63 renderer_->GetTextureProgram(TexCoordPrecisionMedium));
64 EXPECT_PROGRAM_VALID(
65 renderer_->GetTextureProgramFlip(TexCoordPrecisionMedium));
66 EXPECT_PROGRAM_VALID(
67 renderer_->GetTextureIOSurfaceProgram(TexCoordPrecisionMedium));
68 EXPECT_PROGRAM_VALID(
69 renderer_->GetVideoYUVProgram(TexCoordPrecisionMedium));
62 // This is unlikely to be ever true in tests due to usage of osmesa. 70 // This is unlikely to be ever true in tests due to usage of osmesa.
63 if (renderer_->Capabilities().using_egl_image) 71 if (renderer_->Capabilities().using_egl_image)
64 EXPECT_PROGRAM_VALID(renderer_->GetVideoStreamTextureProgram()); 72 EXPECT_PROGRAM_VALID(
73 renderer_->GetVideoStreamTextureProgram(TexCoordPrecisionMedium));
65 else 74 else
66 EXPECT_FALSE(renderer_->GetVideoStreamTextureProgram()); 75 EXPECT_FALSE(
76 renderer_->GetVideoStreamTextureProgram(TexCoordPrecisionMedium));
67 EXPECT_PROGRAM_VALID(renderer_->GetDebugBorderProgram()); 77 EXPECT_PROGRAM_VALID(renderer_->GetDebugBorderProgram());
68 EXPECT_PROGRAM_VALID(renderer_->GetSolidColorProgram()); 78 EXPECT_PROGRAM_VALID(renderer_->GetSolidColorProgram());
69 EXPECT_PROGRAM_VALID(renderer_->GetSolidColorProgramAA()); 79 EXPECT_PROGRAM_VALID(renderer_->GetSolidColorProgramAA());
70 ASSERT_FALSE(renderer_->IsContextLost()); 80 ASSERT_FALSE(renderer_->IsContextLost());
71 } 81 }
72 }; 82 };
73 83
74 namespace { 84 namespace {
75 85
76 #if !defined(OS_ANDROID) 86 #if !defined(OS_ANDROID)
(...skipping 792 matching lines...) Expand 10 before | Expand all | Expand 10 after
869 879
870 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame) 880 TEST_F(MockOutputSurfaceTestWithSendCompositorFrame, DrawFrame)
871 { 881 {
872 EXPECT_CALL(m_outputSurface, SendFrameToParentCompositor(_)) 882 EXPECT_CALL(m_outputSurface, SendFrameToParentCompositor(_))
873 .Times(1); 883 .Times(1);
874 DrawFrame(); 884 DrawFrame();
875 } 885 }
876 886
877 } // namespace 887 } // namespace
878 } // namespace cc 888 } // namespace cc
OLDNEW
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/program_binding.h » ('j') | cc/output/shader.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698