History log of /frameworks/base/core/jni/android_view_SurfaceControl.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
af422a8c5b902831cbd2c97c71bbeed71604dd2e 11-Apr-2017 Robert Carr <racarr@google.com> Stack APPLICATION_MEDIA_OVERLAY windows with relative layering.

See accompanying frameworks/native commit
"SurfaceFlinger: Add parent-less relative layering" for a full explanation.

Test: Manual of bug repro steps. Plus tests for new SurfaceControl functionality included in frameworks/native.
Bug: 36693738
Change-Id: Ic54598117c1f44a206d33f03d0cc463fbef43fcc
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
511a808cea9020a776749904feb21a2dd55ef7b4 27-Mar-2017 Patrik Torstensson <totte@google.com> SurfaceControl: Crash due to invalid JNI cast

The (void*)buffer.get on ARM32 is 4 byte, so the calling convention
will put the argument in [sp, #12]. However, the caller actually
expects a long (the signature of gGraphicBufferClassInfo.builder),
which means it will expect it to be in [sp, #16]

Test: Tested on mtk device
Fixes: 36631082
Fixes: 36974487
Change-Id: I0f723125e612d096c0d76ca3360d895f3f23f286
(cherry picked from commit 98dd5d9a85e8911cf41dea6198d4111f737a5892)
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
897215d76ae2e7cbca63a505113f5d90ef892d81 29-Mar-2017 Robert Carr <racarr@google.com> Remove code for seamlessly rotating SurfaceView's.

No longer required :D

Bug: 36230754
Bug: 36727915
Test: Rotate camera in different modes.
Change-Id: I7708d61646a36bc0c35cfa91d441296eb49eff9a
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
d5c7dd6da810a6b89151b337bea79fd817e6b72a 08-Mar-2017 Robert Carr <racarr@google.com> Modify SurfaceView to use SurfaceFlinger child surfaces.

Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing the revert was an incorrect JNI signature
around deferTransactionUntilSurface. I've noted it inline.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
5aec7b90310ba05f9816fd89030ba41ce48c568e 08-Mar-2017 Wonsik Kim <wonsik@google.com> Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."

This reverts commit cd4aeef88052571365d4e193a2c41e2e6d145491.

Bug: 36027342
Bug: 36015884
Change-Id: Ifd5b69caf64d65a8cd6570b7fe1fb6abe90e30b8
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
cd4aeef88052571365d4e193a2c41e2e6d145491 03-Mar-2017 Robert Carr <racarr@google.com> Modify SurfaceView to use SurfaceFlinger child surfaces.

Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing revert was a deferTransactionUntil(-1)...-1
cast to uint, defer transaction until MAX_UINT.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ib37236950a1dd3c4f9f4b58fd41ef9003c0557ef
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
3896db14751f16f4053e8fa4a82c3d6803054e5b 03-Mar-2017 Jeff Tinker <jtinker@google.com> Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."

This reverts commit 693f3432ae77d1fcfaaf9d168de861192aacb4c4.

P0: When playing encrypted content the Fugu displays a blank screen.

Test: with topic "surfaceview-without-wm" reverted, encrypted playback
works on ToT oc-release. See repro steps in 35917840#12.

bug:35917840

Change-Id: I37fa1e427daff3a1c18ed1c92d035421d891f67c
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
693f3432ae77d1fcfaaf9d168de861192aacb4c4 19-Dec-2016 Robert Carr <racarr@google.com> Modify SurfaceView to use SurfaceFlinger child surfaces.

Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Icb7259365b51ebe8c7f6c7cd4f9ba29f9fce08a4
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
0edf18f34c4dc81e45580bc0a3b3b9b072caa725 22-Feb-2017 Robert Carr <racarr@google.com> Correct SurfaceControl matrix parameter names.

DsDx is used for the X scale but DtDy is used for the Y scale, it
seems like this is a simple mix up. Correct before documenting
SurfaceControl.

Test: Animations and such work.
Change-Id: Ic52b67596bf576f58346e4db66661b06ea1bdc2f
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
f0ccd9bd0131a0a8f85aa07ea62996423860730c 01-Feb-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "More incorrect screenshot JNI code."
7f6e986317770054e21f11632c5434c0bef05e4f 31-Jan-2017 Robert Carr <racarr@google.com> More incorrect screenshot JNI code.

Not sure why we aren't getting warnings but these casts are to the wrong
type.

Bug: 34758075
Test: Manual
Change-Id: I6b9fc0500762c34379f4de56e0b5a66e6f17d87d
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
3bf2e57f8d8823f02c4e1d7bc954c4ed7c68ab84 22-Nov-2016 Albert Chaulk <achaulk@google.com> Propagate surface type and owner through to SurfaceFlinger.

This allows VrWindowManager to identify things like permission
dialogues in the list of SurfaceFlinger layers that show up while a
VR application is running and display them without leaving VR mode.

Bug: 30984984
Test: Run VR application, request permission at runtime, observe and
accept permission in VrWindowManager without leaving VR mode.

Change-Id: I347313b5fcd08dea3cd6fddfaeb15640938e3a87
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
903f98e37fa9168dc7760abfd7cf66fece7e14de 27-Jan-2017 TreeHugger Robot <treehugger-gerrit@google.com> Merge "Expose Java side for parenting SurfaceControl"
fb09bcf9699025384155924a68dc1e5a92f141b6 26-Jan-2017 Robert Carr <racarr@google.com> Correct screenshot JNI code.

Missed change to frameworks/base when changing type to signed int.
Previous code was relying on implicit cast of -1 to unsigned being INT_MAX.

Test: Rotate screen make sure no flash.
Change-Id: I779d851bdc211f24aed0095a4b6df38fd53153b4
Fixes: 34735633
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
838120c9db673d5ad5a614ad1fa9a2cf8030b8eb 02-Nov-2016 Robert Carr <racarr@google.com> Expose Java side for parenting SurfaceControl

Proposed by itself so others can experiment.

Test: Native side covered by SF Transaction test. Java side tested manually for now.
Change-Id: I44cf3acd65480bfe14e26db83e905f3ade73f7e0
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
6486d31dcbffb7179127a72ceefa11a1e726271f 10-Jan-2017 Robert Carr <racarr@google.com> Expose SurfaceControl method to screenshot to GraphicBuffer.

A graphic buffer is most useful, as we can both attach it
to starting windows, and directly use it in Sys-UI. The old
codepath for starting windows/saved surfaces, is co-existing
at the moment, so I don't make large attempts to clean up
the existing screenshot code.

Bug: 31339431
Test: Manual test in combination with other branches
Change-Id: I562fdd5460dbce3201ba090272e8731850780f20
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
f7e79d6eb3729b0555d1c88054f80467fc6c5303 16-Dec-2016 Romain Guy <romainguy@google.com> Remove RGBX_FP16 format

Bug: 32984164
Test: compile
Change-Id: I22ffe0991d3c4add68317a0554dcac6a7ac56d12
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
9505a6552764461c22ce48f1ac13d025d23e1579 14-Dec-2016 Romain Guy <romainguy@google.com> Add new RGBA_F16 bitmap config

This configuration uses 64 bits per pixel. Heach component is stored as a
half precision float value (16 bits). Half floats can be decoded/encoded
using android.util.Half.

RGBA_F16 bitmaps are used to decode wide-gamut images stored in 16 bit
formats (PNG 16 bit for instance). aapt is currently not aware of PNG
16 bits so such files must be placed in raw/ resource directories.

This first pass provides only partial drawing support with hardware
acceleration. RGBA_F16 bitmaps are stored in linear space and need
to be encoded to gamma space with the appropriate OETF to be rendered
properly on Android's current surfaces. They are however suitable for
linear blending. Full rendering support will be provided in a future
CL (BitmapShaders might be a bit tricky to handle properly during
shader generation).

Bug: 32984164
Test: bit CtsGraphicsTestCases:android.graphics.cts.BitmapRGBAF16Test

Change-Id: I328e6b567441a1b9d152a3e7be944a2cf63193bd
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
c1c54062f8cc9d47bdea820ae5ab6aef260b4488 20-Oct-2016 sergeyv <sergeyv@google.com> Rename hwui/PixelRef to hwui/Bitmap
Test: refactoring cl.
bug:32216791

Change-Id: I26de43f71027bccb43a5011f84080ab4631b2883
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
253f2c213f6ecda63b6872aee77bd30d5ec07c82 29-Sep-2016 Romain Guy <romainguy@google.com> Linear blending, step 1

NOTE: Linear blending is currently disabled in this CL as the
feature is still a work in progress

Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.

The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:

- Using hardware conversions when sampling from OpenGL textures
or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
colors to and from sRGB
- Using Skia's color spaces

Any type of processing on colors must roughly ollow these steps:

[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]

For the sRGB color space, the conversion functions are defined as
follows:

OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055

EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)

The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:

- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)

