|
|
1a3082 |
From 579c85d17b17fc7ad3d6c88af39932ce8faeaabe Mon Sep 17 00:00:00 2001
|
|
|
1a3082 |
From: Pekka Paalanen <pekka.paalanen@collabora.com>
|
|
|
1a3082 |
Date: Mon, 6 May 2019 15:58:33 +0300
|
|
|
1a3082 |
Subject: [PATCH 06/12] cogl: Rename feature OFFSCREEN_BLIT to BLIT_FRAMEBUFFER
|
|
|
1a3082 |
|
|
|
1a3082 |
The feature is not limited to offscreen framebuffer blits anymore since
|
|
|
1a3082 |
"cogl: Allow glBlitFramebuffer between onscreen/offscreen".
|
|
|
1a3082 |
|
|
|
1a3082 |
https://gitlab.gnome.org/GNOME/mutter/merge_requests/615
|
|
|
1a3082 |
|
|
|
1a3082 |
(cherry picked from commit 55c084e6e1059d8f94c699b01c408523ed504196)
|
|
|
1a3082 |
---
|
|
|
1a3082 |
cogl/cogl/cogl-blit.c | 2 +-
|
|
|
1a3082 |
cogl/cogl/cogl-framebuffer-private.h | 2 +-
|
|
|
1a3082 |
cogl/cogl/cogl-framebuffer.c | 2 +-
|
|
|
1a3082 |
cogl/cogl/cogl-private.h | 2 +-
|
|
|
1a3082 |
cogl/cogl/driver/gl/cogl-framebuffer-gl.c | 2 +-
|
|
|
1a3082 |
cogl/cogl/driver/gl/gl/cogl-driver-gl.c | 2 +-
|
|
|
1a3082 |
cogl/cogl/driver/gl/gles/cogl-driver-gles.c | 2 +-
|
|
|
1a3082 |
7 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
1a3082 |
|
|
|
1a3082 |
diff --git a/cogl/cogl/cogl-blit.c b/cogl/cogl/cogl-blit.c
|
|
|
1a3082 |
index a61eb66d2..c561b2e45 100644
|
|
|
1a3082 |
--- a/cogl/cogl/cogl-blit.c
|
|
|
1a3082 |
+++ b/cogl/cogl/cogl-blit.c
|
|
|
1a3082 |
@@ -158,7 +158,7 @@ _cogl_blit_framebuffer_begin (CoglBlitData *data)
|
|
|
1a3082 |
supported. */
|
|
|
1a3082 |
if ((_cogl_texture_get_format (data->src_tex) & COGL_PREMULT_BIT) !=
|
|
|
1a3082 |
(_cogl_texture_get_format (data->dst_tex) & COGL_PREMULT_BIT) ||
|
|
|
1a3082 |
- !_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT))
|
|
|
1a3082 |
+ !_cogl_has_private_feature (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER))
|
|
|
1a3082 |
return FALSE;
|
|
|
1a3082 |
|
|
|
1a3082 |
dst_offscreen = _cogl_offscreen_new_with_texture_full
|
|
|
1a3082 |
diff --git a/cogl/cogl/cogl-framebuffer-private.h b/cogl/cogl/cogl-framebuffer-private.h
|
|
|
1a3082 |
index f68153d8b..cb1f87354 100644
|
|
|
1a3082 |
--- a/cogl/cogl/cogl-framebuffer-private.h
|
|
|
1a3082 |
+++ b/cogl/cogl/cogl-framebuffer-private.h
|
|
|
1a3082 |
@@ -380,7 +380,7 @@ _cogl_push_framebuffers (CoglFramebuffer *draw_buffer,
|
|
|
1a3082 |
*
|
|
|
1a3082 |
* This blits a region of the color buffer of the source buffer
|
|
|
1a3082 |
* to the destination buffer. This function should only be
|
|
|
1a3082 |
- * called if the COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT feature is
|
|
|
1a3082 |
+ * called if the COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER feature is
|
|
|
1a3082 |
* advertised.
|
|
|
1a3082 |
*
|
|
|
1a3082 |
* The source and destination rectangles are defined in offscreen
|
|
|
1a3082 |
diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c
|
|
|
1a3082 |
index 90976a611..5cc4eada4 100644
|
|
|
1a3082 |
--- a/cogl/cogl/cogl-framebuffer.c
|
|
|
1a3082 |
+++ b/cogl/cogl/cogl-framebuffer.c
|
|
|
1a3082 |
@@ -1464,7 +1464,7 @@ _cogl_blit_framebuffer (CoglFramebuffer *src,
|
|
|
1a3082 |
int dst_x1, dst_y1, dst_x2, dst_y2;
|
|
|
1a3082 |
|
|
|
1a3082 |
_COGL_RETURN_IF_FAIL (_cogl_has_private_feature
|
|
|
1a3082 |
- (ctx, COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT));
|
|
|
1a3082 |
+ (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER));
|
|
|
1a3082 |
|
|
|
1a3082 |
/* The buffers must use the same premult convention */
|
|
|
1a3082 |
_COGL_RETURN_IF_FAIL ((src->internal_format & COGL_PREMULT_BIT) ==
|
|
|
1a3082 |
diff --git a/cogl/cogl/cogl-private.h b/cogl/cogl/cogl-private.h
|
|
|
1a3082 |
index 9f918b851..d9fbe68c7 100644
|
|
|
1a3082 |
--- a/cogl/cogl/cogl-private.h
|
|
|
1a3082 |
+++ b/cogl/cogl/cogl-private.h
|
|
|
1a3082 |
@@ -42,7 +42,7 @@ typedef enum
|
|
|
1a3082 |
{
|
|
|
1a3082 |
COGL_PRIVATE_FEATURE_TEXTURE_2D_FROM_EGL_IMAGE,
|
|
|
1a3082 |
COGL_PRIVATE_FEATURE_MESA_PACK_INVERT,
|
|
|
1a3082 |
- COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT,
|
|
|
1a3082 |
+ COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER,
|
|
|
1a3082 |
COGL_PRIVATE_FEATURE_FOUR_CLIP_PLANES,
|
|
|
1a3082 |
COGL_PRIVATE_FEATURE_PBOS,
|
|
|
1a3082 |
COGL_PRIVATE_FEATURE_VBOS,
|
|
|
1a3082 |
diff --git a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
|
|
|
1a3082 |
index 83e1d263a..90d08954d 100644
|
|
|
1a3082 |
--- a/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
|
|
|
1a3082 |
+++ b/cogl/cogl/driver/gl/cogl-framebuffer-gl.c
|
|
|
1a3082 |
@@ -402,7 +402,7 @@ _cogl_framebuffer_gl_flush_state (CoglFramebuffer *draw_buffer,
|
|
|
1a3082 |
/* NB: Currently we only take advantage of binding separate
|
|
|
1a3082 |
* read/write buffers for framebuffer blit purposes. */
|
|
|
1a3082 |
_COGL_RETURN_IF_FAIL (_cogl_has_private_feature
|
|
|
1a3082 |
- (ctx, COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT));
|
|
|
1a3082 |
+ (ctx, COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER));
|
|
|
1a3082 |
|
|
|
1a3082 |
_cogl_framebuffer_gl_bind (draw_buffer, GL_DRAW_FRAMEBUFFER);
|
|
|
1a3082 |
_cogl_framebuffer_gl_bind (read_buffer, GL_READ_FRAMEBUFFER);
|
|
|
1a3082 |
diff --git a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
|
|
|
1a3082 |
index 4d46844d5..e06e27961 100644
|
|
|
1a3082 |
--- a/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
|
|
|
1a3082 |
+++ b/cogl/cogl/driver/gl/gl/cogl-driver-gl.c
|
|
|
1a3082 |
@@ -467,7 +467,7 @@ _cogl_driver_update_features (CoglContext *ctx,
|
|
|
1a3082 |
|
|
|
1a3082 |
if (ctx->glBlitFramebuffer)
|
|
|
1a3082 |
COGL_FLAGS_SET (private_features,
|
|
|
1a3082 |
- COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT, TRUE);
|
|
|
1a3082 |
+ COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER, TRUE);
|
|
|
1a3082 |
|
|
|
1a3082 |
if (ctx->glRenderbufferStorageMultisampleIMG)
|
|
|
1a3082 |
{
|
|
|
1a3082 |
diff --git a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
|
|
|
1a3082 |
index 23158d5c7..bcb0bdf07 100644
|
|
|
1a3082 |
--- a/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
|
|
|
1a3082 |
+++ b/cogl/cogl/driver/gl/gles/cogl-driver-gles.c
|
|
|
1a3082 |
@@ -326,7 +326,7 @@ _cogl_driver_update_features (CoglContext *context,
|
|
|
1a3082 |
|
|
|
1a3082 |
if (context->glBlitFramebuffer)
|
|
|
1a3082 |
COGL_FLAGS_SET (private_features,
|
|
|
1a3082 |
- COGL_PRIVATE_FEATURE_OFFSCREEN_BLIT, TRUE);
|
|
|
1a3082 |
+ COGL_PRIVATE_FEATURE_BLIT_FRAMEBUFFER, TRUE);
|
|
|
1a3082 |
|
|
|
1a3082 |
if (_cogl_check_extension ("GL_OES_element_index_uint", gl_extensions))
|
|
|
1a3082 |
{
|
|
|
1a3082 |
--
|
|
|
1a3082 |
2.21.0
|
|
|
1a3082 |
|