[gtk/wip/chergert/opbuffer: 30/31] Merge branch 'wip/chergert/opbuffer'



commit 0f304e56077f418dc32aba61c506053e2746aa12
Merge: bcdc3b706c 843537c8e7
Author: Christian Hergert <chergert redhat com>
Date:   Sun Oct 13 18:33:53 2019 -0400

    Merge branch 'wip/chergert/opbuffer'
    
    # Conflicts:
    #       gsk/gl/gskglrenderer.c
    #       gsk/gl/gskglrenderops.c
    #       gsk/gl/gskglrenderopsprivate.h

 gsk/gl/gskglrenderer.c         | 453 ++++++++++++++++++++---------------------
 gsk/gl/gskglrenderops.c        | 283 ++++++++++---------------
 gsk/gl/gskglrenderopsprivate.h | 141 +------------
 gsk/gl/opbuffer.c              | 133 ++++++++++++
 gsk/gl/opbuffer.h              | 257 +++++++++++++++++++++++
 gsk/meson.build                |   1 +
 6 files changed, 727 insertions(+), 541 deletions(-)
---
diff --cc gsk/gl/gskglrenderer.c
index 913472f3af,5d5fa94a64..970e4efafb
--- a/gsk/gl/gskglrenderer.c
+++ b/gsk/gl/gskglrenderer.c
@@@ -1277,10 -1294,9 +1277,10 @@@ render_blur_node (GskGLRenderer       *
    const float max_x = min_x + node->bounds.size.width;
    const float max_y = min_y + node->bounds.size.height;
    const float blur_radius = gsk_blur_node_get_radius (node);
 +  GskRenderNode *child = gsk_blur_node_get_child (node);
    TextureRegion region;
    gboolean is_offscreen;
-   RenderOp *op;
+   OpBlur *op;
  
    if (blur_radius <= 0)
      {
@@@ -1367,25 -1383,26 +1367,25 @@@ render_unblurred_outset_shadow_node (Gs
                                       const GskQuadVertex *vertex_data)
  {
    const float scale = ops_get_scale (builder);
 +  const GskRoundedRect *outline = gsk_outset_shadow_node_peek_outline (node);
    const float spread = gsk_outset_shadow_node_get_spread (node);
 -  GskRoundedRect r = *gsk_outset_shadow_node_peek_outline (node);
 +  const float dx = gsk_outset_shadow_node_get_dx (node);
 +  const float dy = gsk_outset_shadow_node_get_dy (node);
-   RenderOp *op;
+   OpShadow *op;
  
    ops_set_program (builder, &self->unblurred_outset_shadow_program);
 -
    op = ops_begin (builder, OP_CHANGE_UNBLURRED_OUTSET_SHADOW);
-   rgba_to_float (gsk_outset_shadow_node_peek_color (node), op->unblurred_outset_shadow.color);
+   rgba_to_float (gsk_outset_shadow_node_peek_color (node), op->color);
  
 -  gsk_rounded_rect_shrink (&r, -spread, -spread, -spread, -spread);
 -
    rounded_rect_to_floats (self, builder,
 -                          &r,
 +                          outline,
-                           op->unblurred_outset_shadow.outline,
-                           op->unblurred_outset_shadow.corner_widths,
-                           op->unblurred_outset_shadow.corner_heights);
+                           op->outline,
+                           op->corner_widths,
+                           op->corner_heights);
  
-   op->unblurred_outset_shadow.spread = spread * scale;
-   op->unblurred_outset_shadow.offset[0] = dx * scale;
-   op->unblurred_outset_shadow.offset[1] = - dy * scale;
 -  op->spread = gsk_outset_shadow_node_get_spread (node) * scale;
 -  op->offset[0] = gsk_outset_shadow_node_get_dx (node) * scale;
 -  op->offset[1] = -gsk_outset_shadow_node_get_dy (node) * scale;
++  op->spread = spread * scale;
++  op->offset[0] = dx * scale;
++  op->offset[1] = - dy * scale;
  
    ops_draw (builder, vertex_data);
  }
@@@ -2101,16 -2118,13 +2104,16 @@@ apply_render_target_op (GskGLRendere
  }
  
  static inline void
- apply_color_op (const Program  *program,
-                 const RenderOp *op)
+ apply_color_op (const Program *program,
+                 const OpColor *op)
  {
    OP_PRINT (" -> Color: (%f, %f, %f, %f)",
-             op->color->red, op->color->green, op->color->blue, op->color->alpha);
+             op->rgba.red, op->rgba.green, op->rgba.blue, op->rgba.alpha);
    glUniform4f (program->color.color_location,
-                op->color->red,
-                op->color->green,
-                op->color->blue,
-                op->color->alpha);
 -               op->rgba.red, op->rgba.green, op->rgba.blue, op->rgba.alpha);
++               op->rgba.red,
++               op->rgba.green,
++               op->rgba.blue,
++               op->rgba.alpha);
  }
  
  static inline void


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]