Commit Graph

108 Commits

Author SHA1 Message Date
Byunghun Jeon 987034b563 SurfaceFlinger: Native changes to add blur effect
Native changes to add blur-behind and blur mask effect

Change-Id: I54faf82d750e8299de6d261f6a893ab26d08df84

SurfaceFlinger: Adding template for LayerBlur files

Change-Id: I444009113b7bdd6c5284863fd1f56358e67d9fe6

SurfaceFlinger: Featurize libuiblur module for OSS build

Change-Id: Ifdc176e699434125d17b111c044b8ba954cf717c
2015-11-08 01:07:13 -08:00
Steve Kondik 8f0e75211f Merge branch 'm' of git://codeaurora.org/platform/frameworks/native into cm-13.0
Change-Id: I7830f596b2e7da809a759491d8115ff158c43734
2015-10-21 16:56:23 -07:00
Steve Kondik 3141dc73b6 surfaceflinger: Clean up use of QC extended API
Change-Id: I1256605e63e90f3baaa213453246fb0e44e0c770
2015-10-12 23:36:09 -07:00
Steve Kondik 0bef28f4e6 native: Use project pathmap
Change-Id: I81752c2c433752c02ab2a922f974f363e10d8def
2015-10-12 23:36:09 -07:00
Baldev Sahu dfab0ee254 SurfaceFlinger: Add support for MDP3
This change is porting of following commits related to MDP3

1) SurfaceFlinger: Change to support framebuffer flip for 2D blitters
- Surfaceflinger does not flip framebuffers when there are
  no layers marked for HWC_FRAMEBUFFER
- This change checks for the HWC_BLIT flag and will request a flip
  to a new FB_TARGET buffer even if there are no FRAMEBUFFER layers

  "Change-Id: I1cb44389a05c9ec049d7f0d39c288feccb11a91c"

2) SF: Avoid wormhole clear for BLIT calls
- Do not call GPU clear from SF when composition
  type is BLIT as it'll be taken care in HAL.

  "Change-Id: Ia613eb9b824c6484ecc8c8fa4ee883545d8541b8"

3) surfaceflinger: Allow gpu to render widevine level3
- Allow gpu to render widevine level3 but keep
  blocking screen shots.

  "Change-Id: I914232a062acbb7b17901dbf2b414973230e59d9"

Change-Id: I35eef9eb1597af21c195e07d5fe4c0c73ab3a269
2015-10-07 02:52:17 -07:00
Raj Kamal 20f9ced881 SurfaceFlinger: Add support for DisplayUtils
Add DisplayUtils class which uses the custom implementations
of ExLayer, ExSurfaceFlinger, ExHWComposer,
and ExVirtualDisplaySurface classes if needed

Change-Id: Ibdd8da5d3d0d602f42b76a15d0994c6aa98bee3f
2015-10-06 03:22:25 -06:00
Dan Stoza 22d0bdf326 resolved conflicts for merge of 1665c8e1 to lmp-mr1-dev-plus-aosp
Change-Id: I0be2ecb8085f2cd9560138460bcc27d71c011608
2015-01-27 11:49:26 -08:00
Dan Stoza 1665c8e101 Revert "SurfaceFlinger: Attempt to attribute fds to layers"
This reverts commit 03eccb6616.

Change-Id: I4f0da7bb62bf77bb3d399aee601beae5e03928fe
2015-01-27 11:03:50 -08:00
Dan Stoza 3372cc25df resolved conflicts for merge of 03eccb66 to lmp-mr1-dev-plus-aosp
Change-Id: I1f38cbe7019b2b48b1094dee154ad97c23fd22c2
2015-01-16 16:18:51 -08:00
Dan Stoza 03eccb6616 SurfaceFlinger: Attempt to attribute fds to layers
This tracks fds when layers are created and destroyed in an effort to
determine which specific app (if any) is active when fds are leaked

Bug: 19017008
Change-Id: I1f1d5a9cbc1399e3df3a2d350324f80b3a4e3477
2015-01-16 15:02:22 -08:00
Dmitriy Ivanov e9b6f1f7bb Switch to libsigchain.a
Use LOCAL_WHOLE_STATIC_LIBRARIES to instruct static linker
  to export symbols from the static library.

(cherry picked from commit 4340a14fbf)

Bug: 18701723
Change-Id: I70f6fdb64b0d1adbadf96c8de85870a903ec186a
2014-12-10 10:28:50 -08:00
Dan Albert 7530114619 am 5588d900: Merge "Enable clang for libui/libgui/surfaceflinger"
* commit '5588d9000cd1ef217185c9001d6b5ecd84db9741':
  Enable clang for libui/libgui/surfaceflinger
2014-12-05 18:01:48 +00:00
Dan Stoza 01049c8321 Enable clang for libui/libgui/surfaceflinger
Enables clang and C++11 for libui/libgui/surfaceflinger, and
eliminates all compile-time warnings.

Change-Id: Ie237fdb5ae44f2bfcddaa884f9c65ec3f08ae50f
(cherry picked from commit f10c46ef85)
2014-12-04 17:56:17 -08:00
Andreas Gampe 4037c458a7 resolved conflicts for merge of 07dffa18 to lmp-mr1-dev-plus-aosp
Change-Id: I42d8bc291f4f48f3098754b076889159c4b20e41
2014-11-13 15:16:53 -08:00
Andreas Gampe 89fd4f7fa6 Frameworks/native: Wall Werror in surfaceflinger
Turn on -Wall -Werror in services/surfaceflinger. Fix warnings.

Change-Id: Ifef830300d9d4bc657d8f1257c02bfe8c2b4d9c5
2014-11-13 14:18:56 -08:00
Dan Stoza d77021637e am 1f3efb11: Don\'t run large virtual displays through HWC
* commit '1f3efb11ff8c884a254f4272f0d1ee0b77ceff2f':
  Don't run large virtual displays through HWC
2014-10-30 20:58:42 +00:00
Dan Stoza 1f3efb11ff Don't run large virtual displays through HWC
This change watches for a MAX_VIRTUAL_DISPLAY_DIMENSION value, which
will be set (if necessary) in BoardConfig.mk. If the value is set,
any virtual displays that have a width or a height greater than that
dimension will bypass the hardware composer HAL and be handled only
by SurfaceFlinger.

Bug: 17701816
Change-Id: Ia6ca44dfd6a7a9bc0f054493d3f13006bc32fa14
2014-10-28 16:01:47 -07:00
Dmitriy Ivanov 8b81ce563f am cb8a9fcc: Merge "Switch to libsigchain.a"
* commit 'cb8a9fcc56288378d05d80c55396db7981e3828d':
  Switch to libsigchain.a
2014-10-21 03:30:55 +00:00
Dmitriy Ivanov 5cf92d4a85 am cb8a9fcc: Merge "Switch to libsigchain.a"
* commit 'cb8a9fcc56288378d05d80c55396db7981e3828d':
  Switch to libsigchain.a
2014-10-21 03:30:18 +00:00
Dmitriy Ivanov 4340a14fbf Switch to libsigchain.a
Use LOCAL_WHOLE_STATIC_LIBRARIES to instruct static linker
  to export symbols from the static library.

Change-Id: I0e41cf173be96c52cdad72b1ef4a1bf819e65dd2
2014-10-20 14:17:26 -07:00
Dmitriy Ivanov 2b1f2dac93 Link sigchain to surfaceflinger main executable
And export necessary symbols to preempt calls from libart.so

Bug: 15345057
Bug: 15426766

(cherry picked from commit f3da24d8cf)

Change-Id: I03b632e0bf2cbaf4a0e68cd0af4e991f7f6b08e4
2014-10-16 11:43:19 -07:00
Dmitriy Ivanov 9b9d1a4ee5 am 26a28149: Merge "Link sigchain to surfaceflinger main executable"
* commit '26a2814963de75f14dfbe7cf3d45e993727891cf':
  Link sigchain to surfaceflinger main executable
2014-10-14 18:21:44 +00:00
Dmitriy Ivanov 88e5118f07 am 26a28149: Merge "Link sigchain to surfaceflinger main executable"
* commit '26a2814963de75f14dfbe7cf3d45e993727891cf':
  Link sigchain to surfaceflinger main executable
2014-10-14 18:21:24 +00:00
Dmitriy Ivanov f3da24d8cf Link sigchain to surfaceflinger main executable
And export necessary symbols to preempt calls from libart.so

Bug: 15345057
Bug: 15426766
Change-Id: If0b7f59a59824e30aa0c33dad76c7a44932180de
2014-10-09 15:20:25 -07:00
Michael Lentine 7306c670eb Add error for format and make sure setActiveConfig fails with an invalid mode.
Change-Id: Iacdb5cbad125787f96c64c88d432fc541c4cad1a
2014-07-30 14:36:25 -07:00
Jesse Hall e9b23b6588 surfaceflinger: Make all sources depend on Android.mk
This forces all SurfaceFlinger sources to be recompiled when the
Makefile changes; that's overkill sometimes but makes sure everything
gets recompiled when compile options (or similar) changes.

Change-Id: I2b3c3090fc1c35078e13c77fbb1a78d447c39158
2014-07-14 15:32:59 -07:00
Jesse Hall 24cd98eef8 Compile libsurfaceflinger with Clang and -std=c++11 [DO NOT MERGE]
This is necessary to use C11/C++11 stdlib atomics, which the next
change will do. This change also fixes a couple bits of syntax that
both GCC and Clang refuse to compile in -std=c++11 mode.

Change-Id: Ia14d9d6b537a3bb106c23e19a277e48be180754c
2014-07-14 12:18:00 -07:00
Ruchi Kandoi ef472ec40a SurfaceFlinger: send VSYNC power hints to IPowerManager
VSYNC power hints are now sent via binder to IPowerManager.
SurfaceFlinger no longer loads a second copy of the PowerHAL.
VSYNC power hints are sent in batches and not on per frame basis.

Change-Id: Ia5a839ab3c857cffae7089f810b4315d4ed23fcf
2014-06-18 18:51:24 -07:00
Wengang Wu 1210f2ab82 am 20071e50: am e3d37a7b: Enable support RGBX_8888 for omap3
* commit '20071e5028adb6d7ced81843d33e4d0baa0768ed':
  Enable support RGBX_8888 for omap3
2014-06-11 21:38:55 +00:00
Wengang Wu 20071e5028 am e3d37a7b: Enable support RGBX_8888 for omap3
* commit 'e3d37a7b55f86f5d005dd67f828dcf51fe60c0f6':
  Enable support RGBX_8888 for omap3
2014-06-11 18:17:19 +00:00
Wengang Wu e3d37a7b55 Enable support RGBX_8888 for omap3
Bug: 14995811
Change-Id: Iaeb5a5ad0e3bcf215613f24f2570ae0d8267c016
2014-06-11 11:13:40 -07:00
Ruchi Kandoi 4098f03d5c Revert "SurfaceFlinger: send VSYNC power hints to IPowerManager"
This reverts commit d469a1c328.
2014-04-04 18:09:30 -07:00
Ruchi Kandoi d469a1c328 SurfaceFlinger: send VSYNC power hints to IPowerManager
VSYNC power hints are now sent via binder to IPowerManager.
SurfaceFlinger no longer loads a second copy of the PowerHAL.
VSYNC power hints are sent in batches and not on per frame basis.

Change-Id: Icc2eee5df56135bd24dc244a84e7c12dd5511fec
2014-04-04 20:22:31 +00:00
Dan Stoza b9b088375d Remove deprecated BufferQueue constructor
Bug: 13415624
Change-Id: I9fe15e45daa7351f1db34ee75bfee6f19cb347d3
2014-03-18 10:08:44 -07:00
Wonsik Kim 29fa9590ad Revert "Implement video plane layer"
This reverts commit f837c93a1b.

Change-Id: I6a1aa9ad0aca023267dc53d19c950b1535123ca7
2014-03-17 11:17:28 +00:00
Wonsik Kim f837c93a1b Implement video plane layer
Binding with video source will follow.

Change-Id: Ic14e9757f5b61f4055cbeda47c1bafae0a621abb
2014-02-27 00:08:22 +00:00
Colin Cross 89450d45ac surfaceflinger: add BoardConfig.mk variable to force 32-bit
Individual devices may need to force surfaceflinger to compile for
32-bit if they don't have 64-bit GL libraries.

Change-Id: I3703b2f8e36e90cf125d9ed5e6318c3506861948
2014-02-20 15:37:14 -08:00
Jesse Hall c354effe97 Fix handling of undefined TARGET_FORCE_HWC_FOR_VIRTUAL_DISPLAYS
related to b/8316155 - Implement HWComposer 1.3 w/ virtual display support
Change-Id: I2dc8d65a74174aa833cc491264f97f1f2df49307
2013-10-25 17:48:09 +00:00
Naseer Ahmed 6a968462f9 Add a boardconfig to force HWC composition of virtual displays
When this boardconfig is defined, even when all virtual display
composition is done by GLES, the HWC will be forced to copy from the
GLES framebuffer to the output buffer. On some hardware this allows
HWC to do format conversions that would otherwise have to be done by
the consumer, with worse power and/or performance.

Bug: 8316155
Change-Id: If980ecc589f138cef063eafa757f7f748196713e
2013-10-17 13:57:58 -07:00
Jamie Gennis 0a645cc5a9 SurfaceFlinger: give SF its own vsync phase
This change allows SurfaceFlinger to run at a different vsync phase offset from
that used by external listeners.

