Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dorota Czaplejewicz
gtk
Commits
62d004cf
Commit
62d004cf
authored
Nov 23, 2010
by
Benjamin Otte
Browse files
gdk: Remove _gdk_drawable_ref_cairo_surface()
Instead, call the vfunc directly from gdkWindow.c
parent
9d2abf81
Changes
3
Hide whitespace changes
Inline
Side-by-side
gdk/gdkdraw.c
View file @
62d004cf
...
...
@@ -50,22 +50,3 @@ gdk_drawable_init (GdkDrawable *drawable)
{
}
/**
* _gdk_drawable_ref_cairo_surface:
* @drawable: a #GdkDrawable
*
* Obtains a #cairo_surface_t for the given drawable. If a
* #cairo_surface_t for the drawable already exists, it will be
* referenced, otherwise a new surface will be created.
*
* Return value: a newly referenced #cairo_surface_t that points
* to @drawable. Unref with cairo_surface_destroy()
**/
cairo_surface_t
*
_gdk_drawable_ref_cairo_surface
(
GdkDrawable
*
drawable
)
{
g_return_val_if_fail
(
GDK_IS_DRAWABLE
(
drawable
),
NULL
);
return
GDK_DRAWABLE_GET_CLASS
(
drawable
)
->
ref_cairo_surface
(
drawable
);
}
gdk/gdkinternals.h
View file @
62d004cf
...
...
@@ -309,8 +309,6 @@ GdkDeviceManager * _gdk_device_manager_new (GdkDisplay *display);
gboolean
_gdk_cairo_surface_extents
(
cairo_surface_t
*
surface
,
GdkRectangle
*
extents
);
cairo_surface_t
*
_gdk_drawable_ref_cairo_surface
(
GdkDrawable
*
drawable
);
/*************************************
* Interfaces used by windowing code *
*************************************/
...
...
gdk/gdkwindow.c
View file @
62d004cf
...
...
@@ -2733,13 +2733,19 @@ gdk_window_begin_implicit_paint (GdkWindow *window, GdkRectangle *rect)
return
TRUE
;
}
static
cairo_surface_t
*
gdk_window_ref_impl_surface
(
GdkWindow
*
window
)
{
return
GDK_DRAWABLE_GET_CLASS
(
window
->
impl
)
->
ref_cairo_surface
(
window
->
impl
);
}
static
cairo_t
*
gdk_cairo_create_for_impl
(
GdkWindow
*
window
)
{
cairo_surface_t
*
surface
;
cairo_t
*
cr
;
surface =
_
gdk_
drawable_ref_cairo
_surface (window
->impl
);
surface
=
gdk_
window_ref_impl
_surface
(
window
);
cr
=
cairo_create
(
surface
);
cairo_surface_destroy
(
surface
);
...
...
@@ -3604,7 +3610,7 @@ gdk_window_create_cairo_surface (GdkWindow *window,
{
cairo_surface_t
*
surface
,
*
subsurface
;
surface =
_
gdk_
drawable_ref_cairo
_surface (window
->impl
);
surface
=
gdk_
window_ref_impl
_surface
(
window
);
if
(
gdk_window_has_impl
(
window
))
return
surface
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment