aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2017-07-20 15:47:30 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-20 20:26:28 +0000
commitdba7e7ccfbab1c99b8a3f81156cecdb630d7d03a (patch)
tree1254893d643a529bcc916393c77991bbf705c5c3 /src
parentc7d295ecf712dece58ae6654721b3708fd8a40d6 (diff)
Add test for flushing empty surface with semaphores
Bug: skia: Change-Id: I8d7dcb29c5b4c460aa5137842caf6563448ba5d3 Reviewed-on: https://skia-review.googlesource.com/25181 Commit-Queue: Greg Daniel <egdaniel@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLAssembleInterface.cpp3
-rw-r--r--src/gpu/gl/GrGLInterface.cpp4
-rw-r--r--src/gpu/gl/GrGLTestInterface.cpp1
-rw-r--r--src/gpu/gl/GrGLTestInterface.h1
4 files changed, 9 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLAssembleInterface.cpp b/src/gpu/gl/GrGLAssembleInterface.cpp
index 64bed32136..6b0234abb7 100644
--- a/src/gpu/gl/GrGLAssembleInterface.cpp
+++ b/src/gpu/gl/GrGLAssembleInterface.cpp
@@ -516,6 +516,7 @@ const GrGLInterface* GrGLAssembleGLInterface(void* ctx, GrGLGetProc get) {
if (glVer >= GR_GL_VER(3, 2) || extensions.has("GL_ARB_sync")) {
GET_PROC(FenceSync);
+ GET_PROC(IsSync);
GET_PROC(ClientWaitSync);
GET_PROC(WaitSync);
GET_PROC(DeleteSync);
@@ -940,11 +941,13 @@ const GrGLInterface* GrGLAssembleGLESInterface(void* ctx, GrGLGetProc get) {
if (version >= GR_GL_VER(3, 0)) {
GET_PROC(FenceSync);
+ GET_PROC(IsSync);
GET_PROC(ClientWaitSync);
GET_PROC(WaitSync);
GET_PROC(DeleteSync);
} else if (extensions.has("GL_APPLE_sync")) {
GET_PROC_SUFFIX(FenceSync, APPLE);
+ GET_PROC_SUFFIX(IsSync, APPLE);
GET_PROC_SUFFIX(ClientWaitSync, APPLE);
GET_PROC_SUFFIX(WaitSync, APPLE);
GET_PROC_SUFFIX(DeleteSync, APPLE);
diff --git a/src/gpu/gl/GrGLInterface.cpp b/src/gpu/gl/GrGLInterface.cpp
index 09d7a4fad3..dcad07e1f2 100644
--- a/src/gpu/gl/GrGLInterface.cpp
+++ b/src/gpu/gl/GrGLInterface.cpp
@@ -757,6 +757,8 @@ bool GrGLInterface::validate() const {
if (kGL_GrGLStandard == fStandard) {
if (glVer >= GR_GL_VER(3, 2) || fExtensions.has("GL_ARB_sync")) {
if (nullptr == fFunctions.fFenceSync ||
+ // Is sync needs to be added to chrome before uncommenting
+ // nullptr == fFunctions.fIsSync ||
nullptr == fFunctions.fClientWaitSync ||
nullptr == fFunctions.fWaitSync ||
nullptr == fFunctions.fDeleteSync) {
@@ -766,6 +768,8 @@ bool GrGLInterface::validate() const {
} else if (kGLES_GrGLStandard == fStandard) {
if (glVer >= GR_GL_VER(3, 0) || fExtensions.has("GL_APPLE_sync")) {
if (nullptr == fFunctions.fFenceSync ||
+ // Is sync needs to be added to chrome before uncommenting
+ // nullptr == fFunctions.fIsSync ||
nullptr == fFunctions.fClientWaitSync ||
nullptr == fFunctions.fWaitSync ||
nullptr == fFunctions.fDeleteSync) {
diff --git a/src/gpu/gl/GrGLTestInterface.cpp b/src/gpu/gl/GrGLTestInterface.cpp
index ef86ea71b9..45482e0066 100644
--- a/src/gpu/gl/GrGLTestInterface.cpp
+++ b/src/gpu/gl/GrGLTestInterface.cpp
@@ -314,6 +314,7 @@ GrGLTestInterface::GrGLTestInterface() {
fFunctions.fFlushMappedNamedBufferRange = bind_to_member(this, &GrGLTestInterface::flushMappedNamedBufferRange);
fFunctions.fTextureBuffer = bind_to_member(this, &GrGLTestInterface::textureBuffer);
fFunctions.fFenceSync = bind_to_member(this, &GrGLTestInterface::fenceSync);
+ fFunctions.fIsSync = bind_to_member(this, &GrGLTestInterface::isSync);
fFunctions.fClientWaitSync = bind_to_member(this, &GrGLTestInterface::clientWaitSync);
fFunctions.fWaitSync = bind_to_member(this, &GrGLTestInterface::waitSync);
fFunctions.fDeleteSync = bind_to_member(this, &GrGLTestInterface::deleteSync);
diff --git a/src/gpu/gl/GrGLTestInterface.h b/src/gpu/gl/GrGLTestInterface.h
index 69427f8d5a..1ebf90b7cf 100644
--- a/src/gpu/gl/GrGLTestInterface.h
+++ b/src/gpu/gl/GrGLTestInterface.h
@@ -319,6 +319,7 @@ public:
virtual GrGLvoid flushMappedNamedBufferRange(GrGLuint buffer, GrGLintptr offset, GrGLsizeiptr length) {}
virtual GrGLvoid textureBuffer(GrGLuint texture, GrGLenum target, GrGLenum internalformat, GrGLuint buffer) {}
virtual GrGLsync fenceSync(GrGLenum condition, GrGLbitfield flags) { return nullptr; }
+ virtual GrGLboolean isSync(GrGLsync) { return false; }
virtual GrGLenum clientWaitSync(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout) { return GR_GL_WAIT_FAILED; }
virtual GrGLvoid waitSync(GrGLsync sync, GrGLbitfield flags, GrGLuint64 timeout) {}
virtual GrGLvoid deleteSync(GrGLsync sync) {}