Commit 9d89e498 authored by Benjamin Otte's avatar Benjamin Otte

gskcairo: Don't store the viewport in the global struct

Just query it locally.
parent b1278c36
......@@ -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);
......
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