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

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

Issue 2645953007: cc: Add analytic color conversion to shaders (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « no previous file | cc/output/program_binding.h » ('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 <stdint.h> 7 #include <stdint.h>
8 8
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 ProgramKey::Tile(precision, sampler, USE_AA, DO_SWIZZLE, false))); 182 ProgramKey::Tile(precision, sampler, USE_AA, DO_SWIZZLE, false)));
183 EXPECT_PROGRAM_VALID(renderer()->GetProgram( 183 EXPECT_PROGRAM_VALID(renderer()->GetProgram(
184 ProgramKey::Tile(precision, sampler, NO_AA, NO_SWIZZLE, true))); 184 ProgramKey::Tile(precision, sampler, NO_AA, NO_SWIZZLE, true)));
185 EXPECT_PROGRAM_VALID(renderer()->GetProgram( 185 EXPECT_PROGRAM_VALID(renderer()->GetProgram(
186 ProgramKey::Tile(precision, sampler, NO_AA, DO_SWIZZLE, true))); 186 ProgramKey::Tile(precision, sampler, NO_AA, DO_SWIZZLE, true)));
187 187
188 // Iterate over alpha plane, nv12, and color_lut parameters. 188 // Iterate over alpha plane, nv12, and color_lut parameters.
189 UVTextureMode uv_modes[2] = {UV_TEXTURE_MODE_UV, UV_TEXTURE_MODE_U_V}; 189 UVTextureMode uv_modes[2] = {UV_TEXTURE_MODE_UV, UV_TEXTURE_MODE_U_V};
190 YUVAlphaTextureMode a_modes[2] = {YUV_NO_ALPHA_TEXTURE, 190 YUVAlphaTextureMode a_modes[2] = {YUV_NO_ALPHA_TEXTURE,
191 YUV_HAS_ALPHA_TEXTURE}; 191 YUV_HAS_ALPHA_TEXTURE};
192 ColorConversionMode c_modes[2] = {COLOR_CONVERSION_MODE_NONE, 192 ColorConversionMode c_modes[3] = {COLOR_CONVERSION_MODE_NONE,
193 COLOR_CONVERSION_MODE_LUT_FROM_YUV}; 193 COLOR_CONVERSION_MODE_LUT_FROM_YUV,
194 COLOR_CONVERSION_MODE_ANALYTIC};
194 for (int j = 0; j < 2; j++) { 195 for (int j = 0; j < 2; j++) {
195 for (int k = 0; k < 2; k++) { 196 for (int k = 0; k < 2; k++) {
196 for (int l = 0; l < 2; l++) { 197 for (int l = 0; l < 3; l++) {
197 const Program* program = renderer()->GetProgram(ProgramKey::YUVVideo( 198 const Program* program = renderer()->GetProgram(ProgramKey::YUVVideo(
198 precision, sampler, a_modes[j], uv_modes[k], c_modes[l])); 199 precision, sampler, a_modes[j], uv_modes[k], c_modes[l]));
199 EXPECT_PROGRAM_VALID(program); 200 EXPECT_PROGRAM_VALID(program);
200 } 201 }
201 } 202 }
202 } 203 }
203 } 204 }
204 205
205 void TestShadersWithMasks(TexCoordPrecision precision, 206 void TestShadersWithMasks(TexCoordPrecision precision,
206 SamplerType sampler, 207 SamplerType sampler,
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
1981 renderer_->SetVisible(true); 1982 renderer_->SetVisible(true);
1982 Mock::VerifyAndClearExpectations(context_support_ptr_); 1983 Mock::VerifyAndClearExpectations(context_support_ptr_);
1983 1984
1984 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true)); 1985 EXPECT_CALL(*context_support_ptr_, SetAggressivelyFreeResources(true));
1985 renderer_->SetVisible(false); 1986 renderer_->SetVisible(false);
1986 Mock::VerifyAndClearExpectations(context_support_ptr_); 1987 Mock::VerifyAndClearExpectations(context_support_ptr_);
1987 } 1988 }
1988 1989
1989 } // namespace 1990 } // namespace
1990 } // namespace cc 1991 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/program_binding.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698