| Index: cc/resources/resource_provider.h
|
| diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
|
| index 2130bb7b1a983b19cfc9342aedcc5b75a66617f7..ccef1cd50389b7e7e7a0f40ebb3c2b8d883b379b 100644
|
| --- a/cc/resources/resource_provider.h
|
| +++ b/cc/resources/resource_provider.h
|
| @@ -399,6 +399,29 @@ class CC_EXPORT ResourceProvider {
|
| DISALLOW_COPY_AND_ASSIGN(SynchronousFence);
|
| };
|
|
|
| + // Query object based fence implementation used to detect completion of copy
|
| + // texture operations. Fence has passed when query result is available.
|
| + class CopyTextureFence : public ResourceProvider::Fence {
|
| + public:
|
| + CopyTextureFence(gpu::gles2::GLES2Interface* gl, unsigned query_id)
|
| + : gl_(gl), query_id_(query_id) {}
|
| +
|
| + // Overridden from ResourceProvider::Fence:
|
| + void Set() override {}
|
| + bool HasPassed() override;
|
| + void Wait() override;
|
| +
|
| + private:
|
| + ~CopyTextureFence() override {}
|
| +
|
| + void ProcessResult();
|
| +
|
| + gpu::gles2::GLES2Interface* gl_;
|
| + unsigned query_id_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(CopyTextureFence);
|
| + };
|
| +
|
| // Acquire pixel buffer for resource. The pixel buffer can be used to
|
| // set resource pixels without performing unnecessary copying.
|
| void AcquirePixelBuffer(ResourceId resource);
|
|
|