]> Pileus Git - ~andy/gtk/commitdiff
Rename from blit_inside_window(), as it now does blitting inside a bitmap,
authorTor Lillqvist <tml@novell.com>
Thu, 28 Jul 2005 22:24:19 +0000 (22:24 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 28 Jul 2005 22:24:19 +0000 (22:24 +0000)
2005-07-29  Tor Lillqvist  <tml@novell.com>

* gdk/win32/gdkdrawable-win32.c (blit_inside_drawable): Rename
from blit_inside_window(), as it now does blitting inside a
bitmap, too. No code change, still just call BitBlt().
(_gdk_win32_blit): Check for source equalling destination
first. (#169508, #131977)
Do away with the superfluous local draw_impl variable, the
parameter to this function is already a GdkDrawableImplWin32*, no
need to copy and cast it.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-8
gdk/win32/gdkdrawable-win32.c

index c3a1e4c2c5b6d32ea942116eee79dc6e4bdb68f8..82a2c6ad721417c87a1b8bddabbe4820ef1b8b8d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-07-29  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkdrawable-win32.c (blit_inside_drawable): Rename
+       from blit_inside_window(), as it now does blitting inside a
+       bitmap, too. No code change, still just call BitBlt().
+       (_gdk_win32_blit): Check for source equalling destination
+       first. (#169508, #131977) 
+       Do away with the superfluous local draw_impl variable, the
+       parameter to this function is already a GdkDrawableImplWin32*, no
+       need to copy and cast it.
+
 2005-07-28  Robert Ögren  <gtk@roboros.com>
 
        Avoid spurious core pointer events when the tablet pen is lifted.
index c3a1e4c2c5b6d32ea942116eee79dc6e4bdb68f8..82a2c6ad721417c87a1b8bddabbe4820ef1b8b8d 100644 (file)
@@ -1,3 +1,14 @@
+2005-07-29  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkdrawable-win32.c (blit_inside_drawable): Rename
+       from blit_inside_window(), as it now does blitting inside a
+       bitmap, too. No code change, still just call BitBlt().
+       (_gdk_win32_blit): Check for source equalling destination
+       first. (#169508, #131977) 
+       Do away with the superfluous local draw_impl variable, the
+       parameter to this function is already a GdkDrawableImplWin32*, no
+       need to copy and cast it.
+
 2005-07-28  Robert Ögren  <gtk@roboros.com>
 
        Avoid spurious core pointer events when the tablet pen is lifted.
index c3a1e4c2c5b6d32ea942116eee79dc6e4bdb68f8..82a2c6ad721417c87a1b8bddabbe4820ef1b8b8d 100644 (file)
@@ -1,3 +1,14 @@
+2005-07-29  Tor Lillqvist  <tml@novell.com>
+
+       * gdk/win32/gdkdrawable-win32.c (blit_inside_drawable): Rename
+       from blit_inside_window(), as it now does blitting inside a
+       bitmap, too. No code change, still just call BitBlt().
+       (_gdk_win32_blit): Check for source equalling destination
+       first. (#169508, #131977) 
+       Do away with the superfluous local draw_impl variable, the
+       parameter to this function is already a GdkDrawableImplWin32*, no
+       need to copy and cast it.
+
 2005-07-28  Robert Ögren  <gtk@roboros.com>
 
        Avoid spurious core pointer events when the tablet pen is lifted.
index 5d488375163ebc0158223400dd3839e2159419ad..31d6a4195752e11333a5862862647aca79173540 100644 (file)
@@ -1612,17 +1612,17 @@ blit_from_pixmap (gboolean              use_fg_bg,
 }
 
 static void
-blit_inside_window (HDC        hdc,
-                   GdkGCWin32 *gcwin32,
-                   gint        xsrc,
-                   gint        ysrc,
-                   gint        xdest,
-                   gint        ydest,
-                   gint        width,
-                   gint        height)
+blit_inside_drawable (HDC              hdc,
+                     GdkGCWin32 *gcwin32,
+                     gint      xsrc,
+                     gint      ysrc,
+                     gint      xdest,
+                     gint      ydest,
+                     gint      width,
+                     gint      height)
 
 {
-  GDK_NOTE (MISC, g_print ("blit_inside_window\n"));
+  GDK_NOTE (MISC, g_print ("blit_inside_drawable\n"));
 
   GDI_CALL (BitBlt, (hdc, xdest, ydest, width, height,
                     hdc, xsrc, ysrc, rop2_to_rop3 (gcwin32->rop2)));
@@ -1676,7 +1676,7 @@ blit_from_window (HDC                   hdc,
 
 void
 _gdk_win32_blit (gboolean              use_fg_bg,
-                GdkDrawableImplWin32 *drawable,
+                GdkDrawableImplWin32 *draw_impl,
                 GdkGC                *gc,
                 GdkDrawable          *src,
                 gint                  xsrc,
@@ -1689,7 +1689,6 @@ _gdk_win32_blit (gboolean              use_fg_bg,
   HDC hdc;
   HRGN src_rgn, draw_rgn, outside_rgn;
   RECT r;
-  GdkDrawableImplWin32 *draw_impl;
   GdkDrawableImplWin32 *src_impl = NULL;
   gint src_width, src_height;
   
@@ -1697,7 +1696,7 @@ _gdk_win32_blit (gboolean              use_fg_bg,
                           "                 dst:%s @%+d%+d use_fg_bg=%d\n",
                           _gdk_win32_drawable_description (src),
                           width, height, xsrc, ysrc,
-                          _gdk_win32_drawable_description ((GdkDrawable *) drawable),
+                          _gdk_win32_drawable_description (&draw_impl->parent_instance),
                           xdest, ydest,
                           use_fg_bg));
 
@@ -1711,8 +1710,6 @@ _gdk_win32_blit (gboolean              use_fg_bg,
       ysrc -= _gdk_offset_y;
     }
 
-  draw_impl = (GdkDrawableImplWin32 *) drawable;
-
   if (GDK_IS_DRAWABLE_IMPL_WIN32 (src))
     src_impl = (GdkDrawableImplWin32 *) src;
   else if (GDK_IS_WINDOW (src))
@@ -1722,7 +1719,7 @@ _gdk_win32_blit (gboolean              use_fg_bg,
   else
     g_assert_not_reached ();
 
-  hdc = gdk_win32_hdc_get ((GdkDrawable *) drawable, gc, GDK_GC_FOREGROUND);
+  hdc = gdk_win32_hdc_get (&draw_impl->parent_instance, gc, GDK_GC_FOREGROUND);
 
   gdk_drawable_get_size (src, &src_width, &src_height);
 
@@ -1788,15 +1785,15 @@ _gdk_win32_blit (gboolean              use_fg_bg,
       GDI_CALL (DeleteObject, (draw_rgn));
     }
 
-  if (GDK_IS_PIXMAP_IMPL_WIN32 (src_impl))
+  if (draw_impl->handle == src_impl->handle)
+    blit_inside_drawable (hdc, GDK_GC_WIN32 (gc), xsrc, ysrc, xdest, ydest, width, height);
+  else if (GDK_IS_PIXMAP_IMPL_WIN32 (src_impl))
     blit_from_pixmap (use_fg_bg, draw_impl, hdc,
                      (GdkPixmapImplWin32 *) src_impl, gc,
                      xsrc, ysrc, xdest, ydest, width, height);
-  else if (draw_impl->handle == src_impl->handle)
-    blit_inside_window (hdc, GDK_GC_WIN32 (gc), xsrc, ysrc, xdest, ydest, width, height);
   else
     blit_from_window (hdc, GDK_GC_WIN32 (gc), src_impl, xsrc, ysrc, xdest, ydest, width, height);
-  gdk_win32_hdc_release ((GdkDrawable *) drawable, gc, GDK_GC_FOREGROUND);
+  gdk_win32_hdc_release (&draw_impl->parent_instance, gc, GDK_GC_FOREGROUND);
 }
 
 static void