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

Unified Diff: ui/gl/async_pixel_transfer_delegate_stub.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 | « ui/gl/async_pixel_transfer_delegate.h ('k') | ui/gl/async_pixel_transfer_delegate_stub.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/async_pixel_transfer_delegate_stub.h
diff --git a/ui/gl/async_pixel_transfer_delegate_stub.h b/ui/gl/async_pixel_transfer_delegate_stub.h
new file mode 100644
index 0000000000000000000000000000000000000000..5224107b70c847818d13a4d49bc6613fc43187d7
--- /dev/null
+++ b/ui/gl/async_pixel_transfer_delegate_stub.h
@@ -0,0 +1,59 @@
+// 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_STUB_H_
+#define UI_GL_ASYNC_TASK_DELEGATE_STUB_H_
+
+#include "ui/gl/async_pixel_transfer_delegate.h"
+
+namespace gfx {
+
+class AsyncTransferStateStub : public AsyncPixelTransferState {
+ public:
+ // implement AsyncPixelTransferState:
+ virtual bool TransferIsInProgress() OVERRIDE;
+ virtual void BindTransfer(AsyncTexImage2DParams* bound_params) OVERRIDE;
+
+ private:
+ friend class AsyncPixelTransferDelegateStub;
+ bool needs_late_bind_;
+ AsyncTexImage2DParams late_bind_define_params_ ;
+
+ explicit AsyncTransferStateStub(GLuint texture_id);
+ virtual ~AsyncTransferStateStub();
+ DISALLOW_COPY_AND_ASSIGN(AsyncTransferStateStub);
+};
+
+// Class which handles async pixel transfers (as a fallback).
+// This class just does the uploads synchronously.
+class AsyncPixelTransferDelegateStub : public AsyncPixelTransferDelegate {
+ public:
+ static scoped_ptr<AsyncPixelTransferDelegate>
+ Create(gfx::GLContext* context);
+
+ AsyncPixelTransferDelegateStub();
+ virtual ~AsyncPixelTransferDelegateStub();
+
+ // implement AsyncPixelTransferDelegate:
+ virtual void AsyncNotifyCompletion(const base::Closure& task) OVERRIDE;
+ virtual void AsyncTexImage2D(
+ AsyncPixelTransferState* transfer_state,
+ const AsyncTexImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params) OVERRIDE;
+ virtual void AsyncTexSubImage2D(
+ AsyncPixelTransferState* transfer_state,
+ const AsyncTexSubImage2DParams& tex_params,
+ const AsyncMemoryParams& mem_params) OVERRIDE;
+ private:
+ // implement AsyncPixelTransferDelegate:
+ virtual AsyncPixelTransferState*
+ CreateRawPixelTransferState(GLuint texture_id) OVERRIDE;
+
+ DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferDelegateStub);
+};
+
+} // namespace gfx
+
+#endif // UI_GL_ASYNC_TASK_DELEGATE_ANDROID_H_
+
« no previous file with comments | « ui/gl/async_pixel_transfer_delegate.h ('k') | ui/gl/async_pixel_transfer_delegate_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698