[client] all: replace assert with DEBUG_ASSERT

This commit is contained in:
Quantum
2021-08-13 19:51:36 -04:00
committed by Geoffrey McRae
parent 85a96d1e06
commit 579f998519
12 changed files with 48 additions and 56 deletions

View File

@@ -119,7 +119,7 @@ void egl_desktopRectsUpdate(EGL_DesktopRects * rects, const struct DamageRects *
else
{
rects->count = data->count;
assert(rects->count <= rects->maxCount);
DEBUG_ASSERT(rects->count <= rects->maxCount);
for (int i = 0; i < rects->count; ++i)
rectToVertices(vertices + i * 8, data->rects + i);

View File

@@ -28,7 +28,6 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
struct EGL_Model
{

View File

@@ -21,7 +21,6 @@
#include "texture.h"
#include <stdbool.h>
#include <assert.h>
#include <string.h>
#include "shader.h"
#include "common/framebuffer.h"
@@ -66,12 +65,12 @@ bool egl_textureInit(EGL_Texture ** texture_, EGLDisplay * display,
break;
case EGL_TEXTYPE_FRAMEBUFFER:
assert(streaming);
DEBUG_ASSERT(streaming);
ops = &EGL_TextureFrameBuffer;
break;
case EGL_TEXTYPE_DMABUF:
assert(streaming);
DEBUG_ASSERT(streaming);
ops = &EGL_TextureDMABUF;
break;

View File

@@ -23,7 +23,6 @@
#include "egldebug.h"
#include <string.h>
#include <assert.h>
// forwards
extern const EGL_TextureOps EGL_TextureBuffer;
@@ -109,7 +108,7 @@ bool egl_texBufferSetup(EGL_Texture * texture, const EGL_TexSetup * setup)
static bool egl_texBufferUpdate(EGL_Texture * texture, const EGL_TexUpdate * update)
{
TextureBuffer * this = UPCAST(TextureBuffer, texture);
assert(update->type == EGL_TEXTYPE_BUFFER);
DEBUG_ASSERT(update->type == EGL_TEXTYPE_BUFFER);
glBindTexture(GL_TEXTURE_2D, this->tex[0]);
glPixelStorei(GL_UNPACK_ROW_LENGTH, texture->format.pitch);
@@ -164,7 +163,7 @@ static bool egl_texBufferStreamUpdate(EGL_Texture * texture,
const EGL_TexUpdate * update)
{
TextureBuffer * this = UPCAST(TextureBuffer, texture);
assert(update->type == EGL_TEXTYPE_BUFFER);
DEBUG_ASSERT(update->type == EGL_TEXTYPE_BUFFER);
LG_LOCK(this->copyLock);
memcpy(this->buf[this->bufIndex].map, update->buffer,

View File

@@ -21,8 +21,6 @@
#include "texture.h"
#include "texture_buffer.h"
#include <assert.h>
#include "egl_dynprocs.h"
#include "egldebug.h"
@@ -101,7 +99,8 @@ static bool egl_texDMABUFUpdate(EGL_Texture * texture,
{
TextureBuffer * parent = UPCAST(TextureBuffer, texture);
TexDMABUF * this = UPCAST(TexDMABUF , parent);
assert(update->type == EGL_TEXTYPE_DMABUF);
DEBUG_ASSERT(update->type == EGL_TEXTYPE_DMABUF);
EGLImage image = EGL_NO_IMAGE;

View File

@@ -20,8 +20,6 @@
#include "texture.h"
#include <assert.h>
#include "texture_buffer.h"
#include "common/debug.h"
#include "common/KVMFR.h"
@@ -84,7 +82,7 @@ static bool egl_texFBUpdate(EGL_Texture * texture, const EGL_TexUpdate * update)
TextureBuffer * parent = UPCAST(TextureBuffer, texture);
TexFB * this = UPCAST(TexFB , parent );
assert(update->type == EGL_TEXTYPE_FRAMEBUFFER);
DEBUG_ASSERT(update->type == EGL_TEXTYPE_FRAMEBUFFER);
LG_LOCK(parent->copyLock);