mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-11 03:10:09 +00:00
gskcairo: Don't store the viewport in the global struct
Just query it locally.
This commit is contained in:
parent
d2622d93ad
commit
98086014d8
@ -18,8 +18,6 @@ struct _GskCairoRenderer
|
||||
{
|
||||
GskRenderer parent_instance;
|
||||
|
||||
graphene_rect_t viewport;
|
||||
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
ProfileTimers profile_timers;
|
||||
#endif
|
||||
@ -52,6 +50,7 @@ gsk_cairo_renderer_render (GskRenderer *renderer,
|
||||
{
|
||||
GskCairoRenderer *self = GSK_CAIRO_RENDERER (renderer);
|
||||
GdkDrawingContext *context = gsk_renderer_get_drawing_context (renderer);
|
||||
graphene_rect_t viewport;
|
||||
#ifdef G_ENABLE_DEBUG
|
||||
GskProfiler *profiler;
|
||||
gint64 cpu_time;
|
||||
@ -63,17 +62,17 @@ gsk_cairo_renderer_render (GskRenderer *renderer,
|
||||
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
gsk_renderer_get_viewport (renderer, &self->viewport);
|
||||
gsk_renderer_get_viewport (renderer, &viewport);
|
||||
|
||||
if (GSK_RENDER_MODE_CHECK (GEOMETRY))
|
||||
{
|
||||
cairo_save (cr);
|
||||
cairo_set_operator (cr, CAIRO_OPERATOR_OVER);
|
||||
cairo_rectangle (cr,
|
||||
self->viewport.origin.x,
|
||||
self->viewport.origin.y,
|
||||
self->viewport.size.width,
|
||||
self->viewport.size.height);
|
||||
viewport.origin.x,
|
||||
viewport.origin.y,
|
||||
viewport.size.width,
|
||||
viewport.size.height);
|
||||
cairo_set_source_rgba (cr, 0, 0, 0.85, 0.5);
|
||||
cairo_stroke (cr);
|
||||
cairo_restore (cr);
|
||||
|
Loading…
Reference in New Issue
Block a user