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

Side by Side Diff: gpu/command_buffer/service/shader_translator_unittest.cc

Issue 295803002: Moves responsibility for shader resource string generation to ANGLE. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add DCHECK for string length Created 6 years, 7 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 | « gpu/command_buffer/service/shader_translator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/command_buffer/service/shader_translator.h" 5 #include "gpu/command_buffer/service/shader_translator.h"
6 #include "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 7
8 namespace gpu { 8 namespace gpu {
9 namespace gles2 { 9 namespace gles2 {
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 SH_FRAGMENT_SHADER, SH_GLES2_SPEC, &resources, 238 SH_FRAGMENT_SHADER, SH_GLES2_SPEC, &resources,
239 ShaderTranslatorInterface::kGlsl, 239 ShaderTranslatorInterface::kGlsl,
240 static_cast<ShCompileOptions>(0))); 240 static_cast<ShCompileOptions>(0)));
241 resources.EXT_draw_buffers = 1; 241 resources.EXT_draw_buffers = 1;
242 ASSERT_TRUE(translator_3->Init( 242 ASSERT_TRUE(translator_3->Init(
243 SH_VERTEX_SHADER, SH_GLES2_SPEC, &resources, 243 SH_VERTEX_SHADER, SH_GLES2_SPEC, &resources,
244 ShaderTranslatorInterface::kGlsl, 244 ShaderTranslatorInterface::kGlsl,
245 SH_EMULATE_BUILT_IN_FUNCTIONS)); 245 SH_EMULATE_BUILT_IN_FUNCTIONS));
246 246
247 std::string options_1( 247 std::string options_1(
248 translator_1->GetStringForOptionsThatWouldEffectCompilation()); 248 translator_1->GetStringForOptionsThatWouldAffectCompilation());
249 std::string options_2( 249 std::string options_2(
250 translator_1->GetStringForOptionsThatWouldEffectCompilation()); 250 translator_1->GetStringForOptionsThatWouldAffectCompilation());
251 std::string options_3( 251 std::string options_3(
252 translator_2->GetStringForOptionsThatWouldEffectCompilation()); 252 translator_2->GetStringForOptionsThatWouldAffectCompilation());
253 std::string options_4( 253 std::string options_4(
254 translator_3->GetStringForOptionsThatWouldEffectCompilation()); 254 translator_3->GetStringForOptionsThatWouldAffectCompilation());
255 255
256 EXPECT_EQ(options_1, options_2); 256 EXPECT_EQ(options_1, options_2);
257 EXPECT_NE(options_1, options_3); 257 EXPECT_NE(options_1, options_3);
258 EXPECT_NE(options_1, options_4); 258 EXPECT_NE(options_1, options_4);
259 EXPECT_NE(options_3, options_4); 259 EXPECT_NE(options_3, options_4);
260 } 260 }
261 261
262 } // namespace gles2 262 } // namespace gles2
263 } // namespace gpu 263 } // namespace gpu
264 264
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/shader_translator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698