src/video/mir/SDL_mirframebuffer.c
changeset 8159 427e8fdf6f69
parent 8157 f5d262613ed2
child 8300 8393682d9d96
     1.1 --- a/src/video/mir/SDL_mirframebuffer.c	Mon Feb 03 11:14:25 2014 -0500
     1.2 +++ b/src/video/mir/SDL_mirframebuffer.c	Mon Feb 03 11:52:54 2014 -0500
     1.3 @@ -31,6 +31,8 @@
     1.4  #include "SDL_mirframebuffer.h"
     1.5  #include "SDL_mirwindow.h"
     1.6  
     1.7 +#include "SDL_mirdyn.h"
     1.8 +
     1.9  static const Uint32 mir_pixel_format_to_sdl_format[] = {
    1.10      SDL_PIXELFORMAT_UNKNOWN,  /* mir_pixel_format_invalid   */
    1.11      SDL_PIXELFORMAT_ABGR8888, /* mir_pixel_format_abgr_8888 */
    1.12 @@ -59,7 +61,7 @@
    1.13  
    1.14      mir_window = window->driverdata;
    1.15  
    1.16 -    mir_surface_get_parameters(mir_window->surface, &surfaceparm);
    1.17 +    MIR_mir_surface_get_parameters(mir_window->surface, &surfaceparm);
    1.18  
    1.19      *format = MIR_GetSDLPixelFormat(surfaceparm.pixel_format);
    1.20      if (*format == SDL_PIXELFORMAT_UNKNOWN)
    1.21 @@ -71,9 +73,9 @@
    1.22      if (*pixels == NULL)
    1.23          return SDL_OutOfMemory();
    1.24  
    1.25 -    mir_window->surface = mir_connection_create_surface_sync(mir_data->connection, &surfaceparm);
    1.26 -    if (!mir_surface_is_valid(mir_window->surface)) {
    1.27 -        const char* error = mir_surface_get_error_message(mir_window->surface);
    1.28 +    mir_window->surface = MIR_mir_connection_create_surface_sync(mir_data->connection, &surfaceparm);
    1.29 +    if (!MIR_mir_surface_is_valid(mir_window->surface)) {
    1.30 +        const char* error = MIR_mir_surface_get_error_message(mir_window->surface);
    1.31          return SDL_SetError("Failed to created a mir surface: %s", error);
    1.32      }
    1.33  
    1.34 @@ -90,7 +92,7 @@
    1.35      int i, j, x, y, w, h, start;
    1.36      int bytes_per_pixel, bytes_per_row, s_stride, d_stride;
    1.37  
    1.38 -    mir_surface_get_graphics_region(mir_window->surface, &region);
    1.39 +    MIR_mir_surface_get_graphics_region(mir_window->surface, &region);
    1.40  
    1.41      char* s_dest = region.vaddr;
    1.42      char* pixels = (char*)window->surface->pixels;
    1.43 @@ -138,7 +140,7 @@
    1.44          }
    1.45      }
    1.46  
    1.47 -    mir_surface_swap_buffers_sync(mir_window->surface);
    1.48 +    MIR_mir_surface_swap_buffers_sync(mir_window->surface);
    1.49  
    1.50      return 0;
    1.51  }