The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().

Here is a fairly exhaustive list of modifications implemented
in this CL:

- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
to disable linear blending. This is only for GLES 2.0 GPUs
with no hardware sRGB support. This flag is currently assumed
to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
of the source pixel. The asumption is that a bright pixel will be
blended on a dark background and the other way around. The source
alpha is gamma corrected to thicken dark on bright and thin
bright on dark to match the intended design of fonts. This also
matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
could not be sampled in sRGB without a yet-to-be-defined GL
extension
- The last column of color matrices is converted to linear space
because its value are added to linear colors

Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures

Test: Manual testing while work in progress
Bug: 29940137

Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
c69853c8b72540e5031d28e03cbce5a390c6959f 07-Oct-2016 sergeyv <sergeyv@google.com> Remove all hacks around ref counting in Bitmap
Test: refactoring cl.
bug:27762775

Change-Id: If7ebb8d5ee3a3085c1ef9ffc277cf6feaeab89e1
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
aff2f949395725f4bb82802bd12201b65d514e68 29-Jul-2016 Pablo Ceballos <pceballos@google.com> Fail createVirtualDisplay with single-buffered Surface

Bug 30106031

Change-Id: I434df329eb3c162dd9ef01245ac5e0da97216e70
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
1c9977b762b4bac46b4470f04c898bfd17da5d90 12-Jul-2016 Michael Wright <michaelwr@google.com> Rename color transform to color mode and persist the value.

