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

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

Issue 14308014: Clean up of GLES2 Command Decoder by moving some of the error state into a separate class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix merge error. Created 7 years, 8 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/service/texture_manager.h » ('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 06c2fd734b64ca598a0200b10a157b0c5db944a7..5b3f57cadbbd418836ae7877cb7e9166c16b778e 100644
--- a/gpu/command_buffer/service/test_helper.cc
+++ b/gpu/command_buffer/service/test_helper.cc
@@ -11,8 +11,8 @@
#include "base/strings/string_tokenizer.h"
#include "gpu/command_buffer/common/types.h"
#include "gpu/command_buffer/service/buffer_manager.h"
+#include "gpu/command_buffer/service/error_state_mock.h"
#include "gpu/command_buffer/service/gl_utils.h"
-#include "gpu/command_buffer/service/gles2_cmd_decoder_mock.h"
#include "gpu/command_buffer/service/gpu_switches.h"
#include "gpu/command_buffer/service/program_manager.h"
#include "gpu/command_buffer/service/texture_manager.h"
@@ -498,10 +498,10 @@ void TestHelper::SetupShader(
}
void TestHelper::DoBufferData(
- ::gfx::MockGLInterface* gl, MockGLES2Decoder* decoder,
+ ::gfx::MockGLInterface* gl, MockErrorState* error_state,
BufferManager* manager, Buffer* buffer, GLsizeiptr size, GLenum usage,
const GLvoid* data, GLenum error) {
- EXPECT_CALL(*decoder, CopyRealGLErrorsToWrapper(_, _, _))
+ EXPECT_CALL(*error_state, CopyRealGLErrorsToWrapper(_, _, _))
.Times(1)
.RetiresOnSaturation();
if (manager->IsUsageClientSideArray(usage)) {
@@ -515,14 +515,14 @@ void TestHelper::DoBufferData(
.Times(1)
.RetiresOnSaturation();
}
- EXPECT_CALL(*decoder, PeekGLError(_, _, _))
+ EXPECT_CALL(*error_state, PeekGLError(_, _, _))
.WillOnce(Return(error))
.RetiresOnSaturation();
- manager->DoBufferData(decoder, buffer, size, usage, data);
+ manager->DoBufferData(error_state, buffer, size, usage, data);
}
void TestHelper::SetTexParameterWithExpectations(
- ::gfx::MockGLInterface* gl, MockGLES2Decoder* decoder,
+ ::gfx::MockGLInterface* gl, MockErrorState* error_state,
TextureManager* manager, Texture* texture,
GLenum pname, GLint value, GLenum error) {
if (error == GL_NO_ERROR) {
@@ -532,15 +532,15 @@ void TestHelper::SetTexParameterWithExpectations(
.RetiresOnSaturation();
}
} else if (error == GL_INVALID_ENUM) {
- EXPECT_CALL(*decoder, SetGLErrorInvalidEnum(_, _, _, value, _))
+ EXPECT_CALL(*error_state, SetGLErrorInvalidEnum(_, _, _, value, _))
.Times(1)
.RetiresOnSaturation();
} else {
- EXPECT_CALL(*decoder, SetGLErrorInvalidParam(_, _, error, _, _, _))
+ EXPECT_CALL(*error_state, SetGLErrorInvalidParam(_, _, error, _, _, _))
.Times(1)
.RetiresOnSaturation();
}
- manager->SetParameter("", decoder, texture, pname, value);
+ manager->SetParameter("", error_state, texture, pname, value);
}
ScopedGLImplementationSetter::ScopedGLImplementationSetter(
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('k') | gpu/command_buffer/service/texture_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698