Commit Graph

1424 Commits

Author SHA1 Message Date
Jamie Gennis
3d8063b02e SurfaceTexture: change onFrameAvailable behavior
This change alters the conditions under which the onFrameAvailable
callback gets called by the C++ SurfaceTexture class.  The new behavior
is to call the callback whenever a frame gets queued that will be
visible to the buffer consumer.  This means that buffers queued in
synchronous mode always trigger the callback, as those buffers will
remain pending until they are consumed.  Buffers queued in asynchronous
mode will only trigger the callback if there was not previously an
unconsumed buffer pending.

The new behavior means that a consumer should perform a draw operation
exactly once for every onFrameAvailable call that it recieves.  This
change also modifies SurfaceFlinger and the SurfaceTexture JNI to
support of the new behavior.

Change-Id: I8b2c6e00961d3d58b11c6af50b555b6e4c5f5b40
2011-06-27 15:45:39 -07:00
Christopher Tate
8408da0556 Merge "Fix settings restore" 2011-06-24 15:15:51 -07:00
Christopher Tate
cd604a1a6e Fix settings restore
Also correct the debug-mode logging of error locations in backup data.
Bug 4914182

Change-Id: Ie7dda0192afa819e42490b7ffd2d3db6f11968f6
2011-06-24 15:06:48 -07:00
Grace Kloba
14a0e58074 Add allowSynchronousMode to SurfaceTexture constructor.
Change-Id: I54f30a3c16bbe6b813f3bcd1d389da5627531304
2011-06-23 21:21:47 -07:00
tedbo
1e7fa9e945 Add method to create a ParcelSurfaceTexture from android.view.Surface.
Change-Id: I05e343ab7e327478f60322af9373574b70c148f5
2011-06-22 16:18:09 -07:00
Jamie Gennis
c8c5152b19 SurfaceTexture: make tests use a large framebuffer.
This change makes the SurfaceTexture GL tests use a large (512x512)
framebuffer.  The tests now use glViewport to render to a region of the
framebuffer with a size matching that of the texture being drawn.  The
Npot test pixel checks must be changed because now the rendered region
is the same size as the texture.

Change-Id: Icc41803189c25e33ba1da7d2470720f0a11f3e4b
2011-06-20 15:42:57 -07:00
Jamie Gennis
b36bb97ae3 Merge "SurfaceTexture: fix a NULL ptr dereference." 2011-06-20 15:34:00 -07:00
Jamie Gennis
1c4414091c SurfaceTexture: fix a NULL ptr dereference.
This change adds a NULL check when searching the slot list in
SurfaceTextureClient for the slot corresponding to a buffer being
queued or canceled.

Bug: 4645023
Change-Id: I806cbc1e34da118ea33a83c4f25ce8193ba1c3ad
2011-06-20 14:16:49 -07:00
Jamie Gennis
28bca1a772 Merge "SurfaceTexture: enable a test that now passes." 2011-06-17 10:45:15 -07:00
Jamie Gennis
4661a50121 Merge "SurfaceTexture: enable a test that is now passing." 2011-06-17 10:45:01 -07:00
Kenny Root
111280a8de Use rand() for MinGW
The version of MinGW we use doesn't have nrand48() which is really lame,
but we need to use libutils in the Windows SDK.

Change-Id: If854c03dbf02bc29e79f49e4539f08c2bf057517
2011-06-15 20:55:49 -07:00
Jamie Gennis
07ed1a94bc SurfaceTexture: enable a test that now passes.
This change enables the QueryFormatAfterSettingWorks.

Change-Id: Ic868011a36a6c86c8646880246cd5b6960a13364
2011-06-15 12:44:01 -07:00
Jamie Gennis
d05bb2ed4c SurfaceTexture: enable a test that is now passing.
This change enables the TexturingFromCpuFilledYV12BufferPow2 test.

