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

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

Issue 16325018: GPU: Factory produces APTManagers instead of APTDelegates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
index b4baf8bcd670615f4c9d94a7335bf86cef0ad786..cf61df35be0df79f1e95c21a438ec6fa0b33cd43 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc
@@ -10,6 +10,7 @@
#include "gpu/command_buffer/common/id_allocator.h"
#include "gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h"
#include "gpu/command_buffer/service/async_pixel_transfer_manager.h"
+#include "gpu/command_buffer/service/async_pixel_transfer_manager_test.h"
#include "gpu/command_buffer/service/cmd_buffer_engine.h"
#include "gpu/command_buffer/service/context_group.h"
#include "gpu/command_buffer/service/gl_surface_mock.h"
@@ -8081,9 +8082,12 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransfers) {
Texture* texture = texture_ref->texture();
// Set a mock Async delegate
+ gpu::AsyncPixelTransferManagerTest* manager =
+ new gpu::AsyncPixelTransferManagerTest;
+ manager->Initialize(group().texture_manager());
+ decoder_->SetAsyncPixelTransferManagerForTest(manager);
StrictMock<gpu::MockAsyncPixelTransferDelegate>* delegate =
- new StrictMock<gpu::MockAsyncPixelTransferDelegate>;
- decoder_->SetAsyncPixelTransferDelegateForTest(delegate);
+ manager->GetMockDelegate();
StrictMock<gpu::MockAsyncPixelTransferState>* state = NULL;
// Tex(Sub)Image2D upload commands.
@@ -8244,10 +8248,6 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransfers) {
EXPECT_EQ(error::kNoError, ExecuteCmd(wait_cmd));
EXPECT_EQ(GL_NO_ERROR, GetGLError());
}
-
- decoder_->SetAsyncPixelTransferDelegateForTest(NULL);
- decoder_->GetAsyncPixelTransferManager()
- ->ClearPixelTransferStateForTest(texture_ref);
}
TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransferManager) {
@@ -8262,9 +8262,12 @@ TEST_F(GLES2DecoderManualInitTest, AsyncPixelTransferManager) {
TextureRef* texture_ref = GetTexture(client_texture_id_);
// Set a mock Async delegate.
+ gpu::AsyncPixelTransferManagerTest* manager =
+ new gpu::AsyncPixelTransferManagerTest;
+ manager->Initialize(group().texture_manager());
+ decoder_->SetAsyncPixelTransferManagerForTest(manager);
StrictMock<gpu::MockAsyncPixelTransferDelegate>* delegate =
- new StrictMock<gpu::MockAsyncPixelTransferDelegate>;
- decoder_->SetAsyncPixelTransferDelegateForTest(delegate);
+ manager->GetMockDelegate();
StrictMock<gpu::MockAsyncPixelTransferState>* state = NULL;
AsyncTexImage2DCHROMIUM teximage_cmd;
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698