Lines Matching refs:surface

47                                DisplaySurface *surface)  in surface_gl_create_texture()  argument
50 assert(QEMU_IS_ALIGNED(surface_stride(surface), surface_bytes_per_pixel(surface))); in surface_gl_create_texture()
52 if (surface->texture) { in surface_gl_create_texture()
56 switch (surface_format(surface)) { in surface_gl_create_texture()
59 surface->glformat = GL_BGRA_EXT; in surface_gl_create_texture()
60 surface->gltype = GL_UNSIGNED_BYTE; in surface_gl_create_texture()
64 surface->glformat = GL_RGBA; in surface_gl_create_texture()
65 surface->gltype = GL_UNSIGNED_BYTE; in surface_gl_create_texture()
68 surface->glformat = GL_RGB; in surface_gl_create_texture()
69 surface->gltype = GL_UNSIGNED_SHORT_5_6_5; in surface_gl_create_texture()
75 glGenTextures(1, &surface->texture); in surface_gl_create_texture()
77 glBindTexture(GL_TEXTURE_2D, surface->texture); in surface_gl_create_texture()
79 surface_stride(surface) / surface_bytes_per_pixel(surface)); in surface_gl_create_texture()
82 surface_width(surface), in surface_gl_create_texture()
83 surface_height(surface), in surface_gl_create_texture()
84 0, surface->glformat, surface->gltype, in surface_gl_create_texture()
85 surface_data(surface)); in surface_gl_create_texture()
87 glTexImage2D(GL_TEXTURE_2D, 0, surface->glformat, in surface_gl_create_texture()
88 surface_width(surface), in surface_gl_create_texture()
89 surface_height(surface), in surface_gl_create_texture()
90 0, surface->glformat, surface->gltype, in surface_gl_create_texture()
91 surface_data(surface)); in surface_gl_create_texture()
100 DisplaySurface *surface, in surface_gl_update_texture() argument
103 uint8_t *data = (void *)surface_data(surface); in surface_gl_update_texture()
107 if (surface->texture) { in surface_gl_update_texture()
108 glBindTexture(GL_TEXTURE_2D, surface->texture); in surface_gl_update_texture()
110 surface_stride(surface) in surface_gl_update_texture()
111 / surface_bytes_per_pixel(surface)); in surface_gl_update_texture()
114 surface->glformat, surface->gltype, in surface_gl_update_texture()
115 data + surface_stride(surface) * y in surface_gl_update_texture()
116 + surface_bytes_per_pixel(surface) * x); in surface_gl_update_texture()
121 DisplaySurface *surface) in surface_gl_render_texture() argument
132 DisplaySurface *surface) in surface_gl_destroy_texture() argument
134 if (!surface || !surface->texture) { in surface_gl_destroy_texture()
137 glDeleteTextures(1, &surface->texture); in surface_gl_destroy_texture()
138 surface->texture = 0; in surface_gl_destroy_texture()
142 DisplaySurface *surface, in surface_gl_setup_viewport() argument
150 gw = surface_width(surface); in surface_gl_setup_viewport()
151 gh = surface_height(surface); in surface_gl_setup_viewport()