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); |