// // Copyright 2014 The ANGLE Project Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file.
// Error.h: Defines the egl::Error and gl::Error classes which encapsulate API errors // and optional error messages.
using EglBadAccess = priv::ErrorStream<EGL_BAD_ACCESS>; using EglBadAlloc = priv::ErrorStream<EGL_BAD_ALLOC>; using EglBadAttribute = priv::ErrorStream<EGL_BAD_ATTRIBUTE>; using EglBadConfig = priv::ErrorStream<EGL_BAD_CONFIG>; using EglBadContext = priv::ErrorStream<EGL_BAD_CONTEXT>; using EglBadCurrentSurface = priv::ErrorStream<EGL_BAD_CURRENT_SURFACE>; using EglBadDevice = priv::ErrorStream<EGL_BAD_DEVICE_EXT>; using EglBadDisplay = priv::ErrorStream<EGL_BAD_DISPLAY>; using EglBadMatch = priv::ErrorStream<EGL_BAD_MATCH>; using EglBadNativeWindow = priv::ErrorStream<EGL_BAD_NATIVE_WINDOW>; using EglBadNativePixmap = priv::ErrorStream<EGL_BAD_NATIVE_PIXMAP>; using EglBadParameter = priv::ErrorStream<EGL_BAD_PARAMETER>; using EglBadState = priv::ErrorStream<EGL_BAD_STATE_KHR>; using EglBadStream = priv::ErrorStream<EGL_BAD_STREAM_KHR>; using EglBadSurface = priv::ErrorStream<EGL_BAD_SURFACE>; using EglContextLost = priv::ErrorStream<EGL_CONTEXT_LOST>; using EglNotInitialized = priv::ErrorStream<EGL_NOT_INITIALIZED>;
#define ANGLE_CHECK(CONTEXT, EXPR, MESSAGE, ERROR) \ do \
{ \ if (ANGLE_UNLIKELY(!(EXPR))) \
{ \
CONTEXT->handleError(ERROR, MESSAGE, __FILE__, ANGLE_FUNCTION, __LINE__); \ return angle::Result::Stop; \
} \
} while (0)
namespace angle
{ // Result signals if calling code should continue running or early exit. A value of Stop can // either indicate an Error or a non-Error early exit condition such as a detected no-op. // Incomplete signals special cases that are neither success nor failure but require // special attention. enumclass [[nodiscard]] Result{ Continue,
Stop,
Incomplete,
};
// TODO(jmadill): Remove this when refactor is complete. http://anglebug.com/3041
egl::Error ResultToEGL(Result result);
} // namespace angle
// TODO(jmadill): Remove this when refactor is complete. http://anglebug.com/3041 inlinebool IsError(angle::Result result)
{ return result == angle::Result::Stop;
}
// TODO(jmadill): Remove this when refactor is complete. http://anglebug.com/3041 inlinebool IsError(const egl::Error &err)
{ return err.isError();
}
// TODO(jmadill): Remove this when refactor is complete. http://anglebug.com/3041 inlinebool IsError(bool value)
{ return !value;
}
// Utility macro for handling implementation methods inside Validation. #define ANGLE_HANDLE_VALIDATION_ERR(X) \ do \
{ \
(void)(X); \ returnfalse; \
} while (0)
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.