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

Unified Diff: cc/output/gl_renderer_unittest.cc

Issue 988693005: Chromium roll (https://codereview.chromium.org/976353002) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: fixed bad android build patch Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/output/gl_renderer_unittest.cc
diff --git a/cc/output/gl_renderer_unittest.cc b/cc/output/gl_renderer_unittest.cc
index fc70900837edb20eb94505348bc8b2224472f4f5..cec0882ddc733f21868a37f027a68a031ca978ed 100644
--- a/cc/output/gl_renderer_unittest.cc
+++ b/cc/output/gl_renderer_unittest.cc
@@ -149,14 +149,20 @@ class GLRendererShaderPixelTest : public GLRendererPixelTest {
renderer()->GetTileProgramSwizzleAA(precision, sampler));
for (int i = 0; i <= LAST_BLEND_MODE; ++i) {
BlendMode blend_mode = static_cast<BlendMode>(i);
- EXPECT_PROGRAM_VALID(
- renderer()->GetRenderPassMaskProgram(precision, sampler, blend_mode));
- EXPECT_PROGRAM_VALID(renderer()->GetRenderPassMaskProgramAA(
- precision, sampler, blend_mode));
- EXPECT_PROGRAM_VALID(renderer()->GetRenderPassMaskColorMatrixProgramAA(
- precision, sampler, blend_mode));
- EXPECT_PROGRAM_VALID(renderer()->GetRenderPassMaskColorMatrixProgram(
- precision, sampler, blend_mode));
+ for (int l = 0; l <= 1; ++l) {
+ bool mask_for_background = (l == 1);
+ EXPECT_PROGRAM_VALID(
+ renderer()->GetRenderPassMaskProgram(precision,
+ sampler,
+ blend_mode,
+ mask_for_background));
+ EXPECT_PROGRAM_VALID(renderer()->GetRenderPassMaskProgramAA(
+ precision, sampler, blend_mode, mask_for_background));
+ EXPECT_PROGRAM_VALID(renderer()->GetRenderPassMaskColorMatrixProgramAA(
+ precision, sampler, blend_mode, mask_for_background));
+ EXPECT_PROGRAM_VALID(renderer()->GetRenderPassMaskColorMatrixProgram(
+ precision, sampler, blend_mode, mask_for_background));
+ }
}
}
};
@@ -269,10 +275,15 @@ class GLRendererShaderTest : public GLRendererTest {
SamplerType sampler,
BlendMode blend_mode) {
EXPECT_PROGRAM_VALID(
- &renderer_->render_pass_mask_program_[precision][sampler][blend_mode]);
+ &renderer_->render_pass_mask_program_[precision]
+ [sampler]
+ [blend_mode]
+ [NO_MASK]);
EXPECT_EQ(
- renderer_->render_pass_mask_program_[precision][sampler][blend_mode]
- .program(),
+ renderer_->render_pass_mask_program_[precision]
+ [sampler]
+ [blend_mode]
+ [NO_MASK].program(),
renderer_->program_shadow_);
}
@@ -280,9 +291,9 @@ class GLRendererShaderTest : public GLRendererTest {
SamplerType sampler,
BlendMode blend_mode) {
EXPECT_PROGRAM_VALID(&renderer_->render_pass_mask_color_matrix_program_
- [precision][sampler][blend_mode]);
+ [precision][sampler][blend_mode][NO_MASK]);
EXPECT_EQ(renderer_->render_pass_mask_color_matrix_program_
- [precision][sampler][blend_mode].program(),
+ [precision][sampler][blend_mode][NO_MASK].program(),
renderer_->program_shadow_);
}
@@ -311,10 +322,11 @@ class GLRendererShaderTest : public GLRendererTest {
BlendMode blend_mode) {
EXPECT_PROGRAM_VALID(
&renderer_
- ->render_pass_mask_program_aa_[precision][sampler][blend_mode]);
+ ->render_pass_mask_program_aa_
+ [precision][sampler][blend_mode][NO_MASK]);
EXPECT_EQ(
renderer_->render_pass_mask_program_aa_[precision][sampler][blend_mode]
- .program(),
+ [NO_MASK].program(),
renderer_->program_shadow_);
}
@@ -322,9 +334,9 @@ class GLRendererShaderTest : public GLRendererTest {
SamplerType sampler,
BlendMode blend_mode) {
EXPECT_PROGRAM_VALID(&renderer_->render_pass_mask_color_matrix_program_aa_
- [precision][sampler][blend_mode]);
+ [precision][sampler][blend_mode][NO_MASK]);
EXPECT_EQ(renderer_->render_pass_mask_color_matrix_program_aa_
- [precision][sampler][blend_mode].program(),
+ [precision][sampler][blend_mode][NO_MASK].program(),
renderer_->program_shadow_);
}
« no previous file with comments | « cc/output/gl_renderer.cc ('k') | cc/output/overlay_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698