aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-07-22 17:33:48 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-22 17:34:00 +0000
commit8724b4609996eb6369b454611e31b065f3d8d2cf (patch)
tree72c35e7f426c99799499e942dc4689a2488b7bef /src
parentf5d4d86d857fd3619ae5f253cb8cc2552f552542 (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 'src')
-rw-r--r--src/gpu/GrContext.cpp11
-rw-r--r--src/gpu/GrDrawingManager.cpp25
-rw-r--r--src/gpu/GrDrawingManager.h18
-rw-r--r--src/gpu/GrGpu.cpp25
-rw-r--r--src/gpu/GrGpu.h10
-rw-r--r--src/gpu/GrRenderTargetContext.cpp38
-rw-r--r--src/gpu/GrRenderTargetContext.h3
-rw-r--r--src/gpu/GrSemaphore.h1
-rw-r--r--src/gpu/SkGpuDevice.cpp4
-rw-r--r--src/gpu/SkGpuDevice.h3
-rw-r--r--src/gpu/gl/GrGLGpu.cpp8
-rw-r--r--src/gpu/gl/GrGLGpu.h2
-rw-r--r--src/gpu/mock/GrMockGpu.h2
-rw-r--r--src/gpu/mtl/GrMtlGpu.h2
-rw-r--r--src/gpu/vk/GrVkCopyManager.cpp2
-rw-r--r--src/gpu/vk/GrVkGpu.cpp5
-rw-r--r--src/gpu/vk/GrVkGpu.h4
-rw-r--r--src/image/SkSurface.cpp3
-rw-r--r--src/image/SkSurface_Base.h5
-rw-r--r--src/image/SkSurface_Gpu.cpp3
-rw-r--r--src/image/SkSurface_Gpu.h3
21 files changed, 63 insertions, 114 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 6abfb6ae21..88fe379c37 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -5,7 +5,6 @@
* found in the LICENSE file.
*/
-#include "GrBackendSemaphore.h"
#include "GrContext.h"
#include "GrClip.h"
#include "GrContextOptions.h"
@@ -266,14 +265,6 @@ void GrContext::flush() {
fDrawingManager->flush(nullptr);
}
-GrSemaphoresSubmitted GrContext::flushAndSignalSemaphores(int numSemaphores,
- GrBackendSemaphore signalSemaphores[]) {
- ASSERT_SINGLE_OWNER
- if (fDrawingManager->wasAbandoned()) { return GrSemaphoresSubmitted::kNo; }
-
- return fDrawingManager->flush(nullptr, numSemaphores, signalSemaphores);
-}
-
void GrContextPriv::flush(GrSurfaceProxy* proxy) {
ASSERT_SINGLE_OWNER_PRIV
RETURN_IF_ABANDONED_PRIV
@@ -606,7 +597,7 @@ void GrContextPriv::prepareSurfaceForExternalIO(GrSurfaceProxy* proxy) {
RETURN_IF_ABANDONED_PRIV
SkASSERT(proxy);
ASSERT_OWNED_PROXY_PRIV(proxy);
- fContext->fDrawingManager->prepareSurfaceForExternalIO(proxy, 0, nullptr);
+ fContext->fDrawingManager->prepareSurfaceForExternalIO(proxy);
}
void GrContextPriv::flushSurfaceWrites(GrSurfaceProxy* proxy) {
diff --git a/src/gpu/GrDrawingManager.cpp b/src/gpu/GrDrawingManager.cpp
index 8de2471cac..eeb107118c 100644
--- a/src/gpu/GrDrawingManager.cpp
+++ b/src/gpu/GrDrawingManager.cpp
@@ -7,7 +7,6 @@
#include "GrDrawingManager.h"
-#include "GrBackendSemaphore.h"
#include "GrContext.h"
#include "GrGpu.h"
#include "GrOnFlushResourceProvider.h"
@@ -84,14 +83,11 @@ gr_instanced::OpAllocator* GrDrawingManager::instancingAllocator() {
}
// MDB TODO: make use of the 'proxy' parameter.
-GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
- GrResourceCache::FlushType type,
- int numSemaphores,
- GrBackendSemaphore backendSemaphores[]) {
+void GrDrawingManager::internalFlush(GrSurfaceProxy*, GrResourceCache::FlushType type) {
GR_CREATE_TRACE_MARKER_CONTEXT("GrDrawingManager", "internalFlush", fContext);
if (fFlushing || this->wasAbandoned()) {
- return GrSemaphoresSubmitted::kNo;
+ return;
}
fFlushing = true;
bool flushed = false;
@@ -194,8 +190,7 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
SkASSERT(fFlushState.nextDrawToken() == fFlushState.nextTokenToFlush());
- GrSemaphoresSubmitted result = fContext->getGpu()->finishFlush(numSemaphores,
- backendSemaphores);
+ fContext->getGpu()->finishFlush();
fFlushState.reset();
// We always have to notify the cache when it requested a flush so it can reset its state.
@@ -206,23 +201,20 @@ GrSemaphoresSubmitted GrDrawingManager::internalFlush(GrSurfaceProxy*,
onFlushCBObject->postFlush();
}
fFlushing = false;
-
- return result;
}
-GrSemaphoresSubmitted GrDrawingManager::prepareSurfaceForExternalIO(
- GrSurfaceProxy* proxy, int numSemaphores, GrBackendSemaphore backendSemaphores[]) {
+void GrDrawingManager::prepareSurfaceForExternalIO(GrSurfaceProxy* proxy) {
if (this->wasAbandoned()) {
- return GrSemaphoresSubmitted::kNo;
+ return;
}
SkASSERT(proxy);
- if (proxy->priv().hasPendingIO() || numSemaphores) {
- return this->flush(proxy, numSemaphores, backendSemaphores);
+ if (proxy->priv().hasPendingIO()) {
+ this->flush(proxy);
}
if (!proxy->instantiate(fContext->resourceProvider())) {
- return GrSemaphoresSubmitted::kNo;
+ return;
}
GrSurface* surface = proxy->priv().peekSurface();
@@ -230,7 +222,6 @@ GrSemaphoresSubmitted GrDrawingManager::prepareSurfaceForExternalIO(
if (fContext->getGpu() && surface->asRenderTarget()) {
fContext->getGpu()->resolveRenderTarget(surface->asRenderTarget());
}
- return GrSemaphoresSubmitted::kNo;
}
void GrDrawingManager::addOnFlushCallbackObject(GrOnFlushCallbackObject* onFlushCBObject) {
diff --git a/src/gpu/GrDrawingManager.h b/src/gpu/GrDrawingManager.h
index 6a1ad19d93..e7995fd80d 100644
--- a/src/gpu/GrDrawingManager.h
+++ b/src/gpu/GrDrawingManager.h
@@ -64,15 +64,13 @@ public:
void flushIfNecessary() {
if (fContext->getResourceCache()->requestsFlush()) {
- this->internalFlush(nullptr, GrResourceCache::kCacheRequested, 0, nullptr);
+ this->internalFlush(nullptr, GrResourceCache::kCacheRequested);
}
}
static bool ProgramUnitTest(GrContext* context, int maxStages, int maxLevels);
- GrSemaphoresSubmitted prepareSurfaceForExternalIO(GrSurfaceProxy*,
- int numSemaphores,
- GrBackendSemaphore backendSemaphores[]);
+ void prepareSurfaceForExternalIO(GrSurfaceProxy*);
void addOnFlushCallbackObject(GrOnFlushCallbackObject*);
void testingOnly_removeOnFlushCallbackObject(GrOnFlushCallbackObject*);
@@ -95,16 +93,10 @@ private:
void abandon();
void cleanup();
void reset();
- GrSemaphoresSubmitted flush(GrSurfaceProxy* proxy,
- int numSemaphores = 0,
- GrBackendSemaphore backendSemaphores[] = nullptr) {
- return this->internalFlush(proxy, GrResourceCache::FlushType::kExternal,
- numSemaphores, backendSemaphores);
+ void flush(GrSurfaceProxy* proxy) {
+ this->internalFlush(proxy, GrResourceCache::FlushType::kExternal);
}
- GrSemaphoresSubmitted internalFlush(GrSurfaceProxy*,
- GrResourceCache::FlushType,
- int numSemaphores,
- GrBackendSemaphore backendSemaphores[]);
+ void internalFlush(GrSurfaceProxy*, GrResourceCache::FlushType);
friend class GrContext; // for access to: ctor, abandon, reset & flush
friend class GrContextPriv; // access to: flush
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 2f4b3f784e..afe3956747 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -8,7 +8,6 @@
#include "GrGpu.h"
-#include "GrBackendSemaphore.h"
#include "GrBackendSurface.h"
#include "GrBuffer.h"
#include "GrCaps.h"
@@ -20,7 +19,6 @@
#include "GrRenderTargetPriv.h"
#include "GrResourceCache.h"
#include "GrResourceProvider.h"
-#include "GrSemaphore.h"
#include "GrStencilAttachment.h"
#include "GrStencilSettings.h"
#include "GrSurfacePriv.h"
@@ -515,26 +513,3 @@ bool GrGpu::SamplePatternComparator::operator()(const SamplePattern& a,
}
return false; // Equal.
}
-
-GrSemaphoresSubmitted GrGpu::finishFlush(int numSemaphores,
- GrBackendSemaphore backendSemaphores[]) {
- if (this->caps()->fenceSyncSupport()) {
- for (int i = 0; i < numSemaphores; ++i) {
- sk_sp<GrSemaphore> semaphore;
- if (backendSemaphores[i].isInitialized()) {
- semaphore = fContext->resourceProvider()->wrapBackendSemaphore(
- backendSemaphores[i], kBorrow_GrWrapOwnership);
- } else {
- semaphore = fContext->resourceProvider()->makeSemaphore(false);
- }
- this->insertSemaphore(semaphore, false);
-
- if (!backendSemaphores[i].isInitialized()) {
- semaphore->setBackendSemaphore(&backendSemaphores[i]);
- }
- }
- }
- this->onFinishFlush((numSemaphores > 0 && this->caps()->fenceSyncSupport()));
- return this->caps()->fenceSyncSupport() ? GrSemaphoresSubmitted::kYes
- : GrSemaphoresSubmitted::kNo;
-}
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 9d8e65a350..c6684ac4fa 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -41,8 +41,6 @@ class GrStencilSettings;
class GrSurface;
class GrTexture;
-enum class GrSemaphoresSubmitted;
-
namespace gr_instanced {
class InstancedOp;
class InstancedRendering;
@@ -377,10 +375,8 @@ public:
const GrGpuCommandBuffer::LoadAndStoreInfo& stencilInfo) = 0;
// Called by GrDrawingManager when flushing.
- // Provides a hook for post-flush actions (e.g. Vulkan command buffer submits). This will also
- // insert any numSemaphore semaphores on the gpu and set the backendSemaphores to match the
- // inserted semaphores.
- GrSemaphoresSubmitted finishFlush(int numSemaphores, GrBackendSemaphore backendSemaphores[]);
+ // Provides a hook for post-flush actions (e.g. Vulkan command buffer submits).
+ virtual void finishFlush() {}
virtual GrFence SK_WARN_UNUSED_RESULT insertFence() = 0;
virtual bool waitFence(GrFence, uint64_t timeout = 1000) = 0;
@@ -619,8 +615,6 @@ private:
virtual void onQueryMultisampleSpecs(GrRenderTarget*, const GrStencilSettings&,
int* effectiveSampleCnt, SamplePattern*) = 0;
- virtual void onFinishFlush(bool insertedSemaphores) = 0;
-
void resetContext() {
this->onResetContext(fResetBits);
fResetBits = 0;
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 2247eb3eaa..c9898c7480 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -1412,16 +1412,42 @@ void GrRenderTargetContext::drawImageLattice(const GrClip& clip,
this->addDrawOp(clip, std::move(op));
}
-GrSemaphoresSubmitted GrRenderTargetContext::prepareForExternalIO(
- int numSemaphores, GrBackendSemaphore backendSemaphores[]) {
+bool GrRenderTargetContext::prepareForExternalIO(int numSemaphores,
+ GrBackendSemaphore* backendSemaphores) {
ASSERT_SINGLE_OWNER
- if (this->drawingManager()->wasAbandoned()) { return GrSemaphoresSubmitted::kNo; }
+ RETURN_FALSE_IF_ABANDONED
SkDEBUGCODE(this->validate();)
GR_CREATE_TRACE_MARKER_CONTEXT("GrRenderTargetContext", "prepareForExternalIO", fContext);
- return this->drawingManager()->prepareSurfaceForExternalIO(fRenderTargetProxy.get(),
- numSemaphores,
- backendSemaphores);
+ if (numSemaphores && !this->caps()->fenceSyncSupport()) {
+ this->drawingManager()->prepareSurfaceForExternalIO(fRenderTargetProxy.get());
+ return false;
+ }
+
+ SkTArray<sk_sp<GrSemaphore>> semaphores(numSemaphores);
+ for (int i = 0; i < numSemaphores; ++i) {
+ if (backendSemaphores[i].isInitialized()) {
+ semaphores.push_back(fContext->resourceProvider()->wrapBackendSemaphore(
+ backendSemaphores[i], kBorrow_GrWrapOwnership));
+ } else {
+ semaphores.push_back(fContext->resourceProvider()->makeSemaphore(false));
+ }
+ // Create signal semaphore ops and force the final one to call flush.
+ bool forceFlush = (i == (numSemaphores - 1));
+ std::unique_ptr<GrOp> signalOp(GrSemaphoreOp::MakeSignal(semaphores.back(),
+ fRenderTargetProxy.get(),
+ forceFlush));
+ this->getRTOpList()->addOp(std::move(signalOp), *this->caps());
+ }
+
+ this->drawingManager()->prepareSurfaceForExternalIO(fRenderTargetProxy.get());
+
+ for (int i = 0; i < numSemaphores; ++i) {
+ if (!backendSemaphores[i].isInitialized()) {
+ semaphores[i]->setBackendSemaphore(&backendSemaphores[i]);
+ }
+ }
+ return true;
}
bool GrRenderTargetContext::waitOnSemaphores(int numSemaphores,
diff --git a/src/gpu/GrRenderTargetContext.h b/src/gpu/GrRenderTargetContext.h
index 964d9e9a4e..1958ed7c8e 100644
--- a/src/gpu/GrRenderTargetContext.h
+++ b/src/gpu/GrRenderTargetContext.h
@@ -303,8 +303,7 @@ public:
* After this returns any pending surface IO will be issued to the backend 3D API and
* if the surface has MSAA it will be resolved.
*/
- GrSemaphoresSubmitted prepareForExternalIO(int numSemaphores,
- GrBackendSemaphore backendSemaphores[]);
+ bool prepareForExternalIO(int numSemaphores, GrBackendSemaphore* backendSemaphores);
/**
* The next time this GrRenderTargetContext is flushed, the gpu will wait on the passed in
diff --git a/src/gpu/GrSemaphore.h b/src/gpu/GrSemaphore.h
index fbc5a6df56..f6148b015a 100644
--- a/src/gpu/GrSemaphore.h
+++ b/src/gpu/GrSemaphore.h
@@ -29,7 +29,6 @@ private:
protected:
explicit GrSemaphore(const GrGpu* gpu) : fGpu(gpu) {}
- friend class GrGpu; // setBackendSemaphore
friend class GrRenderTargetContext; // setBackendSemaphore
friend class GrResourceProvider; // resetGpu
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp
index 607165cfd3..57b2d41def 100644
--- a/src/gpu/SkGpuDevice.cpp
+++ b/src/gpu/SkGpuDevice.cpp
@@ -1734,8 +1734,8 @@ void SkGpuDevice::flush() {
this->flushAndSignalSemaphores(0, nullptr);
}
-GrSemaphoresSubmitted SkGpuDevice::flushAndSignalSemaphores(int numSemaphores,
- GrBackendSemaphore signalSemaphores[]) {
+bool SkGpuDevice::flushAndSignalSemaphores(int numSemaphores,
+ GrBackendSemaphore* signalSemaphores) {
ASSERT_SINGLE_OWNER
return fRenderTargetContext->prepareForExternalIO(numSemaphores, signalSemaphores);
diff --git a/src/gpu/SkGpuDevice.h b/src/gpu/SkGpuDevice.h
index f1bd937269..3fc3807d22 100644
--- a/src/gpu/SkGpuDevice.h
+++ b/src/gpu/SkGpuDevice.h
@@ -118,8 +118,7 @@ public:
sk_sp<SkSpecialImage> snapSpecial() override;
void flush() override;
- GrSemaphoresSubmitted flushAndSignalSemaphores(int numSemaphores,
- GrBackendSemaphore signalSemaphores[]);
+ bool flushAndSignalSemaphores(int numSemaphores, GrBackendSemaphore* signalSemaphores);
bool wait(int numSemaphores, const GrBackendSemaphore* waitSemaphores);
bool onAccessPixels(SkPixmap*) override;
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
index 209cd41be9..49be761350 100644
--- a/src/gpu/gl/GrGLGpu.cpp
+++ b/src/gpu/gl/GrGLGpu.cpp
@@ -4352,13 +4352,6 @@ bool GrGLGpu::onIsACopyNeededForTextureParams(GrTextureProxy* proxy,
return false;
}
-void GrGLGpu::onFinishFlush(bool insertedSemaphore) {
- // If we inserted semaphores during the flush, we need to call GLFlush.
- if (insertedSemaphore) {
- GL_CALL(Flush());
- }
-}
-
GrFence SK_WARN_UNUSED_RESULT GrGLGpu::insertFence() {
SkASSERT(this->caps()->fenceSyncSupport());
GrGLsync sync;
@@ -4388,6 +4381,7 @@ sk_sp<GrSemaphore> GrGLGpu::wrapBackendSemaphore(const GrBackendSemaphore& semap
return GrGLSemaphore::MakeWrapped(this, semaphore.glSync(), ownership);
}
+
void GrGLGpu::insertSemaphore(sk_sp<GrSemaphore> semaphore, bool flush) {
GrGLSemaphore* glSem = static_cast<GrGLSemaphore*>(semaphore.get());
diff --git a/src/gpu/gl/GrGLGpu.h b/src/gpu/gl/GrGLGpu.h
index b1d19be042..9b6e004bd5 100644
--- a/src/gpu/gl/GrGLGpu.h
+++ b/src/gpu/gl/GrGLGpu.h
@@ -284,8 +284,6 @@ private:
void flushBlend(const GrXferProcessor::BlendInfo& blendInfo, const GrSwizzle&);
- void onFinishFlush(bool insertedSemaphores) override;
-
bool hasExtension(const char* ext) const { return fGLContext->hasExtension(ext); }
bool copySurfaceAsDraw(GrSurface* dst,
diff --git a/src/gpu/mock/GrMockGpu.h b/src/gpu/mock/GrMockGpu.h
index 5745a685ae..e31570ad07 100644
--- a/src/gpu/mock/GrMockGpu.h
+++ b/src/gpu/mock/GrMockGpu.h
@@ -122,8 +122,6 @@ private:
void onResolveRenderTarget(GrRenderTarget* target) override { return; }
- void onFinishFlush(bool insertedSemaphores) override {}
-
GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget*,
int width,
int height) override;
diff --git a/src/gpu/mtl/GrMtlGpu.h b/src/gpu/mtl/GrMtlGpu.h
index edb3059655..f150e3034a 100644
--- a/src/gpu/mtl/GrMtlGpu.h
+++ b/src/gpu/mtl/GrMtlGpu.h
@@ -126,8 +126,6 @@ private:
void onResolveRenderTarget(GrRenderTarget* target) override { return; }
- void onFinishFlush(bool insertedSemaphores) override {}
-
GrStencilAttachment* createStencilAttachmentForRenderTarget(const GrRenderTarget*,
int width,
int height) override {
diff --git a/src/gpu/vk/GrVkCopyManager.cpp b/src/gpu/vk/GrVkCopyManager.cpp
index 3851bc650a..f0dc60297b 100644
--- a/src/gpu/vk/GrVkCopyManager.cpp
+++ b/src/gpu/vk/GrVkCopyManager.cpp
@@ -160,7 +160,7 @@ bool GrVkCopyManager::copySurfaceAsDraw(GrVkGpu* gpu,
if (gpu->vkCaps().newCBOnPipelineChange()) {
// We bind a new pipeline here for the copy so we must start a new command buffer.
- gpu->finishFlush(0, nullptr);
+ gpu->finishFlush();
}
GrVkRenderTarget* rt = static_cast<GrVkRenderTarget*>(dst->asRenderTarget());
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 5979ae0f49..d7094b7c18 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -1467,9 +1467,8 @@ void GrVkGpu::addImageMemoryBarrier(VkPipelineStageFlags srcStageMask,
barrier);
}
-void GrVkGpu::onFinishFlush(bool insertedSemaphore) {
- // Submit the current command buffer to the Queue. Whether we inserted semaphores or not does
- // not effect what we do here.
+void GrVkGpu::finishFlush() {
+ // Submit the current command buffer to the Queue
this->submitCommandBuffer(kSkip_SyncQueue);
}
diff --git a/src/gpu/vk/GrVkGpu.h b/src/gpu/vk/GrVkGpu.h
index d81c2e6c22..419e9e3ad6 100644
--- a/src/gpu/vk/GrVkGpu.h
+++ b/src/gpu/vk/GrVkGpu.h
@@ -125,6 +125,8 @@ public:
GrVkRenderTarget*,
const SkIRect& bounds);
+ void finishFlush() override;
+
GrFence SK_WARN_UNUSED_RESULT insertFence() override;
bool waitFence(GrFence, uint64_t timeout) override;
void deleteFence(GrFence) const override;
@@ -208,8 +210,6 @@ private:
GrPixelConfig config, GrBuffer* transferBuffer,
size_t offset, size_t rowBytes) override;
- void onFinishFlush(bool insertedSemaphores) override;
-
// Ends and submits the current command buffer to the queue and then creates a new command
// buffer and begins it. If sync is set to kForce_SyncQueue, the function will wait for all
// work in the queue to finish before returning. If this GrVkGpu object has any semaphores in
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
index ead0062aa8..29068b2c4a 100644
--- a/src/image/SkSurface.cpp
+++ b/src/image/SkSurface.cpp
@@ -200,8 +200,7 @@ void SkSurface::flush() {
asSB(this)->onFlush(0, nullptr);
}
-GrSemaphoresSubmitted SkSurface::flushAndSignalSemaphores(int numSemaphores,
- GrBackendSemaphore signalSemaphores[]) {
+bool SkSurface::flushAndSignalSemaphores(int numSemaphores, GrBackendSemaphore* signalSemaphores) {
return asSB(this)->onFlush(numSemaphores, signalSemaphores);
}
diff --git a/src/image/SkSurface_Base.h b/src/image/SkSurface_Base.h
index c847b09aab..93528b8d5d 100644
--- a/src/image/SkSurface_Base.h
+++ b/src/image/SkSurface_Base.h
@@ -80,9 +80,8 @@ public:
* Inserts the requested number of semaphores for the gpu to signal when work is complete on the
* gpu and inits the array of GrBackendSemaphores with the signaled semaphores.
*/
- virtual GrSemaphoresSubmitted onFlush(int numSemaphores,
- GrBackendSemaphore signalSemaphores[]) {
- return (GrSemaphoresSubmitted)0;
+ virtual bool onFlush(int numSemaphores, GrBackendSemaphore* signalSemaphores) {
+ return false;
}
/**
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 7f65a3e2f2..143a6039f0 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -148,8 +148,7 @@ void SkSurface_Gpu::onDiscard() {
fDevice->accessRenderTargetContext()->discard();
}
-GrSemaphoresSubmitted SkSurface_Gpu::onFlush(int numSemaphores,
- GrBackendSemaphore signalSemaphores[]) {
+bool SkSurface_Gpu::onFlush(int numSemaphores, GrBackendSemaphore* signalSemaphores) {
return fDevice->flushAndSignalSemaphores(numSemaphores, signalSemaphores);
}
diff --git a/src/image/SkSurface_Gpu.h b/src/image/SkSurface_Gpu.h
index ebf7d4ed44..2bc9210b34 100644
--- a/src/image/SkSurface_Gpu.h
+++ b/src/image/SkSurface_Gpu.h
@@ -26,8 +26,7 @@ public:
sk_sp<SkImage> onNewImageSnapshot() override;
void onCopyOnWrite(ContentChangeMode) override;
void onDiscard() override;
- GrSemaphoresSubmitted onFlush(int numSemaphores,
- GrBackendSemaphore signalSemaphores[]) override;
+ bool onFlush(int numSemaphores, GrBackendSemaphore* signalSemaphores) override;
bool onWait(int numSemaphores, const GrBackendSemaphore* waitSemaphores) override;
SkGpuDevice* getDevice() { return fDevice.get(); }