added NATIVE_WINDOW_FORMAT attribute to android_native_window_t
This commit is contained in:
@@ -63,7 +63,8 @@ struct android_native_base_t
|
||||
/* attributes queriable with query() */
|
||||
enum {
|
||||
NATIVE_WINDOW_WIDTH = 0,
|
||||
NATIVE_WINDOW_HEIGHT = 1
|
||||
NATIVE_WINDOW_HEIGHT = 1,
|
||||
NATIVE_WINDOW_FORMAT = 2,
|
||||
};
|
||||
|
||||
struct android_native_window_t
|
||||
|
||||
@@ -212,6 +212,9 @@ int FramebufferNativeWindow::query(android_native_window_t* window,
|
||||
case NATIVE_WINDOW_HEIGHT:
|
||||
*value = fb->height;
|
||||
return NO_ERROR;
|
||||
case NATIVE_WINDOW_FORMAT:
|
||||
*value = fb->format;
|
||||
return NO_ERROR;
|
||||
}
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
@@ -620,6 +620,9 @@ int Surface::query(int what, int* value)
|
||||
case NATIVE_WINDOW_HEIGHT:
|
||||
*value = int(mHeight);
|
||||
return NO_ERROR;
|
||||
case NATIVE_WINDOW_FORMAT:
|
||||
*value = int(mFormat);
|
||||
return NO_ERROR;
|
||||
}
|
||||
return BAD_VALUE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user