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

Unified Diff: gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h

Issue 11428140: gpu: Add async pixel transfer interface, stub and tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Address Feedback. Created 8 years 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 | « no previous file | gpu/command_buffer/service/async_pixel_transfer_delegate_mock.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h
diff --git a/gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h b/gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h
new file mode 100644
index 0000000000000000000000000000000000000000..dcd65c90f05efae7b54544223b9da5f4e9567184
--- /dev/null
+++ b/gpu/command_buffer/service/async_pixel_transfer_delegate_mock.h
@@ -0,0 +1,53 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
+#define UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
+
+#include "base/basictypes.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "ui/gl/async_pixel_transfer_delegate.h"
+
+namespace gfx {
+
+class MockAsyncPixelTransferState : public gfx::AsyncPixelTransferState {
+ public:
+ MockAsyncPixelTransferState();
+
+ // Implement AsyncPixelTransferState.
+ MOCK_METHOD0(TransferIsInProgress, bool());
+ MOCK_METHOD1(BindTransfer, void(AsyncTexImage2DParams* level_params));
+
+ protected:
+ virtual ~MockAsyncPixelTransferState();
+ DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferState);
+};
+
+class MockAsyncPixelTransferDelegate : public gfx::AsyncPixelTransferDelegate {
+ public:
+ MockAsyncPixelTransferDelegate();
+ virtual ~MockAsyncPixelTransferDelegate();
+
+ // Implement AsyncPixelTransferDelegate.
+ MOCK_METHOD1(CreateRawPixelTransferState,
+ gfx::AsyncPixelTransferState*(GLuint service_id));
+ MOCK_METHOD1(AsyncNotifyCompletion,
+ void(const base::Closure& task));
+ MOCK_METHOD3(AsyncTexImage2D,
+ void(gfx::AsyncPixelTransferState*,
+ const AsyncTexImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params));
+ MOCK_METHOD3(AsyncTexSubImage2D,
+ void(gfx::AsyncPixelTransferState*,
+ const AsyncTexSubImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params));
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(MockAsyncPixelTransferDelegate);
+};
+
+} // namespace gfx
+
+#endif // UI_GL_ASYNC_TASK_DELEGATE_MOCK_H_
+
« no previous file with comments | « no previous file | gpu/command_buffer/service/async_pixel_transfer_delegate_mock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698