[gtk+/wip/otte/rendernode: 24/29] gskcairo: Don't store the viewport in the global struct
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/rendernode: 24/29] gskcairo: Don't store the viewport in the global struct
- Date: Thu, 22 Dec 2016 03:30:01 +0000 (UTC)
commit 9d89e4981bfdeceeffc00876b4b8730db3cfa82f
Author: Benjamin Otte <otte redhat com>
Date: Wed Dec 21 20:07:16 2016 +0100
gskcairo: Don't store the viewport in the global struct
Just query it locally.
gsk/gskcairorenderer.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
---
diff --git a/gsk/gskcairorenderer.c b/gsk/gskcairorenderer.c
index 4589755..d112e4f 100644
--- a/gsk/gskcairorenderer.c
+++ b/gsk/gskcairorenderer.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]