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

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

Issue 16175005: GPU: Replace AsyncPixelTransferState with AsyncPixelTransferDelegate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 6 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 | « no previous file | gpu/command_buffer/service/async_pixel_transfer_delegate.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.h
diff --git a/gpu/command_buffer/service/async_pixel_transfer_delegate.h b/gpu/command_buffer/service/async_pixel_transfer_delegate.h
index b8e33a62e5b3a7fd2a4942fe14f46b957e4dc9b9..31bb3723edcac8d9f97d8575cd238b7da5b9b9a7 100644
--- a/gpu/command_buffer/service/async_pixel_transfer_delegate.h
+++ b/gpu/command_buffer/service/async_pixel_transfer_delegate.h
@@ -9,7 +9,6 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
-#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "base/time.h"
#include "gpu/gpu_export.h"
@@ -72,50 +71,26 @@ class AsyncPixelTransferUploadStats
DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferUploadStats);
};
-// AsyncPixelTransferState holds the resources required to do async
-// transfers on one texture. It should stay alive for the lifetime
-// of the texture to allow multiple transfers.
-class GPU_EXPORT AsyncPixelTransferState
- : public base::RefCounted<AsyncPixelTransferState>,
- public base::SupportsWeakPtr<AsyncPixelTransferState> {
- public:
- // Returns true if there is a transfer in progress.
- virtual bool TransferIsInProgress() = 0;
-
- protected:
- AsyncPixelTransferState();
- virtual ~AsyncPixelTransferState();
-
- private:
- friend class base::RefCounted<AsyncPixelTransferState>;
-
- DISALLOW_COPY_AND_ASSIGN(AsyncPixelTransferState);
-};
-
class GPU_EXPORT AsyncPixelTransferDelegate {
public:
virtual ~AsyncPixelTransferDelegate();
- virtual AsyncPixelTransferState* CreatePixelTransferState(
- GLuint texture_id,
- const AsyncTexImage2DParams& define_params) = 0;
-
// The callback occurs on the caller thread, once the texture is
// safe/ready to be used.
virtual void AsyncTexImage2D(
- AsyncPixelTransferState* state,
const AsyncTexImage2DParams& tex_params,
const AsyncMemoryParams& mem_params,
const base::Closure& bind_callback) = 0;
virtual void AsyncTexSubImage2D(
- AsyncPixelTransferState* state,
const AsyncTexSubImage2DParams& tex_params,
const AsyncMemoryParams& mem_params) = 0;
+ // Returns true if there is a transfer in progress.
+ virtual bool TransferIsInProgress() = 0;
+
// Block until the specified transfer completes.
- virtual void WaitForTransferCompletion(
- AsyncPixelTransferState* state) = 0;
+ virtual void WaitForTransferCompletion() = 0;
// Gets the address of the data from shared memory.
static void* GetAddress(const AsyncMemoryParams& mem_params);
« no previous file with comments | « no previous file | gpu/command_buffer/service/async_pixel_transfer_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698