The product of width and height should be less than UINT32_MAX (in practice
smaller). Adding the checks prevents overflows when allocating buffers.
Bug: 20726612
Change-Id: I9769edf0688a9bfe69906d49fa0540cadf4c49b0
The Android EGL shim injects GL_EXT_debug_marker into the ES driver
EXTENSIONS string for the OpenGL ES 1.x and 2.0/3.0/3.1 drivers if
the extension is not already provided. This feature is used by
GLES_trace.
In Open GL ES 3.0 it became possible to query an indexed version of
the EXTENSIONS string via GetStringi(). NUM_EXTENSIONS Gets were
also added to the specification (taken from Open GL).
If the shim does not have to inject the extension, then there is no
problem, as glGetString() and glGetStringi() / NUM_EXTENSIONS will
be consistent. However, if the Android EGL shim injects the
extension, NUM_EXTENSIONS and GetStringi() will report one less
extension than is really available.
Consistency between these methods is tested by the dEQP framework
with the dEQP-GLES3.functional.state_query.string.extensions test.
If the driver does not provide GL_EXT_debug_marker, this test
fails.
This change wraps all of the affected entry points so that the
wrapped driver extensions are never visible directly to dEQP,
eliminating the inconsistency.
In cases where SurfaceFlinger is applying a color matrix (usually for
accessibility features), we previously would perform a render-to-
texture for the initial composition, and then apply the matrix during
a copy to the framebuffer. This changes that behavior to just apply the
matrix during composition without a render-to-texture pass.
This may result in a perceived change of the image in cases with alpha
blending, since the blending is performed at a different stage of the
pipeline and the system effectively performs non-linear blends.
However, neither this nor the prior render-to-texture pass is strictly
correct in that regard, and this approach is less error-prone and
likely faster.
Change-Id: I2110ff0374f61d76df7b087dde8a1ed98990440c
Flips the width and height when the buffer comes in with a 90 degree
rotation so that performing the Y-flip from GL works correctly.
Bug: 20761426
Change-Id: I41c9edc8549c6cbdb534277b996ff20c59034582
When the primary is connected/disconnected on tv devices HWComposer updates
it's display parameters but doesn't destroy or recreate the display.
Bug: 18698244
Change-Id: I759c8f75d3e3a7462b85eb51973fb5072b71a702
Update IGraphicsBufferProducerTest to the new maximum enum value which is now
NATIVE_WINDOW_BUFFER_AGE. Update SurfaceTextureGLToGL_test to use the correct
counts for GraphicsBuffer refs.
Buf: 18138368
Change-Id: Ie2f7e00b414d63100b16944e3ab36b1ffceecd57
Move setDefaultBufferSize, setDefaultBufferFormat, and
setDefaultBufferDataSpace into ConsumerBase and remove them from
CpuConsumer and BufferItemConsumer.
Bug: 19977701
Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b
Adds some more safety checking for cases where we get an error while
trying to create the EGLImage. The checking puts the Layer into a
failed state after detecting an error, since the shadow queue may no
longer be synchronized.
Bug: 20957332
Change-Id: I68b4c40eab3e58731b875ed5752f2c7d17f14bcb
Introduce ACTION_BUTTON_PRESS and ACTION_BUTTON_RELEASE as actions to
signal a button press or release. If these actions happen
simulanteously with a DOWN or UP event then they're explicitly
ordered to happen after the DOWN or preceding the UP in order to send
them to the most recently targeted view.
Also, introduce new stylus button constants that differ from the
constants we use for mouse buttons.
Bug: 20704355
Change-Id: Ib960a5004db5429ad2fc8db020704773e2978327
Old version of unity uses custom linker to link
itself and libmono. The custom linker does not
support lookups with gnu-hash style. Switching
libraries needed by libunity.so to --hash-style=both
fixes this problem.
Bug: http://b/20093774
Change-Id: I2a4887cf7a5ee80a8976ecaad54b52dc62518e55
The inputs to native_handle_create can cause an overflowed allocation,
so check the return value of native_handle_create before accessing
the memory it returns.
Bug:19334482
Change-Id: I1f489382776c2a1390793a79dc27ea17baa9b2a2
This change places BufferQueue into a predictable state where
allocation is allowed whenever a producer connects. This allows clients
to disconnect and reconnect without having to worry about being locked
out of allocation.
Bug: 20554276
Change-Id: Ic0f920a3d4204f2cafdfa69e46f3bb4204571d7e
This changes the way that SurfaceFlinger's shadow buffer management
works such that instead of tracking the size of the shadow queue in the
BufferQueue, SF tracks the last frame number it has seen, and passes
that into the acquireBuffer call. BufferQueueConsumer then ensures that
it never returns a buffer newer than that frame number, even if that
means that it must return PRESENT_LATER for an otherwise valid buffer.
Change-Id: I3fcb45f683ed660c3f18a8b85ae1f8a962ba6f0e
Maintain a per sensor circular buffer of last 10 sensor_events and the wall clock time
at which each event is received.
Change-Id: Ia50c825ab5a7aaf0932ce7dce7ac8b9be7071e77
Occasionally we'll receive the stylus up signal (pressure = 0) before
we receive the touch screen up signal. Rather than giving pointer a
pressure value of 0 (which is one of the signals of hovering) or
falling back to the touchscreen pressure values (which would make for
an inconsistent stream), use the previous pressure value which should
always be non-zero for a stream of fused data.
Bug: 20449776
Change-Id: I71eb97e7c4ea53e42b0eb54fc1f8ae7f89aad9d1
Even when there isn't movement on the touchscreen we should produce
events for pressure and button state changes generated by external
stylii.
Change-Id: I9fd7ba85902d5d6bfb28d5e5ff5d8f340a94c2bf