2538 Commits

Author SHA1 Message Date
Romain Guy
4eb3c13261 am 25f6f4f5: am 3c1ad55f: Merge "Update Canvas.getClipBounds to not account for AA clips." into jb-mr2-dev
* commit '25f6f4f5d082828fe0eb4f24be2bfaa15b71242e':
  Update Canvas.getClipBounds to not account for AA clips.
2013-05-17 14:14:32 -07:00
Romain Guy
25f6f4f5d0 am 3c1ad55f: Merge "Update Canvas.getClipBounds to not account for AA clips." into jb-mr2-dev
* commit '3c1ad55fcfa54c2c30073d07917da699d156dc58':
  Update Canvas.getClipBounds to not account for AA clips.
2013-05-17 14:12:43 -07:00
Derek Sollenberger
00a33a8ce8 Update Canvas.getClipBounds to not account for AA clips.
This preserves the existing behavior at the SDK level while skia
investigates a more comprehensive solution.

bug: 8986473
Change-Id: Ief82dcfd47f1ba08d28d43402b3c28694f94f2e4
2013-05-16 09:31:27 -04:00
Brian Carlstrom
6155251c7b am bf7afa23: am 94f55b30: Merge "Tracking libnativehelper dependencies"
* commit 'bf7afa239e9541b3cac5a3c510bfb9b25b4a1348':
  Tracking libnativehelper dependencies
2013-05-10 22:49:00 -07:00
Brian Carlstrom
bf7afa239e am 94f55b30: Merge "Tracking libnativehelper dependencies"
* commit '94f55b30e3e04dbea63836197e76c7464d8d6d37':
  Tracking libnativehelper dependencies
2013-05-10 22:47:57 -07:00
Brian Carlstrom
fde1f91d9b Tracking libnativehelper dependencies
Change-Id: I05ec62c43fbe5f8ba23256abac7271ca0b1a7242
2013-05-10 21:16:12 -07:00
Dianne Hackborn
b14e42f121 Merge "Cleanup some of the thread merging." 2013-05-09 22:30:30 +00:00
Derek Sollenberger
0c8c0add4e am c195ef73: am bee78812: Merge "Fix bug where we incorrectly clipped the bounds to the device size." into jb-mr2-dev
* commit 'c195ef73445c3ba605355798b9f1f9a78bc52f11':
  Fix bug where we incorrectly clipped the bounds to the device size.
2013-05-09 14:19:45 -07:00
Raph Levien
8987f06f9c resolved conflicts for merge of 7e433f10 to master
Change-Id: Ifa3a144c791c0143c62f4aa23a5db57a93c32a17
2013-05-09 14:08:14 -07:00
Derek Sollenberger
bee78812d0 Merge "Fix bug where we incorrectly clipped the bounds to the device size." into jb-mr2-dev 2013-05-09 18:23:57 +00:00
Raph Levien
dde8e539c3 Merge "Fix bug 8717690 Full-width Latin Letters Garbled on Tumblr App" into jb-mr2-dev 2013-05-09 18:04:39 +00:00
Derek Sollenberger
708144e828 Fix bug where we incorrectly clipped the bounds to the device size.
This CL also updates the documenation to make it clear that the API
returns in local space, not clipped to the size of the bitmap/device.

bug: 8747526
Change-Id: I389844672ce955341863f9940c3b401ab00dc1dc
2013-05-09 14:00:29 -04:00
Mathias Agopian
1f5762e646 libutils clean-up
Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
2013-05-07 17:09:46 -07:00
Dianne Hackborn
efa92b2182 Cleanup some of the thread merging.
Adds an optimization for checking whether a looper is stuck,
with a new Looper method to see if its thread is currently
idle.  This will allow us to put a large number of loopers
in the monitor efficiently, since we generally won't have to
do a context switch on each of them (since most looper threads
spend most of their time idle waiting for work).

Also change things so the system process's main thread
is actually running on the main thread.  Because Jeff
asked for this, and who am I to argue? :)

