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

Unified Diff: gpu/command_buffer/service/test_helper.cc

Issue 10797055: gpu in-memory program cache implementation with a memory limit + lru eviction. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nit fixes Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/test_helper.cc
diff --git a/gpu/command_buffer/service/test_helper.cc b/gpu/command_buffer/service/test_helper.cc
index bd95c4f7e5fbe51540ef5df2c503cd62ccde4624..86eab65adcd04f561062b78a7e39e1985a4b4627 100644
--- a/gpu/command_buffer/service/test_helper.cc
+++ b/gpu/command_buffer/service/test_helper.cc
@@ -4,6 +4,9 @@
#include "gpu/command_buffer/service/test_helper.h"
+#include <string>
+#include <algorithm>
+
#include "base/string_number_conversions.h"
#include "base/string_tokenizer.h"
#include "gpu/command_buffer/common/gl_mock.h"
@@ -12,8 +15,6 @@
#include "gpu/command_buffer/service/program_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include <string.h>
-
using ::testing::_;
using ::testing::DoAll;
using ::testing::InSequence;
@@ -368,17 +369,11 @@ void TestHelper::SetupExpectationsForClearingUniforms(
}
}
-void TestHelper::SetupShader(
+void TestHelper::SetupProgramSuccessExpectations(
::gfx::MockGLInterface* gl,
AttribInfo* attribs, size_t num_attribs,
UniformInfo* uniforms, size_t num_uniforms,
GLuint service_id) {
- InSequence s;
-
- EXPECT_CALL(*gl,
- LinkProgram(service_id))
- .Times(1)
- .RetiresOnSaturation();
EXPECT_CALL(*gl,
GetProgramiv(service_id, GL_LINK_STATUS, _))
.WillOnce(SetArgumentPointee<2>(1))
@@ -480,6 +475,22 @@ void TestHelper::SetupShader(
}
}
+void TestHelper::SetupShader(
+ ::gfx::MockGLInterface* gl,
+ AttribInfo* attribs, size_t num_attribs,
+ UniformInfo* uniforms, size_t num_uniforms,
+ GLuint service_id) {
+ InSequence s;
+
+ EXPECT_CALL(*gl,
+ LinkProgram(service_id))
+ .Times(1)
+ .RetiresOnSaturation();
+
+ SetupProgramSuccessExpectations(
+ gl, attribs, num_attribs, uniforms, num_uniforms, service_id);
+}
+
} // namespace gles2
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('k') | gpu/command_buffer/tests/gl_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698