Commit Graph

51792 Commits

Author SHA1 Message Date
Dan Stoza
42ace4b5c6 SurfaceFlinger: Tweak whitespace in DdmConnection
Change-Id: I99e7b09e4bc3611ffb790eddfbb9b3c8b9bc5d4c
2015-05-28 14:23:54 -07:00
Dan Stoza
5566d9db26 Merge "Bypass surface flinger permission check for calls from system." 2015-05-28 21:21:28 +00:00
Dan Stoza
13c04c2762 Merge "surfaceflinger: Fix range check for getFormat" 2015-05-28 21:20:59 +00:00
Jeff Brown
8b04725f14 Bypass surface flinger permission check for calls from system.
Early during the boot, before activity manager is ready to handle
permission checks, the system needs to be able to change the display
state.  Added a hardcoded exemption for AID_SYSTEM (which already
has permission to talk to surface flinger anyhow).

Bug: 19029490
Change-Id: I6222edcab8e394e5fb6adf7a982be446e4505a1e
(cherry picked from commit 3bfe51d790)
2015-05-28 14:19:22 -07:00
Ajay Dudani
ae569747b6 surfaceflinger: Fix range check for getFormat
Fix potential buffer overflow error in getFormat with indices
greater than MAX_HWC_DISPLAYS.

Change-Id: I5e5b69d8d043e900f5e33ca9a62e94ae5f857b68
(cherry picked from commit 4e3e30c2d5)
2015-05-28 14:19:10 -07:00
Dan Stoza
20f7a6f004 Merge "Modify EGL to disconnect the window when the surface gets destroyed." 2015-05-28 21:10:35 +00:00
Michael Lentine
87dd528bee Modify EGL to disconnect the window when the surface gets destroyed.
Bug: 14445579

Change-Id: I1d263ff6cffcb6e448761fca7ca4b06466ad65aa
(cherry picked from commit 00699fa641)
2015-05-28 14:09:36 -07:00
Dan Stoza
c2bdfb8694 Merge "SF: Skip render-to-texture for color transforms" 2015-05-28 21:02:23 +00:00
Dan Stoza
0af1e0feb6 Merge "Add hotplug support for primary display." 2015-05-28 20:59:45 +00:00
Dan Stoza
35283482d0 Merge "libgui: Fix surface damage on rotated buffers" 2015-05-28 20:57:48 +00:00
Dan Stoza
0a70ed998c Merge "Fix surfaceflinger tests." 2015-05-28 20:55:44 +00:00
Dan Stoza
4ebb44e8cc Merge "Fix libgui tests." 2015-05-28 20:54:05 +00:00
Dan Stoza
10cb68fb97 Merge "fix BufferItem flatten/unflatten alignment" 2015-05-28 20:51:56 +00:00
Dan Stoza
1bdeb9d84f Merge "Refactor ConsumerBase and it's derived classes." 2015-05-28 20:48:47 +00:00
Jesse Hall
5a606c3ab9 Merge "Fix EGL shim extension injection for GL ES 3 drivers." 2015-05-28 20:46:45 +00:00
Dan Stoza
d19ad6fb67 Merge "Add ConsumerBase::isAbandoned" 2015-05-28 20:40:00 +00:00
Dan Stoza
8e8eba5091 SF: Skip render-to-texture for color transforms
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
(cherry picked from commit f008799d37)
2015-05-28 13:35:39 -07:00
Michael Lentine
d74ba85c6f Add hotplug support for primary display.
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
(cherry picked from commit 10613dc3b5)
2015-05-28 13:35:24 -07:00
Dan Stoza
076d25b19d libgui: Fix surface damage on rotated buffers
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
(cherry picked from commit 0e65e6c283)
2015-05-28 13:33:42 -07:00
Michael Lentine
b64d875152 Fix surfaceflinger tests.
Update the screenshot code and add correct return values to surface flinger's
capturescreenshot function.

Buf: 18138368

Change-Id: Ieb42d289088589f941502fbd69da7aa939265e07
(cherry picked from commit 5a16a62950)
2015-05-28 13:33:25 -07:00
Michael Lentine
e0d3e7073a Fix libgui tests.
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
(cherry picked from commit d8ead0ccd4)
2015-05-28 13:33:10 -07:00
Chong Zhang
ffe17a14ad fix BufferItem flatten/unflatten alignment
bug: 21370100
Change-Id: Ia3991dc591c176bdbd1d78d1804aa22777525b62
(cherry picked from commit 47f674dfec)
2015-05-28 13:32:48 -07:00
Michael Lentine
235da8da1a Refactor ConsumerBase and it's derived classes.
Move setDefaultBufferSize, setDefaultBufferFormat, and
setDefaultBufferDataSpace into ConsumerBase and remove them from
CpuConsumer and BufferItemConsumer.

Bug: 19977701

Change-Id: Ic68992464c5da6da7a41c4063a53029a69efcd1b
(cherry picked from commit 847f11e215)
2015-05-28 13:32:18 -07:00
John Reck
e57621598f Add ConsumerBase::isAbandoned
Bug: 20105644
Change-Id: I21526b5397ea51a15500c44a99daa9d75fc4ea67
(cherry picked from commit e478305181)
2015-05-28 13:31:51 -07:00
David Srbecky
9405746db7 Merge "Rename --include-cfi to --generate-debug-info." 2015-05-28 18:37:39 +00:00
David Srbecky
741a6ff2e2 Rename --include-cfi to --generate-debug-info.
This follows a change in dex2oat.

