3698 Commits

Author SHA1 Message Date
Le-Chun Wu
da13560de2 Add a call to pthread_attr_destroy to avoid potential memory leaks.
Change-Id: Ib57efc3530e9793298190cc9cab19c9af54e11a7
2011-07-14 20:14:07 -07:00
Jamie Gennis
06b54d7184 Merge changes Id9aa1003,I8c154189
* changes:
  SurfaceTexture: make (dis)connect into an IPC
  SurfaceTexture: add support for new connect values
2011-07-14 17:54:27 -07:00
Jamie Gennis
9709687463 SurfaceTexture: make (dis)connect into an IPC
This change makes the ANativeWindow connect and disconnect calls result
in an IPC to the SurfaceTexture object.  This will allow us to prevent
multiple simultaneous connections from different processes.

Change-Id: Id9aa1003b1335b96ca6bd4a1f5a67aa433d42efb
2011-07-14 17:48:32 -07:00
Jamie Gennis
ec7ea37a0e SurfaceTexture: fix SurfaceTextureGLToGLTest
This change fixes a couple different issues in the
SurfaceTextureGLToGLTest test fixture:
  - incorrect use of conditions
  - move logging after the locks are acquired
  - call the parent class's TearDown method
  - clean up the SurfaceTexture before eglTerminate gets called

Change-Id: I6960e5ab7f144225f01a2089d3f849c99fed0b38
2011-07-14 17:11:47 -07:00
Jamie Gennis
a775f0d419 SurfaceTexture: add support for new connect values
This change adds support to SurfaceTextureClient for the new enum values
that can be passed to the ANativeWindow connect call.

Change-Id: I8c15418909e43a15673a9b22a5eb40df6923b273
2011-07-14 15:03:33 -07:00
Jeff Brown
ab561139f9 Minor code cleanups in vector.
Fixed a potential bug where calling replaceAt with a reference to
an existing element in the vector at the same index would cause
the element to be destroyed while being copied to itself.

Refactored the conditions in _grow and _shrink for clarity.
The computations are exactly the same but I think it reads better
this way.  In particular, the ssize_t variable 's' is gone: it didn't
need to be signed anyways because its value could never be negative.

Change-Id: If087841c15e6a87160eee874720c4a77eb0e99a6
2011-07-14 04:11:23 -07:00
Jeff Brown
11bf79d6e3 Replace Vector _grow/_shrink checks with assert.
On review of the code, _grow and _shrink are checking for conditions
that cannot happen and that don't even really make sense.  For
example, if _shrink is called with where + amount > mCount then
this is really bad, however the check only considered the case
when where >= mCount and then it would arbitrarily choose a new
value for where.  Huh?

As it happens, the callers are correctly validating the
arguments before passing them down to these methods so we can
get rid of this code.

Change-Id: I921852dba8997065bb0e9cac733e82028d14afcd
2011-07-14 04:11:22 -07:00
Jeff Brown
f7537bccb2 Provide more descriptive name for InputChannel ashmem.
Change-Id: I4307de9f717ac4810b1b91ee0c1a3899325acf71
2011-07-13 22:27:37 -07:00
Alex Sakhartchouk
1bfcceaca6 For the serialization context, no fifo initialization is necessary.
On shutdown it was attempting to free uninitialized memory.

Change-Id: I9141be5a51253f87f21594ae38f7e653f9e69c6c
2011-07-13 17:32:05 -07:00
Mike Lockwood
e67ebacd15 Merge "Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build" 2011-07-13 16:46:50 -07:00
Mike Lockwood
c1b9bbb21c Remove some #ifdef HAVE_ANDROID_OS that were needed for the simulator build
Change-Id: I13d9f251f86c05ae5405f37adbf6b8e9660935ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-07-13 19:45:44 -04:00
Jason Sams
b328269531 Merge "Fix native crash when GL driver fails to initialize." 2011-07-13 16:43:27 -07:00
Jason Sams
fb06b7a551 Fix native crash when GL driver fails to initialize.
Change-Id: I85714de9029285027dc75fb3b62076be41a4c985
2011-07-13 16:09:42 -07:00
Kenny Root
f953dee175 Merge "Fix debugging for hwui caches" 2011-07-13 15:53:03 -07:00
Christopher Tate
9a79cda53b Merge "Compress the backup output stream" 2011-07-13 15:37:21 -07:00
Christopher Tate
7926a693c4 Compress the backup output stream
Zlib compression, with a full flush between each application's
data.  Encryption will be performed on the already-compressed data
once that's implemented.