Change-Id: Ib356ee3d2f8979f34f849fd4090f598295e2e92e
2011-06-15 12:44:01 -07:00
Glenn Kasten
982a69f827 Merge "Bug 4608375" 2011-06-14 17:54:25 -07:00
Jamie Gennis
5dd0c4fd7e SurfaceTexture: increase the test's Surface layer.
This change increases the Surface layer used for displaying the test
results so that the tests will be visible over other windows in the
system.

Change-Id: I47f147f8743ff2a39d57d551811668371202bd31
2011-06-14 13:45:53 -07:00
Jamie Gennis
1876d13e45 SurfaceTexture: add some RGBA_8888 tests.
Change-Id: Id09915c98a00eca1209b7dab32039a06d260908e
2011-06-14 13:45:53 -07:00
Jamie Gennis
8b69defa2f SurfaceTextureClient: minor test refactoring.
Change-Id: Iabc6d27ca35d30d896c6aef65c4f1b5a1eed47b8
2011-06-14 13:45:52 -07:00
Jamie Gennis
135abde4c2 Merge "SurfaceTexture: add a format querying test." 2011-06-14 13:39:05 -07:00
Glenn Kasten
f0c412513f Bug 4608375
Update priority and policy together for audio threads

Change-Id: Ib3b07b32586c222c4aacbf23414ae8b05db502be
2011-06-14 10:41:50 -07:00
Mathias Agopian
ddc31c3e2b fix RefBase so it retains binary-compatibility with gingerbread
Bug: 4595257
Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
2011-06-13 18:39:45 -07:00
Mathias Agopian
80728d87c9 Merge changes I9b8e1962,I7bb843ca
* changes:
  Temporarily don't return the current buffer in synchronous mode
  unify SurfaceTexture and Surface
2011-06-13 17:20:53 -07:00
Mathias Agopian
e122079be6 Temporarily don't return the current buffer in synchronous mode
activate synchronous mode by default.
2011-06-13 15:51:35 -07:00
Mathias Agopian
a67932fe68 unify SurfaceTexture and Surface
Add the concept of synchronous dequeueBuffer in SurfaceTexture
Implement {Surface|SurfaceTextureClient}::setSwapInterval()
Add SurfaceTexture logging
fix onFrameAvailable
2011-06-13 15:51:35 -07:00
Jamie Gennis
a6f35dd36e SurfaceTexture: add a format querying test.
This change adds a test to verify that querying the format of a
SurfaceTextureClient immediately after setting it returns the correct
result.  The test is currently disabled because it does not pass.

Change-Id: I5bddb39c5bf96d6104624094383d410ed913e9f3
2011-06-13 15:01:05 -07:00
Jamie Gennis
9fbf761e44 Merge changes Ic9186db2,Id5a7cdff
* changes:
  SurfaceTexture: disable a deadlocking test.
  SurfaceTexture: add a pixel tolerance to the tests.
2011-06-13 14:48:11 -07:00
Jamie Gennis
2510d9576f SurfaceTexture: disable a deadlocking test.
This change disables the UpdateTexImageAfterFrameFinishedWorks test
because it's currently causing deadlocks on some devices.

Change-Id: Ic9186db207e8d656f3af5d86fa138c7d96393c55
2011-06-13 13:43:51 -07:00
Jamie Gennis
824efa74e7 SurfaceTexture: add a pixel tolerance to the tests.
This change adds a default tolerance of 2 to all the pixel value checks
in the SurfaceTexture tests.

Change-Id: Id5a7cdffdfae16076e2daf4964a3326105b5ae2c
2011-06-13 13:41:01 -07:00
Jamie Gennis
ac642349ba Merge "libutils: add a binary blob cache implementation." 2011-06-13 12:32:46 -07:00
Jamie Gennis
72f6af8630 Merge changes I56779420,I044e44e1,Ic5adfa29,Ied541ab8
* changes:
  SurfaceTexture: add some GL->GL tests.
  SurfaceTexture: fix up a comment.
  SurfaceTexture: add getTransformMatrix tests.
  SurfaceTexture: fix a getTransformMatrix crash.
