Add cursor flags into SpriteController to suppor async cursor updates.

- This is fairly blindly taken from nvidia's implementation.

Change-Id: I825ecbd9cb4b394793dce079591b37efca546bbe
This commit is contained in:
Riley Andrews
2014-07-07 11:47:35 -07:00
parent 03cab4cbe6
commit 68eccdade2
2 changed files with 7 additions and 1 deletions

View File

@@ -156,6 +156,11 @@ public class SurfaceControl {
// 0x1000 is reserved for an independent DRM protected flag in framework
/**
* Surface creation flag: Window represents a cursor glyph.
*/
public static final int CURSOR_WINDOW = 0x00002000;
/**
* Surface creation flag: Creates a normal surface.
* This is the default.

View File

@@ -370,7 +370,8 @@ sp<SurfaceControl> SpriteController::obtainSurface(int32_t width, int32_t height
sp<SurfaceControl> surfaceControl = mSurfaceComposerClient->createSurface(
String8("Sprite"), width, height, PIXEL_FORMAT_RGBA_8888,
ISurfaceComposerClient::eHidden);
ISurfaceComposerClient::eHidden |
ISurfaceComposerClient::eCursorWindow);
if (surfaceControl == NULL || !surfaceControl->isValid()) {
ALOGE("Error creating sprite surface.");
return NULL;