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

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

Issue 373833002: Fix gpu_unittests for new Shader Translator header. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added TODO comments Created 6 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
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/program_manager.h" 5 #include "gpu/command_buffer/service/program_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 13 matching lines...) Expand all
24 using ::testing::DoAll; 24 using ::testing::DoAll;
25 using ::testing::InSequence; 25 using ::testing::InSequence;
26 using ::testing::MatcherCast; 26 using ::testing::MatcherCast;
27 using ::testing::Pointee; 27 using ::testing::Pointee;
28 using ::testing::Return; 28 using ::testing::Return;
29 using ::testing::ReturnRef; 29 using ::testing::ReturnRef;
30 using ::testing::SetArrayArgument; 30 using ::testing::SetArrayArgument;
31 using ::testing::SetArgumentPointee; 31 using ::testing::SetArgumentPointee;
32 using ::testing::StrEq; 32 using ::testing::StrEq;
33 33
34 // ANGLE now uses GLenum values directory for types
35 // TODO(jmadill): Delete these defines when the ANGLE
36 // roll reliably passes translator version 126
37 #if (ANGLE_SH_VERSION >= 126)
38 #define SH_FLOAT GL_FLOAT
39 #define SH_FLOAT_VEC2 GL_FLOAT_VEC2
40 #define SH_FLOAT_VEC3 GL_FLOAT_VEC3
41 #define SH_FLOAT_VEC4 GL_FLOAT_VEC4
42 #endif
43
34 namespace gpu { 44 namespace gpu {
35 namespace gles2 { 45 namespace gles2 {
36 46
37 namespace { 47 namespace {
38 const uint32 kMaxVaryingVectors = 8; 48 const uint32 kMaxVaryingVectors = 8;
39 49
40 void ShaderCacheCb(const std::string& key, const std::string& shader) {} 50 void ShaderCacheCb(const std::string& key, const std::string& shader) {}
41 } // namespace anonymous 51 } // namespace anonymous
42 52
43 class ProgramManagerTest : public GpuServiceTest { 53 class ProgramManagerTest : public GpuServiceTest {
(...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 SetExpectationsForProgramLoad(ProgramCache::PROGRAM_LOAD_SUCCESS); 1778 SetExpectationsForProgramLoad(ProgramCache::PROGRAM_LOAD_SUCCESS);
1769 SetExpectationsForNotCachingProgram(); 1779 SetExpectationsForNotCachingProgram();
1770 SetExpectationsForProgramLoadSuccess(); 1780 SetExpectationsForProgramLoadSuccess();
1771 1781
1772 EXPECT_TRUE(program_->Link(NULL, NULL, NULL, 1782 EXPECT_TRUE(program_->Link(NULL, NULL, NULL,
1773 Program::kCountOnlyStaticallyUsed, base::Bind(&ShaderCacheCb))); 1783 Program::kCountOnlyStaticallyUsed, base::Bind(&ShaderCacheCb)));
1774 } 1784 }
1775 1785
1776 } // namespace gles2 1786 } // namespace gles2
1777 } // namespace gpu 1787 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/mocks.h ('k') | gpu/command_buffer/service/shader_translator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698