gc->pipe[n].array.field = _pipebuf_resize(gc->pipe[n].array.field, \
gc->pipe[n].array.alloc * sizeof(type) * size)
- RALOC(vertex, GLshort, VERTEX_CNT);
+ RALOC(vertex, GLfloat, VERTEX_CNT);
RALOC(color, GLubyte, COLOR_CNT);
RALOC(texuv, GLfloat, TEX_CNT);
RALOC(texa, GLfloat, TEX_CNT);
pipe_region_intersects(Evas_Engine_GL_Context *gc, int n,
int x, int y, int w, int h)
{
- int rx, ry, rw, rh, ii, end;
- const GLshort *v;
-
+#define SPANS_INTERSECT(x1, w1, x2, w2) \
+(!((((x2) + (w2)) <= (x1)) || ((x2) >= ((x1) + (w1)))))
+
+#define REGIONS_INTERSECT(x, y, w, h, xx, yy, ww, hh) \
+((SPANS_COMMON((x), (w), (xx), (ww))) && (SPANS_COMMON((y), (h), (yy), (hh))))
+
+ float rx, ry, rw, rh;
+ int ii, end;
+ const GLfloat *v;
+
rx = gc->pipe[n].region.x;
ry = gc->pipe[n].region.y;
rw = gc->pipe[n].region.w;
rh = gc->pipe[n].region.h;
- if (!RECTS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) return 0;
+ if (!REGIONS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) return 0;
// a hack for now. map pipes use their whole bounding box for intersects
// which at worst case reduces to old pipeline flushes, but cheaper than
ry = v[ii + 1];
rw = v[ii + 3] - rx;
rh = v[ii + 7] - ry;
- if (RECTS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) return 1;
+ if (REGIONS_INTERSECT(x, y, w, h, rx, ry, rw, rh)) return 1;
}
return 0;
}
gc, NULL, mtex,
prog,
0, 0, 0, 0,
- x, y, w, h,
- blend,
- EINA_FALSE,
- 0, 0, 0, 0, 0,
- mask_smooth);
+ x, y, w, h,
+ blend,
+ EINA_FALSE,
+ 0, 0, 0, 0, 0,
+ mask_smooth);
gc->pipe[pn].region.type = SHD_LINE;
gc->pipe[pn].shader.prog = prog;
(A_VAL(&(p[2].col)) < 0xff) || (A_VAL(&(p[3].col)) < 0xff))
blend = EINA_TRUE;
- if ((p[0].z == p[1].z) && (p[1].z == p[2].z) && (p[2].z == p[3].z))
- flat = EINA_TRUE;
-
- if (!clip) cx = cy = cw = ch = 0;
-
- if (!flat)
+ if (((p[0].z == p[1].z) && (p[1].z == p[2].z) && (p[2].z == p[3].z)) ||
+ (p[0].foc <= 0))
{
- if (p[0].foc <= 0) flat = EINA_TRUE;
+ flat = EINA_TRUE;
}
+ if (!clip) cx = cy = cw = ch = 0;
+
switch (cspace)
{
case EVAS_COLORSPACE_YCBCR422P601_PL:
w = w - x;
h = h - y;
- if (!flat)
- {
- // FUZZZZ!
- x -= 3;
- y -= 3;
- w += 6;
- h += 6;
- }
+ // FUZZZZ!
+ x -= 3;
+ y -= 3;
+ w += 6;
+ h += 6;
+
if (clip)
{
if (flat)
gc, tex, mtex,
prog,
0, 0, 0, 0,
- x, y, w, h,
- blend,
- smooth,
- clip, cx, cy, cw, ch,
- mask_smooth);
+ x, y, w, h,
+ blend,
+ smooth,
+ clip, cx, cy, cw, ch,
+ mask_smooth);
gc->pipe[pn].region.type = SHD_MAP;
gc->pipe[pn].shader.prog = prog;
if (flat)
{
PUSH_VERTEX(pn,
- (p[points[i]].x >> FP),
- (p[points[i]].y >> FP),
+ p[points[i]].fx,
+ p[points[i]].fy,
0);
}
else
}
// use_vertex is always true
- GL_TH(glVertexAttribPointer, SHAD_VERTEX, VERTEX_CNT, GL_SHORT, GL_FALSE, 0, vertex_ptr);
+ GL_TH(glVertexAttribPointer, SHAD_VERTEX, VERTEX_CNT, GL_FLOAT, GL_FALSE, 0, vertex_ptr);
if (gc->pipe[i].array.use_color)
{
}
static Eina_Bool
-eng_image_map_draw(void *engine, void *data, void *context, void *surface, void *image, RGBA_Map *m, int smooth, int level, Eina_Bool do_async)
+eng_image_map_draw(void *engine EINA_UNUSED, void *data, void *context, void *surface, void *image,
+ RGBA_Map *m, int smooth, int level, Eina_Bool do_async EINA_UNUSED)
{
Evas_Engine_GL_Context *gl_context;
Evas_GL_Image *gim = image;
evas_gl_common_context_target_surface_set(gl_context, surface);
gl_context->dc = context;
- if ((m->pts[0].x == m->pts[3].x) &&
+ if (!gl_context->msaa &&
+ (m->pts[0].x == m->pts[3].x) &&
(m->pts[1].x == m->pts[2].x) &&
(m->pts[0].y == m->pts[1].y) &&
(m->pts[3].y == m->pts[2].y) &&
(m->pts[3].col == 0xffffffff))
{
int dx, dy, dw, dh;
-
dx = m->pts[0].x >> FP;
dy = m->pts[0].y >> FP;
dw = (m->pts[2].x >> FP) - dx;