On restore, the streamed data is similarly uncompressed on the fly.

Change-Id: I19b65c88e759a66527d10913d18fffa9df0bc011
2011-07-13 15:30:41 -07:00
Jason Sams
3ac60ada27 Merge "Add slot number to forEach hal." 2011-07-13 12:28:38 -07:00
Jason Sams
92b0eab07e Add slot number to forEach hal.
Change-Id: I0f2992d5f4128422d07f897b335c219cc7f1d02c
2011-07-13 11:26:26 -07:00
Kenny Root
042f7d64b5 Fix debugging for hwui caches
Debugging code attempted to delete a stack item.

Also, the flag fields weren't exactly clear, so rewrite it so it's
clear that kDebugMoreCaches is a combined flag.

Change-Id: If42b7f0f754919343301da5656aee5943cc9bd4a
2011-07-13 09:51:00 -07:00
Alex Sakhartchouk
5b7da3d3df Merge "Fix for the renderscript ref counting bug." 2011-07-12 16:27:09 -07:00
Alex Sakhartchouk
4b013ee9b7 Fix for the renderscript ref counting bug.
This only manifested itself in the situations where elements containing multiple ref counted objects were copied from Java.

Change-Id: I2c1cc89fe7f792259b3f033674142eb33d17a507
2011-07-12 13:25:14 -07:00
Jeff Brown
8c55a9a57e Merge "Remove the simulator target from all makefiles. Bug: 5010576" 2011-07-12 12:15:07 -07:00
Jeff Brown
bd882b1c87 Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2011-07-11 22:12:16 -07:00
Jamie Gennis
5263454243 SurfaceTexture: add a multi-SurfaceTexture test
This change adds a test that does simple, unverified GL rendering to
multiple SurfaceTextures.

Change-Id: I51a41d68ae5a27e01ae93842242897b0d3558ca6
2011-07-11 19:06:39 -07:00
Mathias Agopian
e92963c3f9 Merge "Fix typo in an assert's log" 2011-07-11 18:30:29 -07:00
Mathias Agopian
cf7e3a5984 Fix typo in an assert's log
Change-Id: I94883a23a0a92eaf3e4976f942f747a2137499ac
2011-07-11 16:26:18 -07:00
Jamie Gennis
308f9f6b24 Merge "EGL: fix the ANativeWindow size/fmt override" 2011-07-11 15:47:20 -07:00
Jeff Brown
501c4671e7 Merge "Eliminate single-process mode. Bug: 5010576" 2011-07-11 13:37:53 -07:00
Jamie Gennis
97eae025ad EGL: fix the ANativeWindow size/fmt override
This change fixes how the Android EGL layer overrides the size and
format of an ANativeWindow in eglCreateWindowSurface.  The new behavior
is to leave the size untouched when overriding the format.  The previous
behavior was to reset the ANativeWindow to use the default size set by
the ANativeWindow implementation.

It also adds two new 'perform' methods to the ANativeWindow interface:
set_buffers_dimensions and set_buffers_format, and redefines the
behavior of set_buffers_geometry to be the combination of these two new
methods.

Additionally, this change adds an error check for the return value of
the new native_window_set_buffers_format call, which required adding a
(stub) handler for to FramebufferNativeWindow.

Change-Id: I805c7ccd8d4730dfb132d10d8bc3fb058a0b9df1
2011-07-11 12:31:45 -07:00
Logan Chien
ef72ff220c Use resource entry name instead of mangled name.
Change-Id: I833fa1b529fe505ce20ede12b7f4b5952a6ac1f0
2011-07-11 15:32:24 +08:00
Logan Chien
e723caee39 Fix typo: mFieldCount -> mPragmaCount.
Change-Id: I081a521c13a78bc5ec1bf9faecb066bed5ca8ab4
2011-07-11 07:57:24 +08:00
Jeff Brown
10e8971286 Eliminate single-process mode.
Bug: 5010576

