~mir-team/mir/development-branch

« back to all changes in this revision

Viewing changes to tests/draw/android_graphics.cpp

  • Committer: Daniel van Vugt
  • Author(s): Kevin DuBois
  • Date: 2013-11-13 02:55:46 UTC
  • mfrom: (1062.1.23 mali-client-render-support)
  • Revision ID: daniel.van.vugt@canonical.com-20131113025546-2u059ffogt5yj2yz
android: support driver hooks for the Mali T604 (present in nexus 10)

The exynos driver needed some function hooks implemented. This change
implements those hooks and gets the TestClientIPCRender test to pass. This
test sends buffers over IPC to a client, and the client then establishes an
egl context, renders to the buffer, and checks the buffer content back on the
server side.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
 
20
20
#include "mir_test/draw/android_graphics.h"
 
21
#include "mir/geometry/pixel_format.h"
21
22
 
22
23
#include <fstream>
23
24
#include <stdexcept>
106
107
    RegionDeleter del(module, package->handle);
107
108
 
108
109
    region->vaddr = (char*) vaddr;
109
 
    region->stride = package->stride;
 
110
    region->stride = package->stride * geom::bytes_per_pixel(geom::PixelFormat::abgr_8888);
110
111
    region->width = package->width;
111
112
    region->height = package->height;
112
113
    region->pixel_format = mir_pixel_format_abgr_8888;