~mir-team/mir/development-branch

« back to all changes in this revision

Viewing changes to src/shared/graphics/android/mir_native_window.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:
110
110
    return 0;
111
111
}
112
112
 
113
 
int cancelBuffer_deprecated_static(struct ANativeWindow* /*window*/,
114
 
                        struct ANativeWindowBuffer* /*buffer*/)
 
113
int cancelBuffer_deprecated_static(struct ANativeWindow* window,
 
114
                        struct ANativeWindowBuffer* buffer)
115
115
{
116
 
    return 0;
 
116
    return cancelBuffer_static(window, buffer, -1);
117
117
}
118
118
 
119
 
int cancelBuffer_static(struct ANativeWindow* /*window*/,
120
 
                        struct ANativeWindowBuffer* /*buffer*/, int /*fence_fd*/)
 
119
int cancelBuffer_static(struct ANativeWindow* window,
 
120
                        struct ANativeWindowBuffer* buffer, int fence_fd)
121
121
{
122
 
    return 0;
 
122
    auto self = static_cast<mga::MirNativeWindow*>(window);
 
123
    return self->cancelBuffer(buffer, fence_fd);
123
124
}
124
125
 
125
126
}
174
175
    return 0;
175
176
}
176
177
 
 
178
int mga::MirNativeWindow::cancelBuffer(struct ANativeWindowBuffer* buffer, int fence)
 
179
{
 
180
    driver_interpreter->driver_returns_buffer(buffer, fence);
 
181
    return 0;
 
182
}
 
183
 
177
184
int mga::MirNativeWindow::query(int key, int* value) const
178
185
{
179
186
    *value = driver_interpreter->driver_requests_info(key);