mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +00:00
Give buffer/bitmap bind functions gl infix
The buffer and bitmap _bind() functions are GL specific so to clarify that, this patch adds a _gl infix to these functions, though it doesn't yet move the implementations out into gl specific files. Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 6371fbb9637d88ff187dfb6c4bcd18468ba44d19)
This commit is contained in:
@ -312,7 +312,7 @@ _cogl_gl_flush_attributes_state (CoglFramebuffer *framebuffer,
|
||||
|
||||
attribute_buffer = cogl_attribute_get_buffer (attribute);
|
||||
buffer = COGL_BUFFER (attribute_buffer);
|
||||
base = _cogl_buffer_bind (buffer, COGL_BUFFER_BIND_TARGET_ATTRIBUTE_BUFFER);
|
||||
base = _cogl_buffer_gl_bind (buffer, COGL_BUFFER_BIND_TARGET_ATTRIBUTE_BUFFER);
|
||||
|
||||
switch (attribute->name_state->name_id)
|
||||
{
|
||||
@ -388,7 +388,7 @@ _cogl_gl_flush_attributes_state (CoglFramebuffer *framebuffer,
|
||||
g_warning ("Unrecognised attribute type 0x%08x", attribute->type);
|
||||
}
|
||||
|
||||
_cogl_buffer_unbind (buffer);
|
||||
_cogl_buffer_gl_unbind (buffer);
|
||||
}
|
||||
|
||||
apply_attribute_enable_updates (ctx, pipeline);
|
||||
|
@ -1066,7 +1066,7 @@ _cogl_framebuffer_gl_draw_indexed_attributes (CoglFramebuffer *framebuffer,
|
||||
attributes, n_attributes);
|
||||
|
||||
buffer = COGL_BUFFER (cogl_indices_get_buffer (indices));
|
||||
base = _cogl_buffer_bind (buffer, COGL_BUFFER_BIND_TARGET_INDEX_BUFFER);
|
||||
base = _cogl_buffer_gl_bind (buffer, COGL_BUFFER_BIND_TARGET_INDEX_BUFFER);
|
||||
buffer_offset = cogl_indices_get_offset (indices);
|
||||
index_size = sizeof_index_type (cogl_indices_get_type (indices));
|
||||
|
||||
@ -1089,5 +1089,5 @@ _cogl_framebuffer_gl_draw_indexed_attributes (CoglFramebuffer *framebuffer,
|
||||
indices_gl_type,
|
||||
base + buffer_offset + index_size * first_vertex));
|
||||
|
||||
_cogl_buffer_unbind (buffer);
|
||||
_cogl_buffer_gl_unbind (buffer);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
||||
CoglPixelFormat source_format = cogl_bitmap_get_format (source_bmp);
|
||||
int bpp = _cogl_pixel_format_get_bytes_per_pixel (source_format);
|
||||
|
||||
data = _cogl_bitmap_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
data = _cogl_bitmap_gl_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
|
||||
/* Setup gl alignment to match rowstride and top-left corner */
|
||||
prep_gl_for_pixels_upload_full (ctx,
|
||||
@ -188,7 +188,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
||||
source_gl_type,
|
||||
data) );
|
||||
|
||||
_cogl_bitmap_unbind (source_bmp);
|
||||
_cogl_bitmap_gl_unbind (source_bmp);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -205,7 +205,7 @@ _cogl_texture_driver_upload_to_gl (CoglContext *ctx,
|
||||
CoglPixelFormat source_format = cogl_bitmap_get_format (source_bmp);
|
||||
int bpp = _cogl_pixel_format_get_bytes_per_pixel (source_format);
|
||||
|
||||
data = _cogl_bitmap_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
data = _cogl_bitmap_gl_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
|
||||
/* Setup gl alignment to match rowstride and top-left corner */
|
||||
prep_gl_for_pixels_upload_full (ctx,
|
||||
@ -223,7 +223,7 @@ _cogl_texture_driver_upload_to_gl (CoglContext *ctx,
|
||||
source_gl_type,
|
||||
data) );
|
||||
|
||||
_cogl_bitmap_unbind (source_bmp);
|
||||
_cogl_bitmap_gl_unbind (source_bmp);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -242,7 +242,7 @@ _cogl_texture_driver_upload_to_gl_3d (CoglContext *ctx,
|
||||
CoglPixelFormat source_format = cogl_bitmap_get_format (source_bmp);
|
||||
int bpp = _cogl_pixel_format_get_bytes_per_pixel (source_format);
|
||||
|
||||
data = _cogl_bitmap_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
data = _cogl_bitmap_gl_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
|
||||
/* Setup gl alignment to match rowstride and top-left corner */
|
||||
prep_gl_for_pixels_upload_full (ctx,
|
||||
@ -264,7 +264,7 @@ _cogl_texture_driver_upload_to_gl_3d (CoglContext *ctx,
|
||||
source_gl_type,
|
||||
data) );
|
||||
|
||||
_cogl_bitmap_unbind (source_bmp);
|
||||
_cogl_bitmap_gl_unbind (source_bmp);
|
||||
}
|
||||
|
||||
static CoglBool
|
||||
|
@ -217,7 +217,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
||||
/* Setup gl alignment to match rowstride and top-left corner */
|
||||
prep_gl_for_pixels_upload_full (ctx, rowstride, src_x, src_y, bpp);
|
||||
|
||||
data = _cogl_bitmap_bind (slice_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
data = _cogl_bitmap_gl_bind (slice_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
|
||||
_cogl_bind_gl_texture_transient (gl_target, gl_handle, is_foreign);
|
||||
|
||||
@ -228,7 +228,7 @@ _cogl_texture_driver_upload_subregion_to_gl (CoglContext *ctx,
|
||||
source_gl_type,
|
||||
data) );
|
||||
|
||||
_cogl_bitmap_unbind (slice_bmp);
|
||||
_cogl_bitmap_gl_unbind (slice_bmp);
|
||||
|
||||
cogl_object_unref (slice_bmp);
|
||||
}
|
||||
@ -259,7 +259,7 @@ _cogl_texture_driver_upload_to_gl (CoglContext *ctx,
|
||||
|
||||
_cogl_bind_gl_texture_transient (gl_target, gl_handle, is_foreign);
|
||||
|
||||
data = _cogl_bitmap_bind (bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
data = _cogl_bitmap_gl_bind (bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
|
||||
GE( ctx, glTexImage2D (gl_target, 0,
|
||||
internal_gl_format,
|
||||
@ -269,7 +269,7 @@ _cogl_texture_driver_upload_to_gl (CoglContext *ctx,
|
||||
source_gl_type,
|
||||
data) );
|
||||
|
||||
_cogl_bitmap_unbind (bmp);
|
||||
_cogl_bitmap_gl_unbind (bmp);
|
||||
|
||||
cogl_object_unref (bmp);
|
||||
}
|
||||
@ -336,8 +336,8 @@ _cogl_texture_driver_upload_to_gl_3d (CoglContext *ctx,
|
||||
bmp_width,
|
||||
height);
|
||||
|
||||
data = _cogl_bitmap_bind (bmp,
|
||||
COGL_BUFFER_ACCESS_READ, 0);
|
||||
data = _cogl_bitmap_gl_bind (bmp,
|
||||
COGL_BUFFER_ACCESS_READ, 0);
|
||||
|
||||
GE( ctx, glTexSubImage3D (gl_target,
|
||||
0, /* level */
|
||||
@ -351,14 +351,14 @@ _cogl_texture_driver_upload_to_gl_3d (CoglContext *ctx,
|
||||
source_gl_type,
|
||||
data) );
|
||||
|
||||
_cogl_bitmap_unbind (bmp);
|
||||
_cogl_bitmap_gl_unbind (bmp);
|
||||
}
|
||||
|
||||
cogl_object_unref (bmp);
|
||||
}
|
||||
else
|
||||
{
|
||||
data = _cogl_bitmap_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
data = _cogl_bitmap_gl_bind (source_bmp, COGL_BUFFER_ACCESS_READ, 0);
|
||||
|
||||
_cogl_texture_driver_prep_gl_for_pixels_upload (ctx, rowstride, bpp);
|
||||
|
||||
@ -373,7 +373,7 @@ _cogl_texture_driver_upload_to_gl_3d (CoglContext *ctx,
|
||||
source_gl_type,
|
||||
data) );
|
||||
|
||||
_cogl_bitmap_unbind (source_bmp);
|
||||
_cogl_bitmap_gl_unbind (source_bmp);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user