Commit Graph

16 Commits

Author SHA1 Message Date
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
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
Riley Andrews 9707f4df64 Add glFlush in surfaceflinger screenshot code.
After creating a syncKHR object with type EGL_SYNC_NATIVE_FENCE_ANDROID,
glFlush must be called before the EGL_SYNC_NATIVE_FENCE_FD_ANDROID attribute
is populated with a sync fd. We currently call eglDupNativeFenceFDANDROID
before issuing the flush.

Bug 18052459
Taken verbatim from matthew.k.gumbel@intel.com.

Change-Id: I3781d14f92862076e2bca7d27341a6dc6e7e3775
2014-10-23 16:25:17 -07:00
Michael Lentine 9ae79d869a Build fix for size_t on 64bit.
Change-Id: Ic16895b30d78ba8a635b709adbae31a590501b20
2014-07-30 16:42:12 -07:00
Jesse Hall 19e872912a Implement per-display EGLConfig and configless EGLContext
Bug: 12230666
Change-Id: Icca608b108cbdcab9cf01a9236d8cdbda000a836
Signed-off-by: Jesse Hall <jessehall@google.com>
2013-12-23 21:53:39 -08:00
Jesse Hall 05f8c703d4 Move EGLConfig selection to RenderEngine
Bug: 12230666
Change-Id: I8d1111a7e0fd9d9e2525e6a80da8ce46d7dd085d
Signed-off-by: Jesse Hall <jessehall@google.com>
2013-12-23 21:53:39 -08:00
Mathias Agopian d555684cb3 reinstate black-screenshot debugging code
turned off by default.

Bug: 10809349
Change-Id: I3e6b8c7860e6b0e122b8f07de4020967cd1f005c
2013-09-19 17:09:26 -07:00
Mathias Agopian 2185f8b420 Fix GLES context version selection
Explicitly selects an ES 2.0 config first, then an ES 1.x config,
before attempting the fallback path for the emulator.

Bug: 10820214
Change-Id: Ia8cc084c02a0e3de910def024da8a08d02bbd89d
2013-09-18 16:20:26 -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 19733a3279 minor clean-up of the GLESRenderer
Change-Id: I978dea25b7687fbbbb283f09c24e115d9bad49a2
2013-08-28 18:13:56 -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
Andy McFadden 6db4ff6218 Disable GLES 2.x rendering
Bug 10340705

Change-Id: I91f3baf0d79655d8d031c100d0b116f745c2fbef
2013-08-15 10:39:11 -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
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