2011-06-13 11:14:57 -07:00
Jamie Gennis
5451d15ee2 SurfaceTexture: add some GL->GL tests.
This change adds some tests to verify streaming images from one GL
thread to another via SurfaceTexture.  Currently the tests do not
validate the correctness of the streamed images, but rather simply
verify that this streaming does not cause a deadlock.  3 of the 4 tests
are currently disabled because they do cause deadlocks on some devices.

Change-Id: I5677942053190063b97f370dba96c116711bc3bb
2011-06-13 10:50:13 -07:00
Jamie Gennis
5222604809 SurfaceTexture: add getTransformMatrix tests.
This change adds a test verifying that with no transform set on the
SurfaceTextureClient, the SurfaceTexture will return an identity
transform matrix.  It also verifies this same effect in the presence of
an additional call to native_window_set_buffer_count just before the
call to getTransformMatrix.

Bug: 4490420
Change-Id: Ic5adfa29b5696cc2b451433834e3758ef20c5edd
2011-06-13 10:50:13 -07:00
Jamie Gennis
736aa9573b SurfaceTexture: fix a getTransformMatrix crash.
This change moves the computation of the transform matrix out of
getTransformMatrix and instead performs the computation when
updateTexImage gets called.  This is needed in order for
getTransformMatrix to succeed even if the buffers have been freed (e.g.
by changing the buffer count) because the computation depends upon the
properties of the current GraphicBuffer.

Change-Id: Ied541ab8747b7ad604f862717135f9a16a816be9
Bug: 4490420
2011-06-13 10:50:12 -07:00
Glenn Kasten
c4a0feaaf4 Merge "Remove redundant memory barrier" 2011-06-13 10:30:29 -07:00
Glenn Kasten
d9e1bb76fe Remove redundant memory barrier
pthread_create already includes the necessary memory barriers:
 - parent at pthread_create : pthread_mutex_unlock(start_mutex)
 - child at __thread_entry : pthread_mutex_lock(start_mutex)

Add lock around uses of mThread.

Added comments:
 - uses of mThread require lock
 - androidCreateRawThreadEtc returned ID is not safe for direct use from non-parent threads.

Change-Id: I18cb296b41ddaf64cf127b57aab31154319b5970
2011-06-10 17:07:46 -07:00
Dianne Hackborn
66168d4bb4 resolved conflicts for merge of f51ded0f to master
Change-Id: Ida356524a68aeb2b9b0013dfbb6ab4bd11e616e2
2011-06-10 12:45:36 -07:00
Dianne Hackborn
5ea8834ab9 resolved conflicts for merge of e2aa0490 to master
Change-Id: Id0448a1598fc93aca0652b29253e02586e35a067
2011-06-09 17:50:36 -07:00
Dianne Hackborn
199512446d am a8d7ea06: am 220cd77d: Merge "Enforce public resource restriction on bag parents." into honeycomb-mr2
* commit 'a8d7ea067cf22baeee2ff0a33e5a8c5a35936942':
  Enforce public resource restriction on bag parents.
2011-06-09 16:06:07 -07:00
Dianne Hackborn
d4bfc93113 Enforce public resource restriction on bag parents.
Need to put some more styles in the SDK to avoid breaking apps.

Also, welcome Android 3.2.

Change-Id: Ia31d07c9b1b91ad868d8630437fdc1b5ae24f37d
2011-06-09 15:27:39 -07:00
Mathias Agopian
a1bb021469 am 96fcb702: am b40e85f9: am 645434fb: Merge "Fix a leak in RefBase" into honeycomb-mr2
* commit '96fcb702d75dcfb36c3ebd8fe420c8b29fa67fb7':
  Fix a leak in RefBase
