diff options
author | 2017-07-22 17:33:48 +0000 | |
---|---|---|
committer | 2017-07-22 17:34:00 +0000 | |
commit | 8724b4609996eb6369b454611e31b065f3d8d2cf (patch) | |
tree | 72c35e7f426c99799499e942dc4689a2488b7bef /include | |
parent | f5d4d86d857fd3619ae5f253cb8cc2552f552542 (diff) |
Revert "Add support for semaphores to be inserted on GrContext flush"
This reverts commit cd1416efbc7af6f115dbaa09dce48e075d1d96ca.
Reason for revert: speculative, to try to fix roll see gpu_tests.pixel_integration_test.PixelIntegrationTest.Pixel_GpuRasterization_ConcavePaths
Original change's description:
> Add support for semaphores to be inserted on GrContext flush
>
> This also moves the logic of inserting semaphores down into GrDrawingManager
> and finishFlush on GrGpu. With it being on finishFlush, there should be no
> issues when the DrawingManager starts respecting the proxy passed in assuming
> it always calls finishFlush at the end (which it should).
>
> Bug: skia:
> Change-Id: I925c2a289dcbbb9159b9120878af1d34f21a2dc7
> Reviewed-on: https://skia-review.googlesource.com/25641
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Greg Daniel <egdaniel@google.com>
TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com
Change-Id: I9c5b9cf8c060193e1861dbb8f0c10fb11dfb5249
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/25980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/core/SkSurface.h | 14 | ||||
-rw-r--r-- | include/gpu/GrBackendSemaphore.h | 7 | ||||
-rw-r--r-- | include/gpu/GrContext.h | 30 |
3 files changed, 6 insertions, 45 deletions
diff --git a/include/core/SkSurface.h b/include/core/SkSurface.h index d977391442..4a8d81205f 100644 --- a/include/core/SkSurface.h +++ b/include/core/SkSurface.h @@ -18,7 +18,6 @@ class GrBackendRenderTarget; class GrBackendSemaphore; class GrContext; class GrRenderTarget; -enum class GrSemaphoresSubmitted; /** * SkSurface is responsible for managing the pixels that a canvas draws into. The pixels can be @@ -330,21 +329,16 @@ public: * If it is not initialized, a new semaphore is created and the GrBackendSemaphore object * is initialized with that semaphore. * - * The client will own and be responsible for deleting the underlying semaphores that are stored - * and returned in initialized GrBackendSemaphore objects. The GrBackendSemaphore objects - * themselves can be deleted as soon as this function returns. - * * If the backend API is OpenGL only uninitialized GrBackendSemaphores are supported. * If the backend API is Vulkan either initialized or unitialized semaphores are supported. * If unitialized, the semaphores which are created will be valid for use only with the VkDevice * with which they were created. * - * If this call returns GrSemaphoresSubmited::kNo, the GPU backend will not have created or - * added any semaphores to signal on the GPU. Thus the client should not have the GPU wait on - * any of the semaphores. However, any pending surface IO will still be flushed. + * If this call returns false, the GPU backend will not have created or added any semaphores to + * signal. Thus the array of semaphores will remain uninitialized. However, any pending surface + * IO will still be flush. */ - GrSemaphoresSubmitted flushAndSignalSemaphores(int numSemaphores, - GrBackendSemaphore signalSemaphores[]); + bool flushAndSignalSemaphores(int numSemaphores, GrBackendSemaphore* signalSemaphores); /** * Inserts a list of GPU semaphores that the current backend 3D API must wait on before diff --git a/include/gpu/GrBackendSemaphore.h b/include/gpu/GrBackendSemaphore.h index cea3745270..5c41532cb9 100644 --- a/include/gpu/GrBackendSemaphore.h +++ b/include/gpu/GrBackendSemaphore.h @@ -16,13 +16,6 @@ #include "vk/GrVkTypes.h" #endif -// Enum used as return value when flush with semaphores so the client knows whether the -// semaphores were submitted to GPU or not. -enum class GrSemaphoresSubmitted { - kNo, - kYes, -}; - /** * Wrapper class for passing into and receiving data from Ganesh about a backend semaphore object. */ diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 46a9008b63..f48b8db710 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -17,7 +17,6 @@ #include "../private/GrSingleOwner.h" class GrAtlasGlyphCache; -class GrBackendSemaphore; struct GrContextOptions; class GrContextPriv; class GrContextThreadSafeProxy; @@ -44,8 +43,6 @@ class SkTraceMemoryDump; class SkImage; class SkSurfaceProps; -enum class GrSemaphoresSubmitted; - class SK_API GrContext : public SkRefCnt { public: /** @@ -240,35 +237,12 @@ public: // Misc. /** - * Call to ensure all drawing to the context has been issued to the underlying 3D API. + * Call to ensure all drawing to the context has been issued to the + * underlying 3D API. */ void flush(); /** - * Call to ensure all drawing to the context has been issued to the underlying 3D API. After - * issuing all commands, numSemaphore semaphores will be signaled by the gpu. The client passes - * in an array of numSemaphores GrBackendSemaphores. In general these GrBackendSemaphore's can - * be either initialized or not. If they are initialized, the backend uses the passed in - * semaphore. If it is not initialized, a new semaphore is created and the GrBackendSemaphore - * object is initialized with that semaphore. - * - * The client will own and be responsible for deleting the underlying semaphores that are stored - * and returned in initialized GrBackendSemaphore objects. The GrBackendSemaphore objects - * themselves can be deleted as soon as this function returns. - * - * If the backend API is OpenGL only uninitialized GrBackendSemaphores are supported. - * If the backend API is Vulkan either initialized or unitialized semaphores are supported. - * If unitialized, the semaphores which are created will be valid for use only with the VkDevice - * with which they were created. - * - * If this call returns GrSemaphoresSubmited::kNo, the GPU backend will not have created or - * added any semaphores to signal on the GPU. Thus the client should not have the GPU wait on - * any of the semaphores. However, any pending commands to the context will still be flushed. - */ - GrSemaphoresSubmitted flushAndSignalSemaphores(int numSemaphores, - GrBackendSemaphore signalSemaphores[]); - - /** * An ID associated with this context, guaranteed to be unique. */ uint32_t uniqueID() { return fUniqueID; } |