Commit Graph

16 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
Pawit Pornkitprasan fd1fb639a1 Bring back support for glReadPixels screenshot path
Squashed commit of the following:

commit 012d3fe41d1d6cd38a0858b59145e9a4447641fa
Author: Hashcode <hashcode0f@gmail.com>
Date:   Sun Dec 8 19:36:50 2013 +0000

    sf: Always use opengles for screen capture

    Go back to the usage of GRALLOC_USAGE_HW_TEXTURE and GRALLOC_USAGE_HW_RENDERER
    in captureScreenImplLocked regardless of useReadPixels value

    This fixes the EGL_NO_IMAGE_KHR error returned from
    eglCreateImageKHR (blank images returned from screenshot path)

    Change-Id: I62fe90a081607b9e89c67f3dcfd34c84efc89d35

commit 4866ddf98ac98d8e22a1cd6a21894bb17f274588
Author: Ricardo Cerqueira <cyanogenmod@cerqueira.org>
Date:   Thu Oct 31 03:53:39 2013 +0000

    Revert "remove support for glReadPixels screenshot path"

    This reverts commit 3ca76f416b.

    Conflicts:
    	include/gui/ISurfaceComposer.h
    	libs/gui/ISurfaceComposer.cpp
    	libs/gui/SurfaceComposerClient.cpp
    	services/surfaceflinger/SurfaceFlinger.cpp
    	services/surfaceflinger/SurfaceFlinger.h

    Change-Id: I8c239e533757af770e418dbb198f5a86c736961f

Change-Id: I8c239e533757af770e418dbb198f5a86c736961f
2015-10-16 14:45:10 -07:00
Dan Stoza f008799d37 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
2015-05-27 13:32:51 -07: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
Riley Andrews c3ebe66b49 Add rotation to surfaceflingers screen cap.
+ This is needed so that activity manager does not
  have to do cpu side rotations when capturing recents
  thumbnails.

Change-Id: If998008e675ad01305db8399fd643cf4608b7025
2014-09-09 03:51:16 +00:00
Dan Stoza c18790018b SurfaceFlinger: Add sourceCrop to screenshot
Adds a sourceCrop Rect parameter to screenshot commands, which allows
clients to capture only a portion of the screen instead of the whole
screen.

Bug: 15137922
Change-Id: I629447573cd34ffb96334cde7ba02490b9ea06d8
2014-05-23 09:19:03 -07:00
Andy McFadden c6f2169559 Use black for blackout layer
SurfaceFlinger was rendering dark purple for secure content, which
showed up when we took a screen shot for the orientation change
animation.  Use black instead.

Bug 11157921

Change-Id: I3895e8168891d49dc5b84eed599bcd0a303bb70a
2013-10-11 11:16:03 -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 9b5534b0e5 Merge changes I8283a989,I64add89a into klp-dev
* changes:
  switch to use mat4
  vector and matrix classes for graphics use
2013-08-31 01:30:10 +00:00
Mathias Agopian 19733a3279 minor clean-up of the GLESRenderer
Change-Id: I978dea25b7687fbbbb283f09c24e115d9bad49a2
2013-08-28 18:13:56 -07:00
Mathias Agopian a8c386f1c3 switch to use mat4
Change-Id: I8283a989cfd2b74d53958150bc90298bc083fee7
2013-08-26 20:42:07 -07:00
Mathias Agopian bcab7b17b1 fix DimLayer in GLES2.0 SF
DimLayer state wasn't initialized properly.

Bug: 10442967
Change-Id: I384c1d85c58c96ae29d5daa1fabee9f4ce003501
2013-08-23 16:12:34 -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 458197de00 Fix ES2 composition on some devices
- turns out fragment shaders don't have default precision by default
- GLES 1.x extensions that became core in GLES 2.0 don't always work
  as extensions in GLES 2.0 (!)

Bug: 8679321
Change-Id: I5a4a93e158247910399325a965af5d2e3bbece9b
2013-08-15 14:56:51 -07:00
Mathias Agopian 5cdc8994a0 don't reallocate the mesh each time we use it
the Mesh object can be part of each Layer (at least currently).
also reworked the Mesh code a bit to make it easier to access
the vertex data.

Change-Id: I0490851ba898f0aa2e55b62958dcd8bdb535e98b
2013-08-13 20:51:23 -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