Also, standardize on a set of possible modes for the displays to
enter and separate the configuration of the color mode from the
configuration of the display mode.

Bug: 29044347

Change-Id: I6af0a7d1f11bc72d4cefc380f115c1fb00788864
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
6da3cc0237d2483ead16a7013d1326bccc5112af 17-Jun-2016 Robert Carr <racarr@google.com> Implement seamless rotation mode.

Add a rotation mode which does not require freezing
the screen. For situations like Camera where only small
elements move on screen, this allows for seamless changes
of display orientation. This is achieved by transforming the
windows with their current buffer in the same transaction that
we rotate the display. We set things up so the windows are
frozen this way until they submit buffers in the new orientation.
There is a special case in the Camera window itself, and it's use
of NATIVE_WINDOW_TRANSFORM_INVERSE_DISPLAY. In this case the buffer
contents are rotated by SurfaceFlinger and will never resize, for these
windows we just need to update the scaling matrix.

Bug: 28823590
Change-Id: I52dc6a86fcb3c08f736f0977ba3975a24fb8136c
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
a9408d4a4809dd229fb7fb8f9594cb6db4b1da64 03-Jun-2016 Robert Carr <racarr@google.com> PiP animation: Move window with resize when ending animation.

At the end of the animation (when going from larger to smaller),
we are left with a scaled surface, that we want to seamlessly
resize to an unscaled surface of the new size. Because we have scaled
the shadow region of the surface, the position of the content
will differ before and after the resize applies. We use new
SurfaceFlinger API to cause position updates to apply after
resize. Because we have to switch into SCALING_MODE_FREEZE,
we could end up prematurely cropping the window, so we
switch to using screen space crop for the pinned stack.

Bug: 28899837
Change-Id: I9b762a237413e4fa3d432e67d30c7125bfef484c
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
e9953b1752a583058e639ef3de456988ab6ef7bf 24-May-2016 Robert Carr <racarr@google.com> Force pending transactions to flush before screenshot.

Following 14e54ba747 (ag/1043009) we need to push an empty
synchronous transaction if we want to ensure all previous
transactions have occured before taking a screenshot. In
light of Bug 7552304 it seems wise to do this before screenshoting
applications.

Bug: 27098060
Bug: 7552304
Change-Id: I6d7dfbe634a288c55449d2f1d6fbbfc13bab08ad
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
9ff94c0251722c44eece7c3561b4ed36b286d4a8 31-Mar-2016 Michael Wright <michaelwr@google.com> Plumb HDR capabilities to Display

Bug: 25684127
Change-Id: I0a4fcdc59aa1a7b295c8df03699466685300e735
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
54ac21918481fe6f7aac1c0effde51f9e9860ae3 25-Apr-2016 Hangyu Kuang <hkuang@google.com> Revert "Revert "Hook up HDR capabilities from native SurfaceControl""

This reverts commit 2c38f45f27079492697a391e0a6221f77f485fbc.


Bug:25684127
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
1ca6a33f36357281b3445e85d9e67cacd1a12ede 12-Apr-2016 Robert Carr <racarr@google.com> Force windows to be scalable during pinned animation.

We resize windows at the beginning of the pinned stack
animation when animating to a larger size, and so for some
duration a resize will be pending. We need to force the window
out of SCALING_MODE_FREEZE so we can animate during this period.

Bug: 27891386
Change-Id: I5cff599ed67f2c179e938662b6f0d99bd790aaba
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
2c38f45f27079492697a391e0a6221f77f485fbc 18-Apr-2016 Dan Stoza <stoza@google.com> Revert "Hook up HDR capabilities from native SurfaceControl"

This reverts commit 49d438ebdfcb7f2c202c80c820e32d1cde4bcf36.

Change-Id: Ic41e3006f06784a9fe6adaba6445bb18f2e7fad1
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
49d438ebdfcb7f2c202c80c820e32d1cde4bcf36 28-Mar-2016 Dan Stoza <stoza@google.com> Hook up HDR capabilities from native SurfaceControl

Change-Id: Icb62d67adcec142fafe9e71097d4c7db36978806
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
27982e65eebdd8c23619e29c4d85a8b208e30200 09-Mar-2016 Pablo Ceballos <pceballos@google.com> Java bindings for SurfaceControl::setFinalCrop

