Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2010 Travis Geiselbrecht | 2 * Copyright (c) 2010 Travis Geiselbrecht |
| 3 * | 3 * |
| 4 * Permission is hereby granted, free of charge, to any person obtaining | 4 * Permission is hereby granted, free of charge, to any person obtaining |
| 5 * a copy of this software and associated documentation files | 5 * a copy of this software and associated documentation files |
| 6 * (the "Software"), to deal in the Software without restriction, | 6 * (the "Software"), to deal in the Software without restriction, |
| 7 * including without limitation the rights to use, copy, modify, merge, | 7 * including without limitation the rights to use, copy, modify, merge, |
| 8 * publish, distribute, sublicense, and/or sell copies of the Software, | 8 * publish, distribute, sublicense, and/or sell copies of the Software, |
| 9 * and to permit persons to whom the Software is furnished to do so, | 9 * and to permit persons to whom the Software is furnished to do so, |
| 10 * subject to the following conditions: | 10 * subject to the following conditions: |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 | 46 |
| 47 display_fb = (void *)DISPLAY_FRAMEBUFFER; | 47 display_fb = (void *)DISPLAY_FRAMEBUFFER; |
| 48 display_w = *REG32(DISPLAY_WIDTH); | 48 display_w = *REG32(DISPLAY_WIDTH); |
| 49 display_h = *REG32(DISPLAY_HEIGHT); | 49 display_h = *REG32(DISPLAY_HEIGHT); |
| 50 | 50 |
| 51 #if DRAW_TEST_PATTERN | 51 #if DRAW_TEST_PATTERN |
| 52 gfx_draw_pattern(); | 52 gfx_draw_pattern(); |
| 53 #endif | 53 #endif |
| 54 } | 54 } |
| 55 | 55 |
| 56 status_t display_get_framebuffer(struct display_framebuffer *fb) | |
| 57 { | |
|
gkalsi
2016/03/09 21:13:37
DEBUG_ASSERT(fb)
cdotstout
2016/03/09 22:48:00
Done.
| |
| 58 if (!has_display()) | |
| 59 return ERR_NOT_FOUND; | |
| 60 | |
| 61 fb->format = DISPLAY_FORMAT_RGB_x888; | |
| 62 fb->flush = NULL; | |
| 63 fb->image.format = IMAGE_FORMAT_RGB_x888; | |
| 64 fb->image.pixels = display_fb; | |
| 65 fb->image.width = display_w; | |
| 66 fb->image.height = display_h; | |
| 67 fb->image.rowbytes = display_w; | |
| 68 | |
| 69 return NO_ERROR; | |
| 70 } | |
| 71 | |
| 56 status_t display_get_info(struct display_info *info) | 72 status_t display_get_info(struct display_info *info) |
| 57 { | 73 { |
|
gkalsi
2016/03/09 21:13:37
DEBUG_ASSERT(info)
cdotstout
2016/03/09 22:48:00
Done.
| |
| 58 if (!has_display()) | 74 if (!has_display()) |
| 59 return ERR_NOT_FOUND; | 75 return ERR_NOT_FOUND; |
| 60 | 76 |
| 61 info->framebuffer = display_fb; | 77 info->format = DISPLAY_FORMAT_RGB_x888; |
| 62 info->format = GFX_FORMAT_RGB_x888; | |
| 63 info->width = display_w; | 78 info->width = display_w; |
| 64 info->height = display_h; | 79 info->height = display_h; |
| 65 info->stride = display_w; | |
| 66 info->flush = NULL; | |
| 67 | 80 |
| 68 return NO_ERROR; | 81 return NO_ERROR; |
| 69 } | 82 } |
| 70 | 83 |
| OLD | NEW |