Change-Id: I12999e6f9c4b056c22dd652cb78c2453c391061f
2013-05-07 15:33:26 -07:00
Jesse Hall
ce3fe5fd8a am 4d32a367: am 2787ba25: Merge "Register EGLExt JNI methods" into jb-mr2-dev
* commit '4d32a36759b619abdda9c895054f513aef3a3f03':
  Register EGLExt JNI methods
2013-05-07 10:18:38 -07:00
Jesse Hall
9ee0999bcb resolved conflicts for merge of 78df7b5e to master
Change-Id: I27076f5e6f747a006dcac7cd334cacf56dd57bd5
2013-05-06 16:04:53 -07:00
Raph Levien
dd0a91294b Fix bug 8717690 Full-width Latin Letters Garbled on Tumblr App
For fullwidth latin (or, more generally, a font considered as a complex
script, but not supported by the font specified), and for a font other
than a system default font, we were getting a mismatch in baseGlyphCount
between the shaping and painting fonts.

This patch preserves the original typeface in this case. In that sense,
it is a slightly more general fix for bug 8127795.

Change-Id: Ibdbfdb34eb7dc39cc8f0784a67c93c9af4ce6ab2
2013-05-06 15:00:41 -07:00
Jesse Hall
237c2b871f Register EGLExt JNI methods
Bug: 8678160
Change-Id: I8ecd2e6da2aee250b3433be18fff6af927b02994
2013-05-06 11:36:59 -07:00
Dave Burke
236cc476e6 Temporarily revert field name change (DO NOT MERGE)
VisualOn is using hidden fields, causing HBO and Xfinity to crash.
Bug: 8549617
Bug: 8331866

Change-Id: I35a9fe66dea8d56f4fcff9b492679226a17f4acc
2013-05-06 00:21:30 -07:00
Jesse Hall
02b7128f87 Merge "Add android.opengl.EGLExt class for EGL extensions" into jb-mr2-dev 2013-05-04 17:50:48 +00:00
Romain Guy
8add80211e Merge "Add an on-screen overdraw counter" 2013-05-04 00:27:28 +00:00
Romain Guy
78dd96d5af Add an on-screen overdraw counter
The counter can be enabled by setting the system property called
debug.hwui.overdraw to the string "count". If the string is set
to "show", overdraw will be highlighted on screen instead of
printing out a simple counter.

Change-Id: I9a9c970d54bffab43138bbb7682f6c04bc2c40bd
2013-05-03 17:08:20 -07:00
Jeff Brown
b468877f7f am f87d4ea7: am 17cf4e4d: Merge "Really make Surface thread-safe." into jb-mr2-dev
* commit 'f87d4ea77a6950c3d6d381347f2346c12bee25f4':
  Really make Surface thread-safe.
2013-05-03 11:24:20 -07:00
Jeff Brown
17cf4e4d4a Merge "Really make Surface thread-safe." into jb-mr2-dev 2013-05-03 02:11:03 +00:00
Mathias Agopian
b7446f9ddb Merge "simplify Surface{View} dirty rect handling" 2013-05-02 23:26:26 +00:00
Romain Guy
3b748a44c6 Pack preloaded framework assets in a texture atlas
When the Android runtime starts, the system preloads a series of assets
in the Zygote process. These assets are shared across all processes.
Unfortunately, each one of these assets is later uploaded in its own
OpenGL texture, once per process. This wastes memory and generates
unnecessary OpenGL state changes.

This CL introduces an asset server that provides an atlas to all processes.

Note: bitmaps used by skia shaders are *not* sampled from the atlas.
It's an uncommon use case and would require extra texture transforms
in the GL shaders.

WHAT IS THE ASSETS ATLAS

The "assets atlas" is a single, shareable graphic buffer that contains
all the system's preloaded bitmap drawables (this includes 9-patches.)
The atlas is made of two distinct objects: the graphic buffer that
contains the actual pixels and the map which indicates where each
preloaded bitmap can be found in the atlas (essentially a pair of
x and y coordinates.)

HOW IS THE ASSETS ATLAS GENERATED

Because we need to support a wide variety of devices and because it
is easy to change the list of preloaded drawables, the atlas is
generated at runtime, during the startup phase of the system process.

There are several steps that lead to the atlas generation:

