aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/image
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-08-01 09:19:57 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-01 17:07:53 +0000
commit876aed8758b7109574999ffac43b1ea47f359bd7 (patch)
treee513ba5c69b28c5cb51d750c2b4af5adf2738e2e /src/image
parent7516c2775c30d04a8d2c467f18d3289d78c2b841 (diff)
Revert "Revert "Add support for semaphores to be inserted on GrContext flush""
This reverts commit 8724b4609996eb6369b454611e31b065f3d8d2cf. Reason for revert: Creating a test CL to see what happens on the bots Original change's description: > 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> TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia: Change-Id: I5edbeaa0769670ee58f362f0ccaa78319410aa6c Reviewed-on: https://skia-review.googlesource.com/26160 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/image')
-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
4 files changed, 9 insertions, 5 deletions
diff --git a/src/image/SkSurface.cpp b/src/image/SkSurface.cpp
index 29068b2c4a..ead0062aa8 100644
--- a/src/image/SkSurface.cpp
+++ b/src/image/SkSurface.cpp
@@ -200,7 +200,8 @@ void SkSurface::flush() {
asSB(this)->onFlush(0, nullptr);
}
-bool SkSurface::flushAndSignalSemaphores(int numSemaphores, GrBackendSemaphore* signalSemaphores) {
+GrSemaphoresSubmitted 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 93528b8d5d..8cf75b60e4 100644
--- a/src/image/SkSurface_Base.h
+++ b/src/image/SkSurface_Base.h
@@ -80,8 +80,9 @@ 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 bool onFlush(int numSemaphores, GrBackendSemaphore* signalSemaphores) {
- return false;
+ virtual GrSemaphoresSubmitted onFlush(int numSemaphores,
+ GrBackendSemaphore signalSemaphores[]) {
+ return GrSemaphoresSubmitted::kNo;
}
/**
diff --git a/src/image/SkSurface_Gpu.cpp b/src/image/SkSurface_Gpu.cpp
index 37aa07a6ab..9f469e3286 100644
--- a/src/image/SkSurface_Gpu.cpp
+++ b/src/image/SkSurface_Gpu.cpp
@@ -149,7 +149,8 @@ void SkSurface_Gpu::onDiscard() {
fDevice->accessRenderTargetContext()->discard();
}
-bool SkSurface_Gpu::onFlush(int numSemaphores, GrBackendSemaphore* signalSemaphores) {
+GrSemaphoresSubmitted 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 2bc9210b34..ebf7d4ed44 100644
--- a/src/image/SkSurface_Gpu.h
+++ b/src/image/SkSurface_Gpu.h
@@ -26,7 +26,8 @@ public:
sk_sp<SkImage> onNewImageSnapshot() override;
void onCopyOnWrite(ContentChangeMode) override;
void onDiscard() override;
- bool onFlush(int numSemaphores, GrBackendSemaphore* signalSemaphores) override;
+ GrSemaphoresSubmitted onFlush(int numSemaphores,
+ GrBackendSemaphore signalSemaphores[]) override;
bool onWait(int numSemaphores, const GrBackendSemaphore* waitSemaphores) override;
SkGpuDevice* getDevice() { return fDevice.get(); }