EmuGL: Deliver every frame to a callback
To enable multi-touch on a tethered device, allow a callback to be registered with the OpenGL renderer. On every frame, the framebuffer is read into system memory and provided to the callback, so it can be mirrored to the device. This change is co-dependent on Idae3b026d52ed8dd666cbcdc3f3af80175c90ad3 in external/qemu. Change-Id: I03c49bc55ed9e66ffb59462333181f77e7e46035
This commit is contained in:
@@ -42,7 +42,7 @@ struct FrameBufferCaps
|
||||
class FrameBuffer
|
||||
{
|
||||
public:
|
||||
static bool initialize(int width, int height);
|
||||
static bool initialize(int width, int height, OnPostFn onPost, void* onPostContext);
|
||||
static bool setupSubWindow(FBNativeWindowType p_window,
|
||||
int x, int y,
|
||||
int width, int height, float zRot);
|
||||
@@ -85,7 +85,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
FrameBuffer(int p_width, int p_height);
|
||||
FrameBuffer(int p_width, int p_height, OnPostFn onPost, void* onPostContext);
|
||||
~FrameBuffer();
|
||||
HandleType genHandle();
|
||||
bool bindSubwin_locked();
|
||||
@@ -124,5 +124,9 @@ private:
|
||||
int m_statsNumFrames;
|
||||
long long m_statsStartTime;
|
||||
bool m_fpsStats;
|
||||
|
||||
OnPostFn m_onPost;
|
||||
void* m_onPostContext;
|
||||
unsigned char* m_fbImage;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user