Rename/move menu_texture to gfx/video_texture

This commit is contained in:
twinaphex 2015-03-20 02:19:19 +01:00
parent 873c306a41
commit a086e8f60b
6 changed files with 32 additions and 33 deletions

View File

@ -312,7 +312,6 @@ ifeq ($(HAVE_MENU_COMMON), 1)
menu/menu_setting.o \
menu/menu_database.o \
menu/menu_shader.o \
menu/menu_texture.o \
menu/menu_entries.o \
menu/menu_entries_cbs_ok.o \
menu/menu_entries_cbs_cancel.o \
@ -405,6 +404,7 @@ ifeq ($(HAVE_OPENGL), 1)
gfx/drivers_font/gl_raster_font.o \
libretro-common/gfx/math/matrix_4x4.o \
gfx/video_state_tracker.o \
gfx/video_texture.o \
libretro-common/glsym/rglgen.o
ifeq ($(HAVE_KMS), 1)

View File

@ -14,16 +14,15 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "menu_texture.h"
#include "video_texture.h"
#include <file/file_path.h>
#include "../general.h"
#include "../gfx/video_pixel_converter.h"
#include "../gfx/video_thread_wrapper.h"
#include "video_pixel_converter.h"
#include "video_thread_wrapper.h"
#ifdef HAVE_OPENGL
#include "../gfx/gl_common.h"
#include "gl_common.h"
static void menu_texture_png_load_gl(struct texture_image *ti,
static void video_texture_png_load_gl(struct texture_image *ti,
enum texture_filter_type filter_type,
unsigned *id)
{
@ -38,7 +37,7 @@ static void menu_texture_png_load_gl(struct texture_image *ti,
}
#endif
static unsigned menu_texture_png_load(void *data,
static unsigned video_texture_png_load(void *data,
enum texture_backend_type type,
enum texture_filter_type filter_type)
{
@ -51,7 +50,7 @@ static unsigned menu_texture_png_load(void *data,
{
case TEXTURE_BACKEND_OPENGL:
#ifdef HAVE_OPENGL
menu_texture_png_load_gl((struct texture_image*)data, filter_type, &id);
video_texture_png_load_gl((struct texture_image*)data, filter_type, &id);
#endif
break;
case TEXTURE_BACKEND_DEFAULT:
@ -62,25 +61,25 @@ static unsigned menu_texture_png_load(void *data,
return id;
}
static int menu_texture_png_load_wrap(void *data)
static int video_texture_png_load_wrap(void *data)
{
return menu_texture_png_load(data, TEXTURE_BACKEND_DEFAULT,
return video_texture_png_load(data, TEXTURE_BACKEND_DEFAULT,
TEXTURE_FILTER_LINEAR);
}
static int menu_texture_png_load_wrap_gl_mipmap(void *data)
static int video_texture_png_load_wrap_gl_mipmap(void *data)
{
return menu_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
return video_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
TEXTURE_FILTER_MIPMAP_LINEAR);
}
static int menu_texture_png_load_wrap_gl(void *data)
static int video_texture_png_load_wrap_gl(void *data)
{
return menu_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
return video_texture_png_load(data, TEXTURE_BACKEND_OPENGL,
TEXTURE_FILTER_LINEAR);
}
unsigned menu_texture_load(void *data,
unsigned video_texture_load(void *data,
enum texture_backend_type type,
enum texture_filter_type filter_type)
{
@ -98,13 +97,13 @@ unsigned menu_texture_load(void *data,
case TEXTURE_BACKEND_OPENGL:
if (filter_type == TEXTURE_FILTER_MIPMAP_LINEAR ||
filter_type == TEXTURE_FILTER_MIPMAP_NEAREST)
thr->cmd_data.custom_command.method = menu_texture_png_load_wrap_gl_mipmap;
thr->cmd_data.custom_command.method = video_texture_png_load_wrap_gl_mipmap;
else
thr->cmd_data.custom_command.method = menu_texture_png_load_wrap_gl;
thr->cmd_data.custom_command.method = video_texture_png_load_wrap_gl;
break;
case TEXTURE_BACKEND_DEFAULT:
default:
thr->cmd_data.custom_command.method = menu_texture_png_load_wrap;
thr->cmd_data.custom_command.method = video_texture_png_load_wrap;
break;
}
@ -116,5 +115,5 @@ unsigned menu_texture_load(void *data,
return thr->cmd_data.custom_command.return_value;
}
return menu_texture_png_load(data, type, filter_type);
return video_texture_png_load(data, type, filter_type);
}

View File

@ -14,10 +14,10 @@
* If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _MENU_TEXTURE_MANAGER_H
#define _MENU_TEXTURE_MANAGER_H
#ifndef _VIDEO_TEXTURE_H
#define _VIDEO_TEXTURE_H
#include "../gfx/video_driver.h"
#include "video_driver.h"
enum texture_backend_type
{
@ -29,7 +29,7 @@ enum texture_backend_type
extern "C" {
#endif
unsigned menu_texture_load(void *data,
unsigned video_texture_load(void *data,
enum texture_backend_type type,
enum texture_filter_type filter_type);

View File

@ -169,6 +169,7 @@ VIDEO IMAGE
============================================================ */
#include "../gfx/image/image.c"
#include "../gfx/video_texture.c"
#include "../libretro-common/formats/tga/tga_decode.c"
#include "../libretro-common/formats/png/rpng_fbio.c"
@ -695,7 +696,6 @@ MENU
#include "../menu/menu_entries_cbs_contentlist_switch.c"
#include "../menu/menu_entries_cbs.c"
#include "../menu/menu_shader.c"
#include "../menu/menu_texture.c"
#include "../menu/menu_navigation.c"
#include "../menu/menu_animation.c"
#include "../menu/menu_database.c"

View File

@ -22,10 +22,10 @@
#include <limits.h>
#include "../menu.h"
#include "../menu_texture.h"
#include <file/file_path.h>
#include "../../gfx/gl_common.h"
#include "../../gfx/video_texture.h"
#include <compat/posix_string.h>
#include "shared.h"
@ -546,7 +546,7 @@ static bool glui_load_wallpaper(void *data)
if (glui->textures.bg.id)
glDeleteTextures(1, &glui->textures.bg.id);
glui->textures.bg.id = menu_texture_load(data,
glui->textures.bg.id = video_texture_load(data,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
return true;

View File

@ -22,11 +22,11 @@
#include "../menu.h"
#include "../menu_animation.h"
#include "../menu_texture.h"
#include <file/file_path.h>
#include "../../gfx/gl_common.h"
#include "../../gfx/video_thread_wrapper.h"
#include "../../gfx/gl_common.h"
#include "../../gfx/video_texture.h"
#include <compat/posix_string.h>
#include <string/stdstring.h>
@ -1545,7 +1545,7 @@ static bool xmb_load_wallpaper(void *data)
if (xmb->textures.bg.id)
glDeleteTextures(1, &xmb->textures.bg.id);
xmb->textures.bg.id = menu_texture_load(data,
xmb->textures.bg.id = video_texture_load(data,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
@ -1652,7 +1652,7 @@ static void xmb_context_reset(void)
texture_image_load(&ti, path);
xmb->textures.list[k].id = menu_texture_load(&ti,
xmb->textures.list[k].id = video_texture_load(&ti,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
texture_image_free(&ti);
@ -1738,14 +1738,14 @@ static void xmb_context_reset(void)
texture_image_load(&ti, texturepath);
node->icon = menu_texture_load(&ti,
node->icon = video_texture_load(&ti,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
texture_image_free(&ti);
texture_image_load(&ti, content_texturepath);
node->content_icon = menu_texture_load(&ti,
node->content_icon = video_texture_load(&ti,
TEXTURE_BACKEND_OPENGL, TEXTURE_FILTER_MIPMAP_LINEAR);
texture_image_free(&ti);