1. If the device is booting for the first time, or if the device was
updated, we need to find the best atlas configuration. To do so,
the atlas service tries a number of width, height and algorithm
variations that allows us to pack as many assets as possible while
using as little memory as possible. Once a best configuration is found,
it gets written to disk in /data/system/framework_atlas

2. Given a best configuration (algorithm variant, dimensions and
number of bitmaps that can be packed in the atlas), the atlas service
packs all the preloaded bitmaps into a single graphic buffer object.

3. The packing is done using Skia in a temporary native bitmap. The
Skia bitmap is then copied into the graphic buffer using OpenGL ES
to benefit from texture swizzling.

HOW PROCESSES USE THE ATLAS

Whenever a process' hardware renderer initializes its EGL context,
it queries the atlas service for the graphic buffer and the map.

It is important to remember that both the context and the map will
be valid for the lifetime of the hardware renderer (if the system
process goes down, all apps get killed as well.)

Every time the hardware renderer needs to render a bitmap, it first
checks whether the bitmap can be found in the assets atlas. When
the bitmap is part of the atlas, texture coordinates are remapped
appropriately before rendering.

Change-Id: I8eaecf53e7f6a33d90da3d0047c5ceec89ea3af0
2013-05-02 13:32:09 -07:00
Jeff Brown
fc0ebd7d37 Really make Surface thread-safe.
There were many places where the native object was being
accessed improperly.  Also some places where CloseGuard might
not be acquired or released correctly or where the generation
count might not be updated.

Fixed them all.

That said, Surface isn't intended to be used concurrently
so please don't do it.  This is only intended to make
hard to find crashes less likely.

Bug: 8328715
Change-Id: I981ef33425823e0fd7ad6b64443f2ec9b0c8335e
2013-05-01 15:28:01 -07:00
Jesse Hall
0c79d808cb Add android.opengl.EGLExt class for EGL extensions
Add the ES-relevant constants from the EGL_KHR_create_context
extension. These allow apps to check which EGLConfigs (if any) support
ES3 contexts. Otherwise, the app has to create a context with an
EGLConfig and then check whether it is an ES2 or ES3 context.

Also move eglSetPresentationTimeANDROID from EGL14 to EGLExt, since it's an
extension function. It's new in API 18.

Bug: 8678160
Change-Id: I3cba6e59ebb0a3a4c4012aa54a36b940c288bcec
2013-05-01 13:46:58 -07:00
Jesse Hall
fcafc3259e am 0b30ad53: am 09f3cc2b: Merge "Fix GLES30 JNI registration" into jb-mr2-dev
* commit '0b30ad53423a9bfab53b1632a33159be3d82e3df':
  Fix GLES30 JNI registration
2013-04-30 19:38:14 -07:00
Romain Guy
4225d79656 Merge "Handle Surface::lock errors in TextureView Bug #8689535" 2013-04-30 18:58:17 +00:00
Romain Guy
53bacf5a91 Handle Surface::lock errors in TextureView
Bug #8689535

Change-Id: I6d16e13903a58e93940160e7656147656ab79982
2013-04-30 11:30:10 -07:00
Jesse Hall
d877efe3b1 Fix GLES30 JNI registration
Bug: 8657863
Change-Id: I498f32480863b0716b2a8dfce467143087573cce
2013-04-29 16:02:16 -07:00
Andy McFadden
c305745f19 Merge "Regenerate GL stubs" 2013-04-29 18:22:37 +00:00
Jeff Sharkey
2b4d22cda3 Disable various sampling event logs.
They're unused at the moment.

Change-Id: Ib629b405e7b6666d38fcd0ebaa16490bfb0e95f0
2013-04-26 10:52:00 -07:00
Matthew Xie
6a78365072 am 7a21c4cd: am 7f3c5d16: Merge "Added flush() for bluetooth output stream" into jb-mr2-dev
* commit '7a21c4cdb172f6353cd4166e80910893dc981196':
  Added flush() for bluetooth output stream
2013-04-25 21:26:56 -07:00
Andy McFadden
cee5198e71 Regenerate GL stubs
The primary motivation was to pick up changes to getarray(), but it
appears a few other tweaks were made since the last time the code
was generated.

