Commit bfaa3442 authored by Pasi Keranen's avatar Pasi Keranen Committed by Pasi Keränen
Browse files

Fixes getError behavior.


Fixes QTBUG-44949

Change-Id: I538b98d71e8c2fcedb72c5ac8f0b806107884c87
Reviewed-by: default avatarPasi Keränen <pasi.keranen@digia.com>
Showing with 274 additions and 169 deletions
This diff is collapsed.
...@@ -1214,6 +1214,15 @@ private: ...@@ -1214,6 +1214,15 @@ private:
bool isOfType(const QJSValue &value, const QString &classname) const; bool isOfType(const QJSValue &value, const QString &classname) const;
typedef enum {
CANVAS_NO_ERRORS = 0,
CANVAS_INVALID_ENUM = 1 << 0,
CANVAS_INVALID_VALUE = 1 << 1,
CANVAS_INVALID_OPERATION = 1 << 2,
CANVAS_OUT_OF_MEMORY = 1 << 3,
CANVAS_INVALID_FRAMEBUFFER_OPERATION = 1 << 4
} errorBits;
private: private:
QQmlEngine *m_engine; QQmlEngine *m_engine;
QV4::ExecutionEngine *m_v4engine; QV4::ExecutionEngine *m_v4engine;
...@@ -1231,18 +1240,27 @@ private: ...@@ -1231,18 +1240,27 @@ private:
QOpenGLContext *m_context; QOpenGLContext *m_context;
QSet<QByteArray> m_extensions; QSet<QByteArray> m_extensions;
QSurface *m_surface; QSurface *m_surface;
glEnums m_error;
CanvasContextAttributes m_contextAttributes; CanvasContextAttributes m_contextAttributes;
QMap<int, CanvasBuffer*> m_idToCanvasBufferMap; QMap<int, CanvasBuffer*> m_idToCanvasBufferMap;
friend class Canvas; friend class Canvas;
friend class QFBOCanvas3D; friend class QFBOCanvas3D;
QString m_emptyString; QString m_emptyString;
int m_error;
EnumToStringMap *m_map; EnumToStringMap *m_map;
Canvas *m_canvas; Canvas *m_canvas;
uint m_maxVertexAttribs; uint m_maxVertexAttribs;
float **m_vertexAttribPointers; float **m_vertexAttribPointers;
bool m_isOpenGLES2; bool m_isOpenGLES2;
bool invalidEnumFlag;
bool invalidValueFlag;
bool invalidOperationFlag;
bool invalidStackOverflowFlag;
bool invalidStackUnderflowFlag;
bool invalidOutOfMemoryFlag;
bool invalidFramebufferFlag;
bool invalidContextLostFlag;
// EXTENSIONS // EXTENSIONS
CanvasGLStateDump *m_stateDumpExt; CanvasGLStateDump *m_stateDumpExt;
QObject *m_standardDerivatives; QObject *m_standardDerivatives;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment