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

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

Issue 18432002: Blend TextureLayer background-color at draw time. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: separate shaders for textures with background Created 7 years, 5 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
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 <set> 7 #include <set>
8 8
9 #include "cc/base/math_util.h" 9 #include "cc/base/math_util.h"
10 #include "cc/output/compositor_frame_metadata.h" 10 #include "cc/output/compositor_frame_metadata.h"
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 renderer()->GetRenderPassColorMatrixProgram(precision)); 88 renderer()->GetRenderPassColorMatrixProgram(precision));
89 EXPECT_PROGRAM_VALID( 89 EXPECT_PROGRAM_VALID(
90 renderer()->GetRenderPassMaskColorMatrixProgramAA(precision)); 90 renderer()->GetRenderPassMaskColorMatrixProgramAA(precision));
91 EXPECT_PROGRAM_VALID( 91 EXPECT_PROGRAM_VALID(
92 renderer()->GetRenderPassColorMatrixProgramAA(precision)); 92 renderer()->GetRenderPassColorMatrixProgramAA(precision));
93 EXPECT_PROGRAM_VALID( 93 EXPECT_PROGRAM_VALID(
94 renderer()->GetRenderPassMaskColorMatrixProgram(precision)); 94 renderer()->GetRenderPassMaskColorMatrixProgram(precision));
95 EXPECT_PROGRAM_VALID(renderer()->GetTextureProgram(precision)); 95 EXPECT_PROGRAM_VALID(renderer()->GetTextureProgram(precision));
96 EXPECT_PROGRAM_VALID( 96 EXPECT_PROGRAM_VALID(
97 renderer()->GetNonPremultipliedTextureProgram(precision)); 97 renderer()->GetNonPremultipliedTextureProgram(precision));
98 EXPECT_PROGRAM_VALID(renderer()->GetTextureBackgroundProgram(precision));
99 EXPECT_PROGRAM_VALID(
100 renderer()->GetNonPremultipliedTextureBackgroundProgram(precision));
98 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision)); 101 EXPECT_PROGRAM_VALID(renderer()->GetTextureIOSurfaceProgram(precision));
99 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVProgram(precision)); 102 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVProgram(precision));
100 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVAProgram(precision)); 103 EXPECT_PROGRAM_VALID(renderer()->GetVideoYUVAProgram(precision));
101 // This is unlikely to be ever true in tests due to usage of osmesa. 104 // This is unlikely to be ever true in tests due to usage of osmesa.
102 if (renderer()->Capabilities().using_egl_image) 105 if (renderer()->Capabilities().using_egl_image)
103 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision)); 106 EXPECT_PROGRAM_VALID(renderer()->GetVideoStreamTextureProgram(precision));
104 else 107 else
105 EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision)); 108 EXPECT_FALSE(renderer()->GetVideoStreamTextureProgram(precision));
106 } 109 }
107 }; 110 };
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1551 base::MessageLoop::current()->Run(); 1554 base::MessageLoop::current()->Run();
1552 1555
1553 // The sync point should have happened. 1556 // The sync point should have happened.
1554 EXPECT_EQ(1, sync_point_callback_count); 1557 EXPECT_EQ(1, sync_point_callback_count);
1555 EXPECT_EQ(1, other_callback_count); 1558 EXPECT_EQ(1, other_callback_count);
1556 } 1559 }
1557 #endif // OS_ANDROID 1560 #endif // OS_ANDROID
1558 1561
1559 } // namespace 1562 } // namespace
1560 } // namespace cc 1563 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698