Bug 8713753

Change-Id: I4fa2276bc28afaf0e1450e63498a8690028808ee
2013-04-25 16:08:31 -07:00
zzy
71bfafc84a Added flush() for bluetooth output stream
Bug 8498784

Zebra QL420 Plus Bluetooth printer fails on Android 4.2.2
2013-04-24 00:24:34 -07:00
Raph Levien
41f7f9c5bc am fdd40823: am 22a3344c: Merge "Fix for bug 8695466 GPOS combining mark positioning broken before space" into jb-mr2-dev
* commit 'fdd408233db5bd70cb43ddf2a49a85bd748da5b9':
  Fix for bug 8695466 GPOS combining mark positioning broken before space
2013-04-23 15:02:04 -07:00
Raph Levien
22a3344cda Merge "Fix for bug 8695466 GPOS combining mark positioning broken before space" into jb-mr2-dev 2013-04-23 21:19:20 +00:00
Raph Levien
9d47db23ff Fix for bug 8695466 GPOS combining mark positioning broken before space
This patch makes segmentation into script runs behave the same in RTL
as in LTR modes - so that inherited script characters are always
associated with the preceding run. Otherwise, for a sequence such as
u+0631 u+064d u+0020, it would get split after the first character,
which would lose the ability to correctly position the u+064d mark.

Change-Id: I3c12ba1b77d18334f55e707f518be1046e6b339b
2013-04-23 12:51:27 -07:00
Michael Wright
058feb4e1d am 58500051: am 5fe6e4c4: Merge "Rewrite input handling for native applications" into jb-mr2-dev
* commit '585000515faacc02736f920425ae6c323223ee58':
  Rewrite input handling for native applications
2013-04-23 11:16:08 -07:00
Michael Wright
5fe6e4c4c9 Merge "Rewrite input handling for native applications" into jb-mr2-dev 2013-04-23 00:04:44 +00:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Chet Haase
684634144b am 371d4ccc: am 339ac854: Merge "Fix quickReject logic to account for setClipChildren() setting" into jb-mr2-dev
* commit '371d4cccde56ec4d26e51f8e82ef68f196169a3d':
  Fix quickReject logic to account for setClipChildren() setting
2013-04-20 21:37:23 -07:00
Chet Haase
dd671599be Fix quickReject logic to account for setClipChildren() setting
The rendering code optimizes by rejecting drawing operations that
lie outside of the bounds of their views. This works in most
situations, but breaks down when containers have called
setClipChildren(false), because we reject drawing that is outside
of that container, but which should be drawn anyway.

Fix is to pass in the value of that flag to the DisplayList drawing
routines which take that flag into account when deciding whether
to quickReject any particular operation.

Issue #8659277 animation clipping

Change-Id: Ief568e4db01b533a97b3c5ea5ad777c03c0eea71
2013-04-19 15:36:37 -07:00
Mathias Agopian
667809ef5d simplify Surface{View} dirty rect handling
Change-Id: Ia4595fc1a8a62ca3f3db0f1e47e7e877d73fbfa0
2013-04-18 17:10:00 -07:00
Eino-Ville Talvala
2661bbd219 Merge "Camera: Add hidden camera preview to renderscript allocation API" 2013-04-18 22:44:47 +00:00
Eino-Ville Talvala
7005b67c12 Camera: Add hidden camera preview to renderscript allocation API
- Camera.createPreviewAllocation() creates YUV allocations for use as
  a preview buffer destination.

- Camera.setPreviewCallbackAllocation() sets such an allocation as the
  target for preview data from camera.

Bug: 8563840
Change-Id: Ie42033976fed825d396550bbc033d434c8206b6b
2013-04-17 18:35:26 -07:00
Victoria Lease
af1653a851 resolved conflicts for merge of 6c18e2c8 to master
Change-Id: Idb4679247b201a1f453c63fee5b45b12b03a67a1
2013-04-17 10:33:23 -07:00
Victoria Lease
25df1a82a8 Merge "use appropriate fallback chain for style" into jb-mr2-dev 2013-04-17 16:23:38 +00:00