2011-06-09 13:54:54 -07:00
Christopher Tate
a87feb9339 Merge "Fix handling of directory entries" 2011-06-08 20:13:57 -07:00
Christopher Tate
61334a3f83 Fix handling of directory entries
Don't emit tar blocks for directories with an invalid nonzero size.  Also, if
such an entry is encountered during restore, don't actually attempt to treat
it as valid and thus skip over the next actual tar entry.

This patch also adds tracking of the data actually consumed during restore,
and reports a total at the end of stream.

Change-Id: I625173f76df3c007e899209101ff2b587841f184
2011-06-08 20:11:49 -07:00
Dianne Hackborn
b0cc4a8083 am a1396dfe: am 02140891: Merge "Work on issue #4518815: Compatibility mode introduces compatibility regression..." into honeycomb-mr2
* commit 'a1396dfe7ad6ec6953f544be42d69d7804ab0fd4':
  Work on issue #4518815: Compatibility mode introduces compatibility regression...
2011-06-08 20:06:40 -07:00
Dianne Hackborn
ab6bf752b3 Merge "Work on issue #4518815: Compatibility mode introduces compatibility regression..." into honeycomb-mr2 2011-06-08 20:00:50 -07:00
Mathias Agopian
c2db91c3bf am b40e85f9: am 645434fb: Merge "Fix a leak in RefBase" into honeycomb-mr2
* commit 'b40e85f90146a654bfe5657187be491147814ea0':
  Fix a leak in RefBase
2011-06-08 19:34:30 -07:00
Dianne Hackborn
acf87675ae Work on issue #4518815: Compatibility mode introduces compatibility regression...
...for Market App iRunner

There were a lot of serious issues with how we updated (or often didn't update)
the display and resource state when switching compatibility mode in conjunction
with restarting and updating application components.  This addresses everything
I could find.

Unfortunately it does *not* fix this particular app.  I am starting to think this
is just an issue in the app.  This change does fix a number of other problems
I could repro, such as switching the compatibility mode of an IME.

Also a few changes here and there to get rid of $#*&^!! debug logs.

Change-Id: Ib15572eac9ec93b4b9966ddcbbc830ce9dec1317
2011-06-08 18:45:43 -07:00
Mathias Agopian
3b0a7a739e Fix a leak in RefBase
this bug was introduced recently. it caused RefBase's weakref_impl
structure to be leaked for every RefBase object (about 20 bytes).

Change-Id: Id85e749ba04521199555dd701198edd097c313d4
2011-06-08 16:25:01 -07:00
Jeff Brown
5d99f17e82 am 61220e88: am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2
* commit '61220e880ac4d9d76b7fd50744439e68e929c697':
  Revert velocity damping. Bug: 4364920
2011-06-07 17:52:30 -07:00
Christopher Tate
9f7bcda136 Fix embedded spaces in tar stream EVEN HARDER
Change-Id: I97ac586ff3541a05d73e1e53f680517c15e6c662
2011-06-07 13:17:17 -07:00
Christopher Tate
72a404d102 Implement shared-storage full backup/restore
Every available shared-storage volume is backed up, tagged with its
ordinal in the set of mounted shared volumes.  This is an approximation
of "internal + the external card".  This lets us restore things to the
same volume [or "equivalent" volume, in the case of a cross-model
restore] as they originated on.

Also fixed a bug in the handling of files/dirs with spaces in
their names.

Change-Id: I380019da8d0bb5b3699bd7c11eeff621a88e78c3
2011-06-07 12:16:27 -07:00
Jeff Brown
b7edd04f7a am bbbab26e: am 2c180499: Merge "Revert velocity damping. Bug: 4364920" into honeycomb-mr2
* commit 'bbbab26ebe9bc789ba9abac757895a6c31de7cc5':
  Revert velocity damping. Bug: 4364920
2011-06-06 20:36:49 -07:00