Evas GL: Remove unnecessary check

We already checked that re->func.get_pixels wasn't NULL.
This commit is contained in:
Jean-Philippe ANDRE 2014-11-21 00:59:19 +09:00
parent 0482a0e686
commit 85b0992657
1 changed files with 31 additions and 35 deletions

View File

@ -821,43 +821,39 @@ eng_image_draw(void *data, void *context, void *surface, void *image, int src_x,
DBG("Rendering Directly to the window: %p", data);
gl_context->dc = context;
if (re->func.get_pixels)
if ((gl_context->master_clip.enabled) &&
(gl_context->master_clip.w > 0) &&
(gl_context->master_clip.h > 0))
{
if ((gl_context->master_clip.enabled) &&
(gl_context->master_clip.w > 0) &&
(gl_context->master_clip.h > 0))
{
// Pass the preserve flag info the evas_gl
evgl_direct_partial_info_set(gl_context->preserve_bit);
}
// Set necessary info for direct rendering
evgl_direct_info_set(gl_context->w,
gl_context->h,
gl_context->rot,
dst_x, dst_y, dst_w, dst_h,
gl_context->dc->clip.x,
gl_context->dc->clip.y,
gl_context->dc->clip.w,
gl_context->dc->clip.h);
// Call pixel get function
re->func.get_pixels(re->func.get_pixels_data, re->func.obj);
// Call end tile if it's being used
if ((gl_context->master_clip.enabled) &&
(gl_context->master_clip.w > 0) &&
(gl_context->master_clip.h > 0))
{
evgl_direct_partial_render_end();
evgl_direct_partial_info_clear();
gl_context->preserve_bit = GL_COLOR_BUFFER_BIT0_QCOM;
}
// Reset direct rendering info
evgl_direct_info_clear();
// Pass the preserve flag info the evas_gl
evgl_direct_partial_info_set(gl_context->preserve_bit);
}
// Set necessary info for direct rendering
evgl_direct_info_set(gl_context->w,
gl_context->h,
gl_context->rot,
dst_x, dst_y, dst_w, dst_h,
gl_context->dc->clip.x,
gl_context->dc->clip.y,
gl_context->dc->clip.w,
gl_context->dc->clip.h);
// Call pixel get function
re->func.get_pixels(re->func.get_pixels_data, re->func.obj);
// Call end tile if it's being used
if ((gl_context->master_clip.enabled) &&
(gl_context->master_clip.w > 0) &&
(gl_context->master_clip.h > 0))
{
evgl_direct_partial_render_end();
evgl_direct_partial_info_clear();
gl_context->preserve_bit = GL_COLOR_BUFFER_BIT0_QCOM;
}
// Reset direct rendering info
evgl_direct_info_clear();
}
else
{