summaryrefslogtreecommitdiff
path: root/tmp.patch
blob: 945a5c1e0bedb3a2434a8dfd1f6810ade4df145b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 1d47ba06af..fc7452d712 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2195,6 +2195,20 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
                   if (obj->cur->clipper && (mapped > 1))
                     {
                        Evas_Object_Protected_Data *mask = obj->clip.mask;
+                       Eina_Bool invalid_cache_clip = EINA_FALSE;
+
+                       /* Clipped boundary in map */
+                       int off_x2 = 0, off_y2 = 0;
+                       if (obj->cur->geometry.x < 0)
+                         {
+                            off_x2 = obj->cur->geometry.x;
+                            invalid_cache_clip = EINA_TRUE;
+                         }
+                       if (obj->cur->geometry.y < 0)
+                         {
+                            off_y2 = obj->cur->geometry.y;
+                            invalid_cache_clip = EINA_TRUE;
+                         }
 
                        if (obj->mask->surface != surface)
                          {
@@ -2203,9 +2217,19 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
                                  if ((_evas_render_has_map(obj) && !_evas_render_can_map(obj)) ||
                                      _evas_render_object_is_mask(obj->cur->clipper))
                                    evas_object_clip_recalc(obj);
-                                 _evas_render_mapped_context_clip_set(evas, eo_obj, obj, ctx,
-                                                                      proxy_render_data,
-                                                                      off_x, off_y);
+
+                                 if (invalid_cache_clip)
+                                   {
+                                      int x = obj->cur->clipper->cur->geometry.x + off_x + off_x2;
+                                      int y = obj->cur->clipper->cur->geometry.y + off_y + off_y2;
+                                      int w = obj->cur->clipper->cur->geometry.w - off_x2;
+                                      int h = obj->cur->clipper->cur->geometry.h - off_y2;
+                                      ENFN->context_clip_clip(ENC, ctx, x, y, w, h);
+                                   }
+                                 else
+                                      _evas_render_mapped_context_clip_set(evas, eo_obj, obj, ctx,
+                                                                           proxy_render_data,
+                                                                           off_x, off_y);
                               }
                             else if (proxy_render_data)
                               {
@@ -2222,7 +2246,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
                          }
 
                        /* Clipper masks */
-                       _evas_render_mapped_mask(evas, obj, mask, proxy_render_data, output, ctx, off_x, off_y, level, do_async);
+                       _evas_render_mapped_mask(evas, obj, mask, proxy_render_data, output, ctx, off_x + off_x2, off_y + off_y2, level, do_async);
                     }
 
 #ifdef REND_DBG