- Remove all DisplayState knowledge from devices.
*/
-#include "hw.h"
-#include "console.h"
-#include "framebuffer.h"
+#include "hw/hw.h"
+#include "ui/console.h"
+#include "hw/framebuffer.h"
/* Render an image from a shared memory framebuffer. */
void framebuffer_update_display(
- DisplayState *ds,
+ DisplaySurface *ds,
MemoryRegion *address_space,
- target_phys_addr_t base,
+ hwaddr base,
int cols, /* Width in pixels. */
- int rows, /* Leight in pixels. */
+ int rows, /* Height in pixels. */
int src_width, /* Length of source line, in bytes. */
int dest_row_pitch, /* Bytes between adjacent horizontal output pixels. */
int dest_col_pitch, /* Bytes between adjacent vertical output pixels. */
int *first_row, /* Input and output. */
int *last_row /* Output only */)
{
- target_phys_addr_t src_len;
+ hwaddr src_len;
uint8_t *dest;
uint8_t *src;
uint8_t *src_base;
return;
}
src = src_base;
- dest = ds_get_data(ds);
+ dest = surface_data(ds);
if (dest_col_pitch < 0)
dest -= dest_col_pitch * (cols - 1);
if (dest_row_pitch < 0) {
dest += i * dest_row_pitch;
for (; i < rows; i++) {
- target_phys_addr_t dirty_offset;
- dirty = 0;
- dirty_offset = 0;
- while (addr + dirty_offset < TARGET_PAGE_ALIGN(addr + src_width)) {
- dirty |= memory_region_get_dirty(mem, addr + dirty_offset,
+ dirty = memory_region_get_dirty(mem, addr, src_width,
DIRTY_MEMORY_VGA);
- dirty_offset += TARGET_PAGE_SIZE;
- }
-
if (dirty || invalidate) {
fn(opaque, dest, src, cols, dest_col_pitch);
if (first == -1)
DIRTY_MEMORY_VGA);
*first_row = first;
*last_row = last;
- return;
}