提交 45de222b 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!93 fix codex bugs

Merge pull request !93 from ℝandall_Wan/master
...@@ -75,7 +75,7 @@ void unbindFbo() { s_gles2.glBindFramebuffer(GL_FRAMEBUFFER, 0); } ...@@ -75,7 +75,7 @@ void unbindFbo() { s_gles2.glBindFramebuffer(GL_FRAMEBUFFER, 0); }
// } // automatically calls m_helper->teardownContext(); // } // automatically calls m_helper->teardownContext();
// //
class ScopedHelperContext { class ScopedHelperContext {
public: public:
ScopedHelperContext(ColorBuffer::Helper* helper) : mHelper(helper) { ScopedHelperContext(ColorBuffer::Helper* helper) : mHelper(helper) {
if (!helper->setupContext()) { if (!helper->setupContext()) {
mHelper = NULL; mHelper = NULL;
...@@ -93,7 +93,7 @@ class ScopedHelperContext { ...@@ -93,7 +93,7 @@ class ScopedHelperContext {
} }
} }
private: private:
ColorBuffer::Helper* mHelper; ColorBuffer::Helper* mHelper;
}; };
...@@ -128,6 +128,9 @@ ColorBuffer* ColorBuffer::create(EGLDisplay p_display, int p_width, ...@@ -128,6 +128,9 @@ ColorBuffer* ColorBuffer::create(EGLDisplay p_display, int p_width,
} }
ColorBuffer* cb = new ColorBuffer(p_display, helper, hndl); ColorBuffer* cb = new ColorBuffer(p_display, helper, hndl);
if (!cb) {
return NULL;
}
s_gles2.glGenTextures(1, &cb->m_tex); s_gles2.glGenTextures(1, &cb->m_tex);
s_gles2.glBindTexture(GL_TEXTURE_2D, cb->m_tex); s_gles2.glBindTexture(GL_TEXTURE_2D, cb->m_tex);
...@@ -172,6 +175,9 @@ ColorBuffer* ColorBuffer::create(EGLDisplay p_display, int p_width, ...@@ -172,6 +175,9 @@ ColorBuffer* ColorBuffer::create(EGLDisplay p_display, int p_width,
} }
cb->m_resizer = new TextureResize(p_width, p_height); cb->m_resizer = new TextureResize(p_width, p_height);
if (!(cb->m_resizer)) {
return NULL;
}
return cb; return cb;
} }
...@@ -322,6 +328,9 @@ bool ColorBuffer::bindToRenderbuffer() { ...@@ -322,6 +328,9 @@ bool ColorBuffer::bindToRenderbuffer() {
return false; return false;
} }
RenderThreadInfo* tInfo = RenderThreadInfo::get(); RenderThreadInfo* tInfo = RenderThreadInfo::get();
if (!tInfo) {
return false;
}
if (!tInfo->currContext) { if (!tInfo->currContext) {
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册