Rename SetErrorCallback to SetUncapturedErrorCallback

This is to better match the naming of the uncapturederror event
in WebGPU.

Bug: dawn:153
Change-Id: Ic2bc1f46bf3d1f0d14cbd5cb8ea6e54d1679f987
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10542
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng
2019-08-27 21:43:56 +00:00
committed by Commit Bot service account
parent cb0cb658d4
commit 45ea7e66bf
19 changed files with 33 additions and 33 deletions

View File

@@ -458,7 +458,7 @@ void DawnTest::SetUp() {
device = dawn::Device::Acquire(cDevice);
queue = device.CreateQueue();
device.SetErrorCallback(OnDeviceError, this);
device.SetUncapturedErrorCallback(OnDeviceError, this);
}
void DawnTest::TearDown() {

View File

@@ -56,7 +56,7 @@ dawn::Device ValidationTest::CreateDeviceFromAdapter(
deviceToTest = dawn::Device::Acquire(adapterToTest.CreateDevice(&descriptor));
}
deviceToTest.SetErrorCallback(ValidationTest::OnDeviceError, this);
deviceToTest.SetUncapturedErrorCallback(ValidationTest::OnDeviceError, this);
return deviceToTest;
}

View File

@@ -59,7 +59,7 @@ class WireErrorCallbackTests : public WireTest {
// Test the return wire for device error callbacks
TEST_F(WireErrorCallbackTests, DeviceErrorCallback) {
dawnDeviceSetErrorCallback(device, ToMockDeviceErrorCallback, this);
dawnDeviceSetUncapturedErrorCallback(device, ToMockDeviceErrorCallback, this);
// Setting the error callback should stay on the client side and do nothing
FlushClient();

View File

@@ -120,7 +120,7 @@ TEST_F(WireFenceTests, QueueSignalSuccess) {
// Without any flushes, it is valid to signal a value greater than the current
// signaled value
TEST_F(WireFenceTests, QueueSignalSynchronousValidationSuccess) {
dawnDeviceSetErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
dawnDeviceSetUncapturedErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
EXPECT_CALL(*mockDeviceErrorCallback, Call(_, _, _)).Times(0);
dawnQueueSignal(queue, fence, 2u);
@@ -131,7 +131,7 @@ TEST_F(WireFenceTests, QueueSignalSynchronousValidationSuccess) {
// Without any flushes, errors should be generated when signaling a value less
// than or equal to the current signaled value
TEST_F(WireFenceTests, QueueSignalSynchronousValidationError) {
dawnDeviceSetErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
dawnDeviceSetUncapturedErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
EXPECT_CALL(*mockDeviceErrorCallback, Call(DAWN_ERROR_TYPE_VALIDATION, _, _)).Times(1);
dawnQueueSignal(queue, fence, 0u); // Error
@@ -217,7 +217,7 @@ TEST_F(WireFenceTests, OnCompletionSynchronousValidationSuccess) {
// Without any flushes, errors should be generated when waiting on a value greater
// than the last signaled value
TEST_F(WireFenceTests, OnCompletionSynchronousValidationError) {
dawnDeviceSetErrorCallback(device, ToMockDeviceErrorCallback, this + 1);
dawnDeviceSetUncapturedErrorCallback(device, ToMockDeviceErrorCallback, this + 1);
EXPECT_CALL(*mockFenceOnCompletionCallback, Call(DAWN_FENCE_COMPLETION_STATUS_ERROR, this + 0))
.Times(1);
@@ -262,7 +262,7 @@ TEST_F(WireFenceTests, SignalWrongQueue) {
EXPECT_CALL(api, DeviceCreateQueue(apiDevice)).WillOnce(Return(apiQueue2));
FlushClient();
dawnDeviceSetErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
dawnDeviceSetUncapturedErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
EXPECT_CALL(*mockDeviceErrorCallback, Call(DAWN_ERROR_TYPE_VALIDATION, _, _)).Times(1);
dawnQueueSignal(queue2, fence, 2u); // error
}
@@ -274,7 +274,7 @@ TEST_F(WireFenceTests, SignalWrongQueueDoesNotUpdateValue) {
EXPECT_CALL(api, DeviceCreateQueue(apiDevice)).WillOnce(Return(apiQueue2));
FlushClient();
dawnDeviceSetErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
dawnDeviceSetUncapturedErrorCallback(device, ToMockDeviceErrorCallback, nullptr);
EXPECT_CALL(*mockDeviceErrorCallback, Call(DAWN_ERROR_TYPE_VALIDATION, _, _)).Times(1);
dawnQueueSignal(queue2, fence, 2u); // error

View File

@@ -41,7 +41,7 @@ void WireTest::SetUp() {
api.GetProcTableAndDevice(&mockProcs, &mockDevice);
// This SetCallback call cannot be ignored because it is done as soon as we start the server
EXPECT_CALL(api, OnDeviceSetErrorCallback(_, _, _)).Times(Exactly(1));
EXPECT_CALL(api, OnDeviceSetUncapturedErrorCallback(_, _, _)).Times(Exactly(1));
SetupIgnoredCallExpectations();
mS2cBuf = std::make_unique<utils::TerribleCommandBuffer>();