[mutter] cogl: Remove COGL_PRIVATE_FEATURE_GL_EMBEDDED



commit 68d0c11d88c3493d9cab8442ca38cc2e45ee2a66
Author: Adam Jackson <ajax redhat com>
Date:   Wed Oct 23 12:02:30 2019 -0400

    cogl: Remove COGL_PRIVATE_FEATURE_GL_EMBEDDED
    
    Only the driver backend cares about this now, we can equivalently check
    that the driver is COGL_DRIVER_GLES2.
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/973

 cogl/cogl/cogl-private.h                   | 1 -
 cogl/cogl/cogl-renderer.c                  | 1 -
 cogl/cogl/driver/gl/cogl-pipeline-opengl.c | 7 +++----
 3 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/cogl/cogl/cogl-private.h b/cogl/cogl/cogl-private.h
index 6cdf2c086..bbf4a4af1 100644
--- a/cogl/cogl/cogl-private.h
+++ b/cogl/cogl/cogl-private.h
@@ -69,7 +69,6 @@ typedef enum
    * sets that can be shared by several GL apis */
   COGL_PRIVATE_FEATURE_ANY_GL,
   COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
-  COGL_PRIVATE_FEATURE_GL_EMBEDDED,
 
   COGL_N_PRIVATE_FEATURES
 } CoglPrivateFeature;
diff --git a/cogl/cogl/cogl-renderer.c b/cogl/cogl/cogl-renderer.c
index 1463aa842..d11151f97 100644
--- a/cogl/cogl/cogl-renderer.c
+++ b/cogl/cogl/cogl-renderer.c
@@ -113,7 +113,6 @@ static CoglDriverDescription _cogl_drivers[] =
     COGL_DRIVER_GLES2,
     "gles2",
     { COGL_PRIVATE_FEATURE_ANY_GL,
-      COGL_PRIVATE_FEATURE_GL_EMBEDDED,
       COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE,
       -1 },
     &_cogl_driver_gles,
diff --git a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
index f4baac312..4b16e22a1 100644
--- a/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
+++ b/cogl/cogl/driver/gl/cogl-pipeline-opengl.c
@@ -307,7 +307,7 @@ flush_depth_state (CoglContext *ctx,
   if ((ctx->depth_range_near_cache != depth_state->range_near ||
        ctx->depth_range_far_cache != depth_state->range_far))
     {
-      if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
+      if (ctx->driver == COGL_DRIVER_GLES2)
         GE (ctx, glDepthRangef (depth_state->range_near,
                                 depth_state->range_far));
       else
@@ -535,7 +535,7 @@ get_max_activateable_texture_units (void)
       int i;
 
 #ifdef HAVE_COGL_GL
-      if (!_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED))
+      if (ctx->driver != COGL_DRIVER_GLES2)
         {
           /* GL_MAX_TEXTURE_COORDS defines the number of texture coordinates
            * that can be uploaded (but doesn't necessarily relate to how many
@@ -548,8 +548,7 @@ get_max_activateable_texture_units (void)
 #endif /* HAVE_COGL_GL */
 
 #ifdef HAVE_COGL_GLES2
-      if (_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_EMBEDDED) &&
-          _cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_GL_PROGRAMMABLE))
+      if (ctx->driver == COGL_DRIVER_GLES2)
         {
           GE (ctx, glGetIntegerv (GL_MAX_VERTEX_ATTRIBS, values + n_values));
           /* Two of the vertex attribs need to be used for the position


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