Bug 26559810

Change-Id: I74eefa91b2d38e55fb9e27e7dc2cd3536e610108
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
47e36a3e270ff3e94750d730ac2a9f0bdfe96c04 01-Mar-2016 Chong Zhang <chz@google.com> Force disconnect when the surface is about to be saved.

Some client will not disconnect, and if we're saving the surface (instead
of destroying it), we need to make sure the surface is disconnected.
Otherwise the client won't be able to reconnect to the same surface.

bug: 27295820
Change-Id: I471b8fbe8f590c900e17a017167466fc8a70b87a
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
64e516f5fa56d71bf6b5076e5620c30dc5810ba1 29-Oct-2015 Rob Carr <racarr@google.com> Sync SurfaceView position changes to parent render.

In order to provide pixel perfect movement of SurfaceViews
'within' other views (e.g. scrolling) we need to be able to
synchronize the attached (parent window) painting with the
movement of the SurfaceView (recall, SurfaceViews are positioned
behind their attached windows and the parent must render a
transparent region for the SurfaceView to appear). Provide
a new WindowManager method to reposition an attaching window
(that is to say, a window which has an attached window like
SurfaceView) and defer the transaction until the parent frame.
SurfaceView is hooked up to use this for movement. This is still
'racy' in the hardware accelerated case as the render thread
could be on either side of dequeing the frame we are working on.

Bug: 22802885
Change-Id: I025d2bdcbe15c1c11047cc0dbca2cf2b7d67c632
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
f35b989d26bb98900f6c5fa2e586326b30b6e161 31-Jul-2015 Leon Scroggins III <scroggo@google.com> Merge six commits from master-skia to master

Also corrects some code under development behind the HWUI_NEW_OPS flags
to match the updated Skia API.

Include external/skia/include/private
use SrcConstraint for drawBitmapRect
clean up to allow removal of flags for SCALAR_DIV and IMAGEINFO_FIELDS
don't call DEPRECATED getDevice()
update to newer API for drawBitmapRect
asABitmap is deprecated, used isABitmap

previous-Change-Id: I12208855a95948897077b1c1549eb35416cc801e
previous-Change-Id: I5044f0f61315fe48c60d7af5e261a7d0ed574f56
previous-Change-Id: Ic34a3ba77b3f9e091fa7aaba75018a307abacdab
previous-Change-Id: I79f8dd779920565d1204f7fe67b3286b1bbf4e9b
previous-Change-Id: Ic04d1f8274f6a862ea00f8d241363cf31f5ec1ec
previous-Change-Id: I9e4ae257a1976c74302b6a73f17405174ae58cec
previous-Change-Id: I85de3462ad1e4877784df38edc4bcd0acbd24e5e
Change-Id: Ide8e2f669e91a13c32521af3a16efdaa085c81d0
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
d8f904f256b82e48e9a85561eb96e15399b0b2d9 28-Oct-2015 Tom Hudson <tomhudson@google.com> Revert "Merge six commits from master-skia to master"

This reverts commit 550780745fa28ae9a87d02331841ca5ce4f9c763.

Change-Id: Ic71eccea454b26261fe6e9a9a7a24eff56396989
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
550780745fa28ae9a87d02331841ca5ce4f9c763 31-Jul-2015 Leon Scroggins III <scroggo@google.com> Merge six commits from master-skia to master

Include external/skia/include/private
use SrcConstraint for drawBitmapRect
clean up to allow removal of flags for SCALAR_DIV and IMAGEINFO_FIELDS
don't call DEPRECATED getDevice()
update to newer API for drawBitmapRect
asABitmap is deprecated, used isABitmap

Change-Id: I519f54f97321a7a365ea81a3b78cb03b9bdca021
previous-Change-Id: I12208855a95948897077b1c1549eb35416cc801e
previous-Change-Id: I5044f0f61315fe48c60d7af5e261a7d0ed574f56
previous-Change-Id: Ic34a3ba77b3f9e091fa7aaba75018a307abacdab
previous-Change-Id: I79f8dd779920565d1204f7fe67b3286b1bbf4e9b
previous-Change-Id: Ic04d1f8274f6a862ea00f8d241363cf31f5ec1ec
previous-Change-Id: I9e4ae257a1976c74302b6a73f17405174ae58cec
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
7e1d861a9a3f76e1f79eb6806d4aa8bbeb560773 16-Oct-2015 Rob Carr <racarr@google.com> Revert "Sync SurfaceView position changes to parent render."

This reverts commit 6104dc95606b3399356dd011ca6d71fcd954154c.

Change-Id: If9d709bc65e7a817bd2c1b5768c7c33a9317638f
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
6104dc95606b3399356dd011ca6d71fcd954154c 28-Sep-2015 Robert Carr <racarr@google.com> Sync SurfaceView position changes to parent render.

