Commit Graph

51804 Commits

Author SHA1 Message Date
Stephen Smalley
bea0746b24 Call selinux_status_open() prior to use of selinux_status_updated().
The selinux_status_*() interfaces require calling selinux_status_open()
first.  Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2015-06-03 09:27:08 -04:00
Dan Stoza
8980e0ccd4 Merge "libgui: Propagate error by clearing sp<GB>" 2015-06-01 21:59:20 +00:00
Dan Stoza
3d6022a43e libgui: Propagate error by clearing sp<GB>
Clears the sp<GraphicBuffer> returned by createGraphicBuffer when there
is an error during unflattening.

Bug: 21498231
Change-Id: I886da4474fc06853cc59188d62044b7d7549126b
(cherry picked from commit 6a04e5fcf6)
2015-06-01 14:58:35 -07:00
Dan Stoza
cf1edb3f3e Merge "Fix libgui crop matrix test." 2015-06-01 18:31:19 +00:00
Michael Lentine
34228137cc Fix libgui crop matrix test.
On devices that have the crop image extension the crop is not applied to the
transform matrix so we have to expect different results in this case.

Change-Id: If62dec1111fb77c9fa2c4332d121665960ce0216
(cherry picked from commit 04b00cea67)
2015-06-01 11:30:15 -07:00
Dan Stoza
75145aa2b7 Merge "SF: Reduce resync samples without present" 2015-06-01 18:27:35 +00:00
Dan Stoza
ef78916d86 SF: Reduce resync samples without present
Reduces the number of resync samples that DispSync will attempt to
collect without an intervening present from 12 to 4. The former value
was causing excessive power draw for some vendors' implementations, and
reducing it doesn't seem to harm anything.

Bug: 20724456
Change-Id: Ifd6e0490be67756ed001d509a38e8a36953b4618
(cherry picked from commit 9c64757f65)
2015-06-01 11:26:34 -07:00
Dan Stoza
edcfe7c513 Merge "libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc" 2015-06-01 18:25:50 +00:00
Dan Stoza
24fa67f62a libui: Apply GRALLOC_USAGE_ALLOC_MASK during alloc
Applies GRALLOC_USAGE_ALLOC_MASK to the incoming usage bits before
calling alloc on the gralloc module. This filters out the new flag
GRALLOC_USAGE_FOREIGN_BUFFERS, which is used to send a hint to the
producer, but which does not affect the allocation of buffers.

Bug: 19801661
Change-Id: Ia37a3eddba2e97598e50ac3e10877430adfa9247
(cherry picked from commit b8efdc4003)
2015-06-01 11:21:56 -07:00
Dan Stoza
c76683f51f Merge "Check that width and height parameters are small." 2015-06-01 18:18:42 +00:00
Michael Lentine
9530388b26 Check that width and height parameters are small.
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
(cherry picked from commit 1c4537e2e8)
2015-06-01 11:12:28 -07:00
Dan Stoza
a8702c4765 Merge "SurfaceFlinger: Tweak whitespace in DdmConnection" 2015-05-28 21:25:11 +00:00
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