Bug: 11175503
Change-Id: I561c53a5659fa6dc1e3e4ae30340f3c1a6adceb4
2013-10-15 14:31:41 -07:00
Jamie Gennis d1700756ec SurfaceFlinger: Add EventControlThread
This change adds a new thread for calling HWComposer's eventControl
asynchronously.  The DispSync-based vsync approach ends up enabling and
disabling HWComposer's vsync callbacks at arbitrary times, and some HWComposer
implementations do not have these calls optimized.

Bug: 11175503
Change-Id: I719be82bd200b391c61d40863b991c7b59acdfd6
2013-10-15 14:31:41 -07:00
Jamie Gennis faf77cce9d SurfaceFlinger: SW-based vsync events
This change adds the DispSync class, which models the hardware vsync event
times to allow vsync event callbacks to be done at an arbitrary phase offset
from the hardware vsync.  This can be used to reduce the minimum latency from
Choreographer wake-up to on-screen image presentation.

Bug: 10624956
Change-Id: I8c7a54ceacaa4d709726ed97b0dcae4093a7bdcf
2013-10-07 17:59:53 -07:00
Mathias Agopian ff2ed70fa3 color blindness enhancement
This is an attempt at improving the experience of
users with color vision impairement.

At this time this feature can only be enabled for
debugging:

  adb shell service call SurfaceFlinger 1014 i32 PARAM

  with PARAM:
   0 : disabled
   1 : protanomaly/protanopia simulation
   2 : deuteranomaly/deuteranopia simulation
   3 : tritanopia/tritanomaly simulation
  11, 12, 13: same as above w/ attempted correction/enhancement

The enhancement algorithm tries to spread the "error"
such that tones that would otherwise appear similar can be
distinguished.

Bug: 9465644

Change-Id: I860f7eed0cb81f54ef9cf24ad78155b6395ade48
2013-09-04 22:11:15 -07:00
Mathias Agopian 9414d67f46 make sure SF initialization is ran at target priority and correct thread group
SF can spawn threads (indirectly) during initialization
and we want those to be spawned at URGENT_DISPLAY_PRIORITY
(in theory they should set their own, but some code lives
in vendor libraries and doesn't).

Bug: 10430209
Change-Id: I5b3a8f979297de287614c8eafd8267bef1176e4b
2013-08-23 17:10:32 -07:00
Mathias Agopian 4f4f094348 SurfaceFlinger now runs in the process's main thread
it used to spawn its own thread and return the main thread
to the binder thread pool -- this was confusing the naming
of things in the kernel.

Bug: 10331839

Change-Id: I2d13a6d73409a38109300fcbe6a04b4c41cb5d00
2013-08-20 11:16:45 -07:00
Mathias Agopian 49457ac092 Encapsulate textures into their own Texture class
the main reason for doing this is so that we can have
access to informations about a texture (like its dimension)
close to where we generate and use shaders in ES 2.0.
Previously, there wasn't any way to get to a texture's size
from a RenderEngine implementation.

Bug: 8679321

Change-Id: I388b338a70d07e3e8177dde248710ea1e4c82dff
2013-08-16 16:29:02 -07:00
Mathias Agopian 3f84483382 SurfaceFlinger now uses GLES 2.x when available
Bug: 8679321

Change-Id: I2b152d01fb4e2de2ea9fe87f1ddbd6826d7520d7
2013-08-13 16:07:45 -07:00
Mathias Agopian 7ffaa7c60d move services executables sources in their respective src folder
Change-Id: Ic65434a26c7fed1699abf0851fec6faa40e09c0c
2013-07-22 12:25:18 -07:00
Mathias Agopian 595264f1af BufferQueue improvements and APIs changes
this is the first step of a series of improvements to
BufferQueue. A few things happen in this change:

- setSynchronousMode() goes away as well as the SynchronousModeAllowed flag
- BufferQueue now defaults to (what used to be) synchronous mode
- a new "controlled by app" flag is passed when creating consumers and producers
  those flags are used to put the BufferQueue in a mode where it
  will never block if both flags are set. This is achieved by:
  - returning an error from dequeueBuffer() if it would block
  - making sure a buffer is always available by replacing
    the previous buffer with the new one in queueBuffer()
    (note: this is similar to what asynchrnous mode used to be)

Note: in this change EGL's swap-interval 0 is broken; this will be
fixed in another change.

Change-Id: I691f9507d6e2e158287e3039f2a79a4d4434211d
2013-07-18 22:28:18 -07:00
Mathias Agopian 875d8e1323 Refactor SF. Move all GL operations in their own class.
this is the first step to add support for GLES 2.x, this
change breaks the dependency of SF on GLES 1.x by moving
all operation into their own class.

Bug: 8679321

Change-Id: I0d2741eca2cefe67dfd9cf837cac10c4d126928b
2013-07-03 14:39:27 -07:00