[quartz] Remove extra reference on layer's cairo_surface.
This commit is contained in:
parent
f48bed22db
commit
09dd73feeb
@ -453,7 +453,7 @@ copy_rectangle_argb32 (cairo_surface_t *dest, cairo_surface_t *source,
|
|||||||
|
|
||||||
cairo_surface_destroy (cvpb_surface);
|
cairo_surface_destroy (cvpb_surface);
|
||||||
cairo_region_destroy (bounds_region);
|
cairo_region_destroy (bounds_region);
|
||||||
_gdk_quartz_unref_cairo_surface (gdk_window);
|
_gdk_quartz_unref_cairo_surface (gdk_window); // reffed in gdk_window_impl_quartz_begin_paint
|
||||||
CVPixelBufferUnlockBaseAddress (pixels, 0);
|
CVPixelBufferUnlockBaseAddress (pixels, 0);
|
||||||
--impl->in_paint_rect_count;
|
--impl->in_paint_rect_count;
|
||||||
self.layer.contents = NULL;
|
self.layer.contents = NULL;
|
||||||
|
@ -352,7 +352,7 @@ gdk_window_impl_quartz_init (GdkWindowImplQuartz *impl)
|
|||||||
static gboolean
|
static gboolean
|
||||||
gdk_window_impl_quartz_begin_paint (GdkWindow *window)
|
gdk_window_impl_quartz_begin_paint (GdkWindow *window)
|
||||||
{
|
{
|
||||||
gdk_quartz_ref_cairo_surface (window);
|
gdk_quartz_ref_cairo_surface (window); //unreffed in GdkQuartzView::updateLayer
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1386,6 +1386,7 @@ move_resize_window_internal (GdkWindow *window,
|
|||||||
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
|
frame_rect = [impl->toplevel frameRectForContentRect:content_rect];
|
||||||
[impl->toplevel setFrame:frame_rect display:YES];
|
[impl->toplevel setFrame:frame_rect display:YES];
|
||||||
impl->cairo_surface = gdk_quartz_ref_cairo_surface (window);
|
impl->cairo_surface = gdk_quartz_ref_cairo_surface (window);
|
||||||
|
cairo_surface_destroy (impl->cairo_surface); // Remove the extra reference
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user