In order to provide pixel perfect movement of SurfaceViews
'within' other views (e.g. scrolling) we need to be able to
synchronize the attached (parent window) painting with the
movement of the SurfaceView (recall, SurfaceViews are positioned
behind their attached windows and the parent must render a
transparent region for the SurfaceView to appear). Provide
a new WindowManager method to reposition an attaching window
(that is to say, a window which has an attached window like
SurfaceView) and defer the transaction until the parent frame.
SurfaceView is hooked up to use this for movement. This is still
'racy' in the hardware accelerated case as the render thread
could be on either side of dequeing the frame we are working on.

Change-Id: Ic33915043380ab8cd9eb4920e224b35234ed867d
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
434a481b2191562582c79be29f24c2e0b5ca60d0 24-Sep-2015 Elliott Hughes <enh@google.com> am ea1831d2: am b57dd722: resolved conflicts for a884d81e to stage-aosp-master

* commit 'ea1831d211ea0e6b2d161c714bb0786369ef2df5':
constify JNINativeMethod function pointer tables
ea1831d211ea0e6b2d161c714bb0786369ef2df5 24-Sep-2015 Elliott Hughes <enh@google.com> am b57dd722: resolved conflicts for a884d81e to stage-aosp-master

* commit 'b57dd722f1dc0663417da37d3a82f8283ad3c982':
constify JNINativeMethod function pointer tables
b57dd722f1dc0663417da37d3a82f8283ad3c982 24-Sep-2015 Elliott Hughes <enh@google.com> resolved conflicts for a884d81e to stage-aosp-master

Change-Id: Ice485967fa96f13786024b6939b826638e906ff0
76f6a86de25e1bf74717e047e55fd44b089673f3 19-Sep-2015 Daniel Micay <danielmicay@gmail.com> constify JNINativeMethod function pointer tables

Change-Id: I4036c924958221cbc644724f8eb01c5de3cd7954
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
4b4d29a6fa63b685ec107af90766d5ea16566151 04-Sep-2015 Dan Stoza <stoza@google.com> am 8dcd14cd: am 4a90942e: am f615872c: am 0b887e57: Merge "SurfaceControl: Add colorTransform to DisplayInfo" into mnc-dr-dev

* commit '8dcd14cdc95a5b71597fa428b9c2a45c3a86944c':
SurfaceControl: Add colorTransform to DisplayInfo
904f485bc6013060e81b627be61314b3d7fe5ef8 31-Aug-2015 Dan Stoza <stoza@google.com> SurfaceControl: Add colorTransform to DisplayInfo

Adds the colorTransform field, which defines a vendor-specific color
transform (e.g., wide gamut, sRGB, etc.) to the PhysicalDisplayInfo
class, and populates it from the corresponding field from
ISurfaceComposer.

Bug: 20853317
Change-Id: Ic59ca5142bdaa73c42d9c044d7aae345255f1dad
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
60126efd7d905ca24822765c6dafac17fef278ab 07-Aug-2015 Ben Wagner <bungeman@google.com> Use unique_ptr instead of SkAutoTDelete.

Skia would like to make SkAutoTDelete private, given that unique_ptr
now exists and is a better standard alternative.

Change-Id: Ie21bc4546c93e2096c1e43b26eb3ef80b8f11de4
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
ae2e8b4891491e8e89bed5f2c9626415adee09cb 06-May-2015 John Reck <jreck@google.com> Add warning if an in-use Bitmap is reconfigured

Bug: 18928352

Also fix an issue around re-configure not properly handling
mPinnedCount in android::Bitmap

Change-Id: I1815b121f1474ad931060771bb1d52ef31d2aac7
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
f29ed28c7b878ef28058bc730715d0d32445bc57 07-Apr-2015 John Reck <jreck@google.com> Attempt to solve the double-GC problem

Fix the issue where Bitmap requires two GC passes
to release its byte[] by using some questionable
ref-counting hacks to manage whether or not
native has a strong or weak ref to the byte[]

Change-Id: Ia90a883579f61c0b1904b5549a66bd0ef34b32c5
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
73f9c7d478010c9692ea46526e0dd5e91dc00299 27-Feb-2015 Mike Reed <reed@google.com> don't reference (deprecated) kIgnore_SkAlphaType

Change-Id: I6c09845c48efc66a1057bc8db512b7567ade7e72
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
ed6b9dff563c5e22f040ff37e12c0d771e0478ae 21-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Consistency in core/jni

Make consistent use of core_jni_helpers for registration.

Translate some #ifdefs into const bools.

Change-Id: I37639aa053dd50f003a552cbd8550dddecc811c5
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
0f0b4919667f418b249c497f5ad3e83fdf4437e5 12-Nov-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in core/jni

Turn on -Wall -Werror in core/jni. Fix warnings.

Clang TODO: For GCC we need to turn off Wunused-but-set-variable in
the GL bindings. However, Clang doesn't have that warning and thus
complains about an unknown pragma. It is necessary to make the
pragma #ifdef-ed on the compiler being GCC.

