diff --git a/cogl/cogl-material-private.h b/cogl/cogl-material-private.h index b3820e25d..0e7a2557c 100644 --- a/cogl/cogl-material-private.h +++ b/cogl/cogl-material-private.h @@ -606,6 +606,15 @@ _cogl_material_layer_has_user_matrix (CoglMaterialLayer *layer); void _cogl_material_layer_pre_paint (CoglMaterialLayer *layerr); +/* + * Calls the pre_paint method on the layer texture if there is + * one. This will determine whether mipmaps are needed based on the + * filter settings. + */ +void +_cogl_material_pre_paint_for_layer (CoglMaterial *material, + int layer_id); + /* * CoglMaterialFlushFlag: * @COGL_MATERIAL_FLUSH_FALLBACK_MASK: The fallback_layers member is set to diff --git a/cogl/cogl-material.c b/cogl/cogl-material.c index f829e08fe..3fe547789 100644 --- a/cogl/cogl-material.c +++ b/cogl/cogl-material.c @@ -5237,6 +5237,14 @@ _cogl_material_layer_pre_paint (CoglMaterialLayer *layer) } } +void +_cogl_material_pre_paint_for_layer (CoglMaterial *material, + int layer_id) +{ + CoglMaterialLayer *layer = _cogl_material_get_layer (material, layer_id); + _cogl_material_layer_pre_paint (layer); +} + CoglMaterialFilter cogl_material_layer_get_min_filter (CoglMaterialLayer *layer) {