Change-Id: I6b2df1668fdd09d82cfe86e6e51360b954b6c8a9
2015-05-28 16:55:50 +01:00
Johan Euphrosine
738fc3a722 Merge "framework/native/docs: remove doc footer for jd output" 2015-05-27 21:30:37 +00:00
Johan Euphrosine
efd6ab3cb0 framework/native/docs: remove doc footer for jd output
Change-Id: Ib65a436f4846eb5c02e42c6f1cbda5eab58c68ab
2015-05-27 10:13:35 -07:00
Johan Euphrosine
116e7aebb6 Merge "frameworks/native/docs: add doxygen configuration" 2015-05-22 22:28:24 +00:00
Alistair Strachan
edfe72ed67 Fix EGL shim extension injection for GL ES 3 drivers.
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.
2015-05-22 14:10:09 -07:00
Johan Euphrosine
5388c52e77 frameworks/native/docs: add doxygen configuration
Change-Id: I7803d9beceac46488869e4874f6f5f7a7925a796
2015-05-21 01:27:01 -07:00
Elliott Hughes
e814b43c58 Merge "Don't use TEMP_FAILURE_RETRY on close in frameworks/native." 2015-05-16 00:26:09 +00:00
Elliott Hughes
997abb668b Don't use TEMP_FAILURE_RETRY on close in frameworks/native.
Bug: http://b/20501816
Change-Id: Id13a62f02243c6c4831e2f47944dc34fa822f5b6
2015-05-15 17:05:40 -07:00
Dan Stoza
553cbb2544 Merge "SurfaceFlinger: Handle EGL errors more cleanly" 2015-05-14 17:56:27 +00:00
Dan Stoza
59bfd2bbed SurfaceFlinger: Handle EGL errors more cleanly
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
(cherry picked from commit 65476f3332)
2015-05-14 10:43:07 -07:00
Hiroshi Yamauchi
9188b4bb5d Merge "Replace JNI primitive array critical calls with non-critical ones." 2015-05-13 22:47:42 +00:00
Hiroshi Yamauchi
569bc1bcdd Replace JNI primitive array critical calls with non-critical ones.
The glgen part.

(cherry pick commit 4e7de461c1)

Bug: 19235243
Change-Id: I0d1e78acf39feb37a67e857216a6d52f4cede180
2015-05-13 13:11:30 -07:00
Dan Stoza
f984bad94a Merge "Fix PTS handling for buffer replacement" 2015-05-13 17:53:22 +00:00
Dan Stoza
bbb010b79c Merge "binder: add uint64 support to Parcel." 2015-05-13 17:52:46 +00:00
Dan Stoza
e64a79cd85 Fix PTS handling for buffer replacement
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
(cherry picked from commit a4650a50a0)
2015-05-13 09:43:35 -07:00
Ronghua Wu
f183395296 binder: add uint64 support to Parcel.
Bug: 19620911
Change-Id: Ifce5319e4e35afd344dead67ab7ba1cd399476a3
(cherry picked from commit 2d13afdfa1)
2015-05-13 09:43:35 -07:00
Dan Stoza
bfe211f00a Merge "libgui: Always allow allocation on connect" 2015-05-12 22:33:39 +00:00
Johan Euphrosine
b9009863cb Merge "frameworks/native: document native types and enums" 2015-05-12 22:05:22 +00:00
Dan Stoza
cbe5459a99 libgui: Always allow allocation on connect
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
(cherry picked from commit 2b83cc920a)
2015-05-12 15:03:52 -07:00
Johan Euphrosine
bf6d5e012c frameworks/native: document native types and enums
Change-Id: Id94b610f27b87426abb30e13484cbd16990aa995
2015-05-12 14:39:28 -07:00
Dan Stoza
38d7f7550f Merge "libgui: Hook up onFrameReplaced" 2015-05-12 17:18:12 +00:00
Dan Stoza
a3b6693272 libgui: Hook up onFrameReplaced
This completes the plumbing from ConsumerListener::onFrameReplaced into
SurfaceFlinger (and other consumers that may care).

Change-Id: I376e78ace95d6748e8662e6b4d47c0dfa697a300
(cherry picked from commit dc13c5b85b)
2015-05-12 09:35:29 -07:00
Jesse Hall
364ed95453 Merge "libEGL: whitelist the EGL_KHR_create_context_no_error extension" 2015-05-11 21:31:44 +00:00
Jesse Hall
5245af3cb7 libEGL: whitelist the EGL_KHR_create_context_no_error extension
Allow EGL implementations to expose the
EGL_KHR_create_context_no_error extension if they wish.

https://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_create_context_no_error.txt

Change-Id: I3290ccc2a69a1fa0b00ec3f1aa4f876906c64bfb
2015-05-11 13:59:15 -07:00
Chris Craik
05815996c9 Merge "Added Voltage and Current regulator ftrace events to atrace" 2015-05-07 16:20:52 +00:00