Change-Id: I14cab48d45c2771eef0432082356c47ed44a3d7f
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
1d13406538b79785d2d0928689b8d5037e851ecf 22-Aug-2014 Riley Andrews <riandrews@google.com> Use surfaceflinger for recents thumbnail rotations.

+ This removes 30ms of latency on app to home transitions
on volantis.
Change-Id: Ia3747b8f8be0d41b9b3d095753edfe1df185c84d
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
5474f3396a963196fa6dc05add85429e2358ec1a 22-Aug-2014 Thierry Strudel <thierry.strudel@intel.com> SurfaceControl: free ref when not used anymore

C standard does not ensure order in which arguments are evaluated leading to
faulty behavior in x86 case.

Bug: 17206275

Change-Id: I6553c55bcf646d93413135aed733f20b91852735
Signed-off-by: Thierry Strudel <thierry.strudel@intel.com>
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
01e840ff9441e005153d799e71d65b38bcb21902 27-Jun-2014 Michael Wright <michaelwr@google.com> Add resize method for virtual displays

Change-Id: I2632fc56c2d2cba356379e42f5c1a3e283b11d1e
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
b933055cf3f7f8ea89bfd3bc9c37a3891ff7310a 16-Jun-2014 Mike Reed <reed@google.com> stop using (deprecated) SkBitmap::Config

Change-Id: Ic75b5fc6996578e9d95bd3a220439ec1541d7c3b
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
e8b1aeb51e1e5da64f1d4fd40f2ee1e815886fe5 13-Jun-2014 Andy McFadden <fadden@android.com> Add two new display info fields

This adds SurfaceFlinger's app VSYNC offset and buffer deadline
values to DisplayInfo. The values will be available to apps
through queries on a Display object (currently hidden).

Bug 14612039

Change-Id: I48760f58a9d74d99651b02a9d595f420410f2bb5
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
98908aa0c97d9685045a168ca39ec1ee7988dabe 12-Jun-2014 Jeff Brown <jeffbrown@google.com> Merge "Add call to set power mode for display"
e3f9800f38da3cd1d83889132952eb4ab2e8c278 10-Jun-2014 Leon Scroggins III <scroggo@google.com> Fix a memory leak with empty screenshot.

Use an autodeleter to delete the ScreenshotClient when it's not
needed.

Discovered while investigating BUG:15454296, but it does not fix
the problem.

Change-Id: I00ea81de15ddc2507d904a6c20af3c410f573dce
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
c55929a2a5686fe456b19cd54a73b8bde2a4332b 25-May-2014 Prashant Malani <pmalani@google.com> Add call to set power mode for display

The blank/unblank interface is being replaced by a generic
setPowerMode() call. This will allow the support of low power modes in
displays where such functionality is available. Currently three modes
are defined:

- POWER_MODE_OFF
- POWER_MODE_DOZE
- POWER_MODE_NORMAL

POWER_MODE_OFF would be analogous to blanking the screen,
POWER_MODE_NORMAL akin to unblanking it, and POWER_MODE_DOZE would
trigger an entry into the display's low power mode.

We also tie the JNI call to set power mode to the call from services which
actually invokes it.

The generic setPowerMode() call can be expanded to potentially include
other display power states.

Bug: 13472578
Change-Id: I74677506d3ee2ccc50ba70c5102d96b31fe7b837
Signed-off-by: Prashant Malani <pmalani@google.com>
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
9890e341bf9d565309cd7db5e6c4194c66c0a1d8 23-May-2014 Dan Stoza <stoza@google.com> 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
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
00101052b5bf99a29acea3525864ed64b709c16c 03-May-2014 Dan Stoza <stoza@google.com> Enable changing display configuration

This allows querying and switching display device configurations
through the ISurfaceComposer/SurfaceComposerClient interface.

Bug: 14320401
Change-Id: Ie4363bc8353d95428f1114ea48e5b1c8976e1730
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
ac5eda366fafce6ec9fd89b14e31f4aaaf08f762 24-Apr-2014 Allen Hair <allenhair@google.com> Fix nativeGetAnimationFrameStats to use the correct times.

Changed the method to use actualPresentTimesNano instead of
desiredPresentTimesNano when initializing WindowAnimationFrameStats. The
WindowAnimationFrameStats.init(..) method expects the actual
presentation times, not the posted times.

Additionally, the desiredPresentTimesNano values are all invalid
(INT64_MAX) when working with window animation frames.

Change-Id: I5e5ce888dac859179ef06e4bbd8bfbd959521dd2
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
1376d600d8e0eefdbc0aa11d398cf7517fc77129 13-Mar-2014 Svetoslav <svetoslavganov@google.com> Adding render stats APIs to UiAutomation (framework).

bug:12927198

