diff options
author | Greg Daniel <egdaniel@google.com> | 2018-01-12 13:15:06 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-12 19:41:13 +0000 |
commit | 966db9e4ee1e5485fce21a5953b426ad8bf95a9d (patch) | |
tree | f856f623d6a6bf04230873ff2001e9019b2cf641 /src/gpu/GrBackendTextureImageGenerator.h | |
parent | 7a10b332a37dab94b1c59685714f6d8c28fc84b9 (diff) |
Force BackendTextureImageGenerator to work on only 1 consumer context
Bug: skia:
Change-Id: I83d3e4af6f20c877c541964fdd489434f6a62b25
Reviewed-on: https://skia-review.googlesource.com/93200
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/gpu/GrBackendTextureImageGenerator.h')
-rw-r--r-- | src/gpu/GrBackendTextureImageGenerator.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/gpu/GrBackendTextureImageGenerator.h b/src/gpu/GrBackendTextureImageGenerator.h index bebb736750..ef96e6a238 100644 --- a/src/gpu/GrBackendTextureImageGenerator.h +++ b/src/gpu/GrBackendTextureImageGenerator.h @@ -14,6 +14,13 @@ class GrSemaphore; +/* + * This ImageGenerator is used to wrap a texture in one GrContext and can then be used as a source + * in another GrContext. It holds onto a semaphore which the producing Grontext will signal and the + * consuming GrContext will wait on before using the texture. Only one GrContext can ever be used + * as a consumer (this is mostly because Vulkan can't allow multiple things to wait on the same + * semaphore). + */ class GrBackendTextureImageGenerator : public SkImageGenerator { public: static std::unique_ptr<SkImageGenerator> Make(sk_sp<GrTexture>, GrSurfaceOrigin, @@ -64,7 +71,6 @@ private: RefHelper* fRefHelper; sk_sp<GrSemaphore> fSemaphore; - uint32_t fLastBorrowingContextID; GrBackendTexture fBackendTexture; GrSurfaceOrigin fSurfaceOrigin; |