Change-Id: Id450dc83efed4897d1e4ff451530fed14457aace
2011-07-08 19:54:07 -07:00
Romain Guy
3b240117d1 Merge "Align paths on pixel boundaries when rasterizing in bitmaps. Bug #5003739" 2011-07-08 16:53:23 -07:00
Romain Guy
40c4b86b72 Align paths on pixel boundaries when rasterizing in bitmaps.
Bug #5003739

Change-Id: I3dfbf4eb92e2c870f33c96947a7d6439e3730965
2011-07-08 16:50:15 -07:00
Mathias Agopian
1861786a97 Fix EGLUtils::selectConfigForPixelFormat()
- renderscript now calls EGL directly instead of relying on this function
- surfaceflinger also does its own EGLConfig selection
- selectConfigForPixelFormat stays for legacy reason (many tests use it) but
it now only tries to match the alpha channel of the format rather than the
format itself.

this will allow implementations who don't support the exact formats
defined in the HAL to work properly.

Bug: 4998223

Change-Id: Ic664dfc14d5072a514b6f77a115d1521bfc1578f
2011-07-08 14:37:05 -07:00
Romain Guy
44476779ae Merge "Correctly position layers." 2011-07-08 11:58:18 -07:00
Romain Guy
b2479153b7 Correctly position layers.
Change-Id: I1678b1c5bdab140b44e56556c50ab8329255f18a
2011-07-08 11:57:29 -07:00
Glenn Kasten
33eafef1a9 Add C++ thread API androidGetThreadSchedulingGroup
This API is intended for applications that need to read a thread's
scheduling group, while using the higher-level (C++) family of thread APIs.

Change-Id: I5e58017f74c3989b20b5b1cc2bc4483c95720520
2011-07-08 10:11:08 -07:00
Romain Guy
e92096fa6a Merge "Use NEAREST filtering mode for TextureView.getBitmap()." 2011-07-07 21:28:41 -07:00
Romain Guy
ec19b4a764 Use NEAREST filtering mode for TextureView.getBitmap().
Change-Id: I4649062bbdf18ebba7924bdf578f39ad8f6576ac
2011-07-07 21:27:14 -07:00
Romain Guy
69abbd8791 Merge "Use NEAREST filtering for layers whenever possible." 2011-07-07 20:55:08 -07:00
Romain Guy
9ace8f5e79 Use NEAREST filtering for layers whenever possible.
Change-Id: Id5bee1bd4a322cf93e8000b08e18f1e1b058648e
2011-07-07 20:50:11 -07:00
Jamie Gennis
19a695c477 Merge "SurfaceTexture: enable newly passing tests." 2011-07-07 14:42:12 -07:00
Jamie Gennis
413b3f7382 SurfaceTexture: enable newly passing tests.
This change enables the following four SurfaceTextures tests:
  UpdateTexImageBeforeFrameFinishedWorks
  UpdateTexImageAfterFrameFinishedWorks
  RepeatedUpdateTexImageBeforeFrameFinishedWorks
  RepeatedUpdateTexImageAfterFrameFinishedWorks

Change-Id: I7632630bc97873e50d4a765ffc44a86f16ae62f1
2011-07-06 14:47:47 -07:00
Glenn Kasten
5161eb7b23 Merge "Add Thread::join" 2011-07-06 11:37:53 -07:00
Mathias Agopian
7893c5e83c Merge "fix ScreenshotsOfProtectedBuffersFail" 2011-07-06 11:10:06 -07:00
Mathias Agopian
7eef784ea9 Merge "return an error code with gralloc buffer allocation failures" 2011-07-06 11:09:55 -07:00
Glenn Kasten
4431c05f13 Merge "Thread ID zero for androidSetThreadSchedulingGroup" 2011-07-05 15:08:31 -07:00
Mathias Agopian
994e7619a6 fix ScreenshotsOfProtectedBuffersFail
- put the test window at the front most screen position
- use RGBA_8888 which is a mandatory format
- handle devices that don't support the protected usage flags

Bug: 4950464

Change-Id: I0005fb667cfe094e5978816e2924b294c5ef817e
2011-07-01 15:41:32 -07:00
Mathias Agopian
eec0f7ebac return an error code with gralloc buffer allocation failures
Change-Id: I471e5d37ea7a42fc8a0f93446ee3b4229da37807
2011-07-01 14:53:49 -07:00