Change-Id: Iae21481c75ae58dcdab3731bf5f1e2844e29d434
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
46cb9bdbf56b27cbf2ab878b41d21e30896a4fea 06-Mar-2014 Leon Scroggins <scroggo@google.com> Update framework to use M34 version of Skia.

These changes are needed due to changes in the Skia API.

Depends on https://googleplex-android-review.git.corp.google.com/#/c/439626/1
(Ic3cf846b74d6f10ec30c477b50fd774cc30ad52c)

BitmapFactory.cpp:
Use SkColorType instead of SkBitmap::Config, where possible.
Call SkBitmap::info() instead of deprecated SkBitmap::asImageInfo().
Remove calls to deprecated SkBitmap::getSize64().

Canvas.cpp:
ColorFilter.cpp:
Matrix.cpp
Remove the deprecated SK_SCALAR_IS_FIXED path. Leave in an else case for
SK_SCALAR_IS_FLOAT, to allow for eventual SK_SCALAR_IS_DOUBLE path.

Graphics.cpp:
Like in BitmapFactory.cpp, use new methods for determining the size of
pixels.

Paint.cpp:
Use more precise SkScalar_ToInt versions of macros.

TextLayoutCache.cpp:
Fix bug in macro definition for HB_SurrogateToUcs4.
Use the new name for SkCreateTypefaceForScriptNG.

android_view_SurfaceControl.cpp:
Replace ScreenshotPixelRef with a Skia pixel ref.

This is a merge from master-skia branch:
https://googleplex-android-review.git.corp.google.com/#/c/430554/
(Ie11503bcefd3883c466279fde5ce147c8a72b452)

Change-Id: Idf15746f93dabeb7862ac02cc6bd925f0dcc68ba
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
b644a3b84521e2155a5af985a4d4ed305474e567 17-Jan-2014 Derek Sollenberger <djsollen@google.com> Updates to the Skia API needed to merge the WebView m33 version of Skia.

This is a cherry-pick of 2 CLs:

21969a2b26945da3fd86aef7c93479e4fb359a65
c7a581cf7691db5c61e6694aa51daaa994004bd9

Change-Id: I6fd9366fbba0a336de1df794be9497983bfd13ae
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
16ec12ae77fdd2b09ea0ea0885ac52f11bd32c59 15-Feb-2014 Dan Stoza <stoza@google.com> Allow disabling layer rotation during screenshots

Add the ability to ignore layers' transformation matrices during
screenshot capture, which will allow the window manager to capture
unrotated images for recents during the device rotation animation.

Bug: 11805195
Change-Id: I96e65506b198d34724eb3aa84815aae6f6de4935
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
36bef0bf30d6bae48cf3837df351075ca4fce654 20-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make graphics classes 64-bit compatible

This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
be 64-bit.

[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
yet. Specifically mAtlasMap member has to be converted
to hold native pointer using long. Added a TODO to
AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Id5793fa0ebc17ee8b1eecf4b3f327977fdccff71
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
7023df08f14ec5dee76ac54c03e870f84e297636 27-Jan-2014 Narayan Kamath <narayan@google.com> Revert "AArch64: Make graphics classes 64-bit compatible"

This reverts commit 18b4cbeedef21c1fa666a110a157bab66edff976.

Change-Id: I0c52983a3ab1ace3ff743de546a43eca28e5cb0e
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
18b4cbeedef21c1fa666a110a157bab66edff976 20-Jan-2014 Ashok Bhat <ashok.bhat@arm.com> AArch64: Make graphics classes 64-bit compatible

This a merger of two commits submitted to AOSP by
the following authors:

ashok.bhat@arm.com, david.butcher@arm.coma
craig.barber@arm.com, kevin.petit@arm.com and
marcus.oakland@arm.com

Due to the very large number of internal conflicts, I
have chosen to cherry-pick this change instead
of letting it merge through AOSP because the merge
conflict resolution would be very hard to review.

Commit messages below:

================================================
AArch64: Make graphics classes 64-bit compatible

Changes in this patch include

[x] Long is used to store native pointers as they can
be 64-bit.

[x] Some minor changes have been done to conform with
standard JNI practice (e.g. use of jint instead of int
in JNI function prototypes)

[x] AssetAtlasManager is not completely 64-bit compatible
yet. Specifically mAtlasMap member has to be converted
to hold native pointer using long. Added a TODO to
AssetAtlasManager.java to indicate the change required.

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Craig Barber <craig.barber@arm.com>
Signed-off-by: Kévin PETIT <kevin.petit@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

==================================================================

AArch64: Use long for pointers in graphics/Camera

For storing pointers, long is used in
android/graphics/Camera class, as native
pointers can be 64-bit.

In addition, some minor changes have been done
to conform with standard JNI practice (e.g. use of
jint instead of int in JNI function prototypes)

Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>

===================================================================

Change-Id: Ib3eab85ed97ea3e3c227617c20f8d213f17d4ba0
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
8790be6de3644e332ec6a17c855da89ffc13a9bf 03-Dec-2013 Leon Scroggins III <scroggo@google.com> Remove calls to deprecated SkBitmap::setIsOpaque()

setIsOpaque() has been removed from ToT Skia.

Update setters for mIsPremultiplied and hasAlpha to take the
other into consideration.

Change-Id: I1b36b0b0ce7126031eb7b769b563c17dcd4b306a
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
1abf5d62429e5a9329520b2f7c2b5a5e7a8e72ec 16-Aug-2013 Chris Craik <ccraik@google.com> Add inPremutiplied option to BitmapFactory.Options, functionality in Bitmap

bug:2248948

Change-Id: I8fdd649332667598504a1076d5a447572bd53086
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
6a6bc216d15293886ad088bb0ca99aadb7df85dc 08-Aug-2013 Jesse Hall <jessehall@google.com> Use new ISurfaceComposer::destroyDisplay method

Bug: 10191053
Change-Id: I3ecc6880db4a4c77c6db4e8b50faa9b4021d17c6
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
b251f3d0c619c37cc4e4b8d9f8b95eb377423190 26-Jul-2013 Mathias Agopian <mathias@google.com> get rid of HAL pixelformats 5551 and 4444

Change-Id: I6a6c4c656d80280eb85f90f99f35721ffca285df
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
6f7b58917104916ee6afd6f246c251c1d7a2102a 26-Jul-2013 Mathias Agopian <mathias@google.com> get rid of PIXEL_FORMAT_A_8

Change-Id: Ia750811f08ddebdd5818da211fd03d61b75f8e97
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
32b9f6258d052c8c334ae348322fed9ba032a09f 22-Mar-2013 Mathias Agopian <mathias@google.com> Revert "make sure screenshot are in a format supported by Bitmap.java"

This reverts commit 74beb8953789635ad50fa979cf9ac8178a78cb81.

it was checked-in by mistake
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
74beb8953789635ad50fa979cf9ac8178a78cb81 22-Mar-2013 Mathias Agopian <mathias@google.com> make sure screenshot are in a format supported by Bitmap.java

Change-Id: Ic3ab7db31f1810ea19aac55d448dd1d4d6c419e4
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
b1d90c8f60f71422196c337f1d078b68867f5710 07-Mar-2013 Mathias Agopian <mathias@google.com> fix JNI use of incStrong/decStrong

Change-Id: Ia11b404dea483dc19bbc30f4d7bcff516655e180
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
0449a40586b45ee05f760802020dc2f8a6e0506b 02-Mar-2013 Mathias Agopian <mathias@google.com> screenshots can now go into a Surface from java

A Surface can trivially be created from a SurfaceTexture.
Update ElectronBeam to use this new API.

Bug: 6940974
Change-Id: I20459443d0d853e3f8ae23104c08d185c336abea
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
ffddc9b8045235a493ec506965ae4892601eb23d 26-Feb-2013 Mathias Agopian <mathias@google.com> Fix SurfaceControl.setDisplaySurface() such that it accepts a null Surface

also fix a typo that made us call the wrong Surface ctor

Bug: 8225509
Change-Id: I23f92179b6003d4c3e0febb35166c1caeafa27f5
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
76f56dd598045dadae6dee5e8547bd077b980d5c 15-Feb-2013 Mathias Agopian <mathias@google.com> am ceec31b7: Merge changes I5a218ca1,I853a76d9

* commit 'ceec31b7dab6a23e443d5dcbcfac4a23b720cfde':
Refactoring: Rename SurfaceTextureClient to Surface
clean-up following Surface split
52800617946c456e78ed010c82d0ec4358368164 15-Feb-2013 Mathias Agopian <mathias@google.com> Refactoring: Rename SurfaceTextureClient to Surface

Change-Id: I5a218ca11abeeec05e3a4c3cfc581bcc788814ea
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
29479ebe1007361222bf6ab4d5e2a27927d4b8e8 14-Feb-2013 Mathias Agopian <mathias@google.com> clean-up following Surface split

Change-Id: I853a76d92d957ee38a36fcdd280d6407ec316987
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
e32e2b343dca94086badfe34080fb24b4215db27 15-Feb-2013 Kristian Monsen <kristianm@google.com> Fixup from merge, and compile fix due to different skia version

Change-Id: I644c5148904893a2854207f4d566395d973d4aff
/frameworks/base/core/jni/android_view_SurfaceControl.cpp
3866f0d581ceaa165710feeee9f37fe1b0d7067d 12-Feb-2013 Mathias Agopian <mathias@google.com> split Surface in two classes: SurfaceControl and Surface

SurfaceControl is the window manager side; it can
control the attributes of a surface but cannot push buffers
to it. Surface on the other hand is the application (producer)
side and is used to push buffers to the surface.

Change-Id: Ib6754c968924e87e8dd02a2073c7a447f729f4dd
/frameworks/base/core/jni/android_view_SurfaceControl.cpp