diff options
author | Jamie Gennis <jgennis@google.com> | 2011-03-08 12:18:54 -0800 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2011-03-08 16:49:51 -0800 |
commit | d2acedf18c9a3527f6e3dc5d578a85fdc0ad4338 (patch) | |
tree | 06a23415d1486f5d7fb3e6d64640a1977f65dd86 /include | |
parent | 6cc2bbe5cf8c959239d35972c0acac494e5c1559 (diff) | |
download | frameworks_base-d2acedf18c9a3527f6e3dc5d578a85fdc0ad4338.zip frameworks_base-d2acedf18c9a3527f6e3dc5d578a85fdc0ad4338.tar.gz frameworks_base-d2acedf18c9a3527f6e3dc5d578a85fdc0ad4338.tar.bz2 |
ANativeWindow: add queues-to-window-composer check.
This change adds a new 'method' to the ANativeWindow interface to check
whether buffers queued to the window will be sent directly to the system
window compositor.
Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d
Bug: 3495535
Diffstat (limited to 'include')
-rw-r--r-- | include/surfaceflinger/ISurfaceComposer.h | 7 | ||||
-rw-r--r-- | include/ui/egl/android_natives.h | 15 |
2 files changed, 21 insertions, 1 deletions
diff --git a/include/surfaceflinger/ISurfaceComposer.h b/include/surfaceflinger/ISurfaceComposer.h index 361e7dc..dea1b10 100644 --- a/include/surfaceflinger/ISurfaceComposer.h +++ b/include/surfaceflinger/ISurfaceComposer.h @@ -138,6 +138,10 @@ public: * This is an ASYNCHRONOUS call. */ virtual void signal() const = 0; + + /* verify that an ISurface was created by SurfaceFlinger. + */ + virtual bool authenticateSurface(const sp<ISurface>& surface) const = 0; }; // ---------------------------------------------------------------------------- @@ -161,7 +165,8 @@ public: SIGNAL, CAPTURE_SCREEN, TURN_ELECTRON_BEAM_OFF, - TURN_ELECTRON_BEAM_ON + TURN_ELECTRON_BEAM_ON, + AUTHENTICATE_SURFACE, }; virtual status_t onTransact( uint32_t code, diff --git a/include/ui/egl/android_natives.h b/include/ui/egl/android_natives.h index fd83f46..0ac34d0 100644 --- a/include/ui/egl/android_natives.h +++ b/include/ui/egl/android_natives.h @@ -95,6 +95,21 @@ enum { * 5. Queue, dequeue, queue, dequeue, ad infinitum */ NATIVE_WINDOW_MIN_UNDEQUEUED_BUFFERS, + + /* Check whether queueBuffer operations on the ANativeWindow send the buffer + * to the window compositor. The query sets the returned 'value' argument + * to 1 if the ANativeWindow DOES send queued buffers directly to the window + * compositor and 0 if the buffers do not go directly to the window + * compositor. + * + * This can be used to determine whether protected buffer content should be + * sent to the ANativeWindow. Note, however, that a result of 1 does NOT + * indicate that queued buffers will be protected from applications or users + * capturing their contents. If that behavior is desired then some other + * mechanism (e.g. the GRALLOC_USAGE_PROTECTED flag) should be used in + * conjunction with this query. + */ + NATIVE_WINDOW_QUEUES_TO_WINDOW_COMPOSER, }; /* valid operations for the (*perform)() hook */ |