| Index: gpu/command_buffer/service/texture_manager.h
|
| diff --git a/gpu/command_buffer/service/texture_manager.h b/gpu/command_buffer/service/texture_manager.h
|
| index 8c3100b4a74faebb0c044a1d433ed1ae5d459e76..a4c7b675c74be6a600f7bd2b61e482fe4d055b36 100644
|
| --- a/gpu/command_buffer/service/texture_manager.h
|
| +++ b/gpu/command_buffer/service/texture_manager.h
|
| @@ -15,6 +15,7 @@
|
| #include "gpu/command_buffer/service/gl_utils.h"
|
| #include "gpu/command_buffer/service/memory_tracking.h"
|
| #include "gpu/gpu_export.h"
|
| +#include "ui/gl/async_pixel_transfer_delegate.h"
|
| #include "ui/gl/gl_image.h"
|
|
|
| namespace gpu {
|
| @@ -174,6 +175,17 @@ class GPU_EXPORT TextureManager {
|
| return stream_texture_;
|
| }
|
|
|
| + gfx::AsyncPixelTransferState* GetAsyncTransferState() const {
|
| + return async_transfer_state_.get();
|
| + }
|
| + void SetAsyncTransferState(gfx::AsyncPixelTransferState* state) {
|
| + async_transfer_state_ = state;
|
| + }
|
| + bool AsyncTransferIsInProgress() {
|
| + return async_transfer_state_ &&
|
| + async_transfer_state_->TransferIsInProgress();
|
| + }
|
| +
|
| void SetImmutable(bool immutable) {
|
| immutable_ = immutable;
|
| }
|
| @@ -185,6 +197,11 @@ class GPU_EXPORT TextureManager {
|
| // Whether a particular level/face is cleared.
|
| bool IsLevelCleared(GLenum target, GLint level);
|
|
|
| + // Whether the texture has been defined
|
| + bool IsDefined() {
|
| + return estimated_size() > 0;
|
| + }
|
| +
|
| private:
|
| friend class TextureManager;
|
| friend class base::RefCounted<TextureInfo>;
|
| @@ -341,6 +358,9 @@ class GPU_EXPORT TextureManager {
|
| // Whether this is a special streaming texture.
|
| bool stream_texture_;
|
|
|
| + // State to facilitate async transfers on this texture.
|
| + scoped_refptr<gfx::AsyncPixelTransferState> async_transfer_state_;
|
| +
|
| // Whether the texture is immutable and no further changes to the format
|
| // or dimensions of the texture object can be made.
|
| bool immutable_;
|
|
|