Commit c06f82f2 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

Rename from blit_inside_window(), as it now does blitting inside a bitmap,

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.
parent 67021509
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> 2005-07-28 Robert Ögren <gtk@roboros.com>
Avoid spurious core pointer events when the tablet pen is lifted. Avoid spurious core pointer events when the tablet pen is lifted.
......
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> 2005-07-28 Robert Ögren <gtk@roboros.com>
Avoid spurious core pointer events when the tablet pen is lifted. Avoid spurious core pointer events when the tablet pen is lifted.
......
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> 2005-07-28 Robert Ögren <gtk@roboros.com>
Avoid spurious core pointer events when the tablet pen is lifted. Avoid spurious core pointer events when the tablet pen is lifted.
......
...@@ -1612,17 +1612,17 @@ blit_from_pixmap (gboolean use_fg_bg, ...@@ -1612,17 +1612,17 @@ blit_from_pixmap (gboolean use_fg_bg,
} }
static void static void
blit_inside_window (HDC hdc, blit_inside_drawable (HDC hdc,
GdkGCWin32 *gcwin32, GdkGCWin32 *gcwin32,
gint xsrc, gint xsrc,
gint ysrc, gint ysrc,
gint xdest, gint xdest,
gint ydest, gint ydest,
gint width, gint width,
gint height) 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, GDI_CALL (BitBlt, (hdc, xdest, ydest, width, height,
hdc, xsrc, ysrc, rop2_to_rop3 (gcwin32->rop2))); hdc, xsrc, ysrc, rop2_to_rop3 (gcwin32->rop2)));
...@@ -1676,7 +1676,7 @@ blit_from_window (HDC hdc, ...@@ -1676,7 +1676,7 @@ blit_from_window (HDC hdc,
void void
_gdk_win32_blit (gboolean use_fg_bg, _gdk_win32_blit (gboolean use_fg_bg,
GdkDrawableImplWin32 *drawable, GdkDrawableImplWin32 *draw_impl,
GdkGC *gc, GdkGC *gc,
GdkDrawable *src, GdkDrawable *src,
gint xsrc, gint xsrc,
...@@ -1689,7 +1689,6 @@ _gdk_win32_blit (gboolean use_fg_bg, ...@@ -1689,7 +1689,6 @@ _gdk_win32_blit (gboolean use_fg_bg,
HDC hdc; HDC hdc;
HRGN src_rgn, draw_rgn, outside_rgn; HRGN src_rgn, draw_rgn, outside_rgn;
RECT r; RECT r;
GdkDrawableImplWin32 *draw_impl;
GdkDrawableImplWin32 *src_impl = NULL; GdkDrawableImplWin32 *src_impl = NULL;
gint src_width, src_height; gint src_width, src_height;
...@@ -1697,7 +1696,7 @@ _gdk_win32_blit (gboolean use_fg_bg, ...@@ -1697,7 +1696,7 @@ _gdk_win32_blit (gboolean use_fg_bg,
" dst:%s @%+d%+d use_fg_bg=%d\n", " dst:%s @%+d%+d use_fg_bg=%d\n",
_gdk_win32_drawable_description (src), _gdk_win32_drawable_description (src),
width, height, xsrc, ysrc, width, height, xsrc, ysrc,
_gdk_win32_drawable_description ((GdkDrawable *) drawable), _gdk_win32_drawable_description (&draw_impl->parent_instance),
xdest, ydest, xdest, ydest,
use_fg_bg)); use_fg_bg));
...@@ -1711,8 +1710,6 @@ _gdk_win32_blit (gboolean use_fg_bg, ...@@ -1711,8 +1710,6 @@ _gdk_win32_blit (gboolean use_fg_bg,
ysrc -= _gdk_offset_y; ysrc -= _gdk_offset_y;
} }
draw_impl = (GdkDrawableImplWin32 *) drawable;
if (GDK_IS_DRAWABLE_IMPL_WIN32 (src)) if (GDK_IS_DRAWABLE_IMPL_WIN32 (src))
src_impl = (GdkDrawableImplWin32 *) src; src_impl = (GdkDrawableImplWin32 *) src;
else if (GDK_IS_WINDOW (src)) else if (GDK_IS_WINDOW (src))
...@@ -1722,7 +1719,7 @@ _gdk_win32_blit (gboolean use_fg_bg, ...@@ -1722,7 +1719,7 @@ _gdk_win32_blit (gboolean use_fg_bg,
else else
g_assert_not_reached (); 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); gdk_drawable_get_size (src, &src_width, &src_height);
...@@ -1788,15 +1785,15 @@ _gdk_win32_blit (gboolean use_fg_bg, ...@@ -1788,15 +1785,15 @@ _gdk_win32_blit (gboolean use_fg_bg,
GDI_CALL (DeleteObject, (draw_rgn)); 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, blit_from_pixmap (use_fg_bg, draw_impl, hdc,
(GdkPixmapImplWin32 *) src_impl, gc, (GdkPixmapImplWin32 *) src_impl, gc,
xsrc, ysrc, xdest, ydest, width, height); 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 else
blit_from_window (hdc, GDK_GC_WIN32 (gc), src_impl, xsrc, ysrc, xdest, ydest, width, height); 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 static void
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment