4667 Commits

Author SHA1 Message Date
Jeffrey Brown
7eb4db3593 am b9185fd1: Merge "Fix PointerCoords Parcel incorrectly storing values as Int32"
# By Ilya Polenov
# Via Gerrit Code Review
* commit 'b9185fd1ffd85239e3ab10ab34cb9d8508970fb4':
  Fix PointerCoords Parcel incorrectly storing values as Int32
2013-02-06 20:50:17 -08:00
Ilya Polenov
716f7b3f5e Fix PointerCoords Parcel incorrectly storing values as Int32
PointerCoords stores its values as float and its Parcel should
do the same. Wrong behaviour may be noticed when MotionEvent is
injected using Instrumentation method sendPointerSync. All its
PointerCoords values(size, orientation, pressure, etc) will be
casted to integer omitting their decimal part. This fix addresses
this issue.

Change-Id: Ifa3dfce4d5c2e6c060852f4208cb5684e827c7e6
Signed-off-by: Ilya Polenov <daioptych@gmail.com>
2013-01-30 10:15:00 +00:00
Elliott Hughes
81cfb63e9f am d13b23a4: Merge "Revert "fix potential memory leak""
* commit 'd13b23a436075262cc83f7502f7159de24546003':
  Revert "fix potential memory leak"
2013-01-03 18:47:37 -08:00
Elliott Hughes
767e1c010c am 9aac0c1b: Merge "fix potential memory leak"
* commit '9aac0c1b35ec666a18f320be99e6aa37d0bcf202':
  fix potential memory leak
2013-01-03 18:47:32 -08:00
Elliott Hughes
957efcdc73 Revert "fix potential memory leak"
This reverts commit bc268b9014f211910e412a7fda96b6394ff2badc

Change-Id: I07f49bd0cfecc43bc761d2b0635c9915a8e30272
2013-01-03 17:38:57 -08:00
Sungmin Choi
bc268b9014 fix potential memory leak
use delete before return

Change-Id: I5449ad90bb6910f057bd825b722c9803a7343c34
2013-01-04 09:56:18 +09:00
Christopher Tate
eea47240b0 am 4b0ed017: Merge "BackupHelpers: Fix Typo"
* commit '4b0ed0178de2c9c21bd5514671b8b4282f6a03db':
  BackupHelpers: Fix Typo
2012-12-17 11:02:04 -08:00
You Kim
8b2e2c8abc BackupHelpers: Fix Typo
delete --> free

Change-Id: Idbf7e677f8cc4a9a9d04e58b5cf7d0f1589c5211
2012-12-17 03:36:10 +09:00
Fabrice Di Meglio
5780e19680 am 5c0d6f99: am 9de88dad: Merge "Fix bug #7724071 ImageView drawable is not loaded correctly when changing Locale" into jb-mr1.1-dev
* commit '5c0d6f9980ed4684cbeefc28036dd9eeac474375':
  Fix bug #7724071 ImageView drawable is not loaded correctly when changing Locale
2012-12-13 12:33:35 -08:00
Fabrice Di Meglio
3509935919 Fix bug #7724071 ImageView drawable is not loaded correctly when changing Locale
aapt is not generating the correct CONFIG_LAYOUTDIR bit when a Drawable has a
LTR and RTL version. It was generating instead the wrong CONFIG_SCREEN_LAYOUT bit.

This was linked to the fact that the layout direction bits are contained into the
screen layout bit.

So now make sure that we are generating the correct CONFIG_LAYOUTDIR bit.

Change-Id: If17c84d31e6c128721ed97ee6711660b131bf941
2012-12-12 11:52:03 -08:00
Chris Craik
c0da873ee2 am a9473881: am 2435f98d: Merge "Use the same interrupt/resume logic for all functor calls" into jb-mr1.1-dev
* commit 'a9473881eb066b41ea2fb3389b5c0031c2ab4f38':
  Use the same interrupt/resume logic for all functor calls
2012-11-29 14:26:33 -08:00
Chris Craik
d15321bbf5 Use the same interrupt/resume logic for all functor calls
bug:7093396

The functor was able to change the renderer's blend mode without it
being restored in process mode. This single path of updating gl caches
reduces likelihood of this occurring in the future.

Change-Id: Ie367532f9c683299f02bc4f635d7cb31f96db39f
2012-11-28 14:45:04 -08:00
Sangkyu Lee
7bb3cfe1cc Another optimization of glyph cache uploads
Previously, cache textures were updated whenever mCurrentCacheTexuture was changed.
Since updating cache textures needs glTexSubImage2D call, frequent changing
of mCurrentCacheTexture (which can easily happen when an app uses lots of unique glyphs
even with precaching) caused many glTexSubImage2D calls and bad framerates.
This patch optimized isssueDrawCommand function. Consequently, changing mCurrentCacheTexture doesn't
cause glTexSubImage2D call any more and it will improve font rendering performance.

Change-Id: Id19d959fa0e69eeb2a39f83a57e311d7394586b2
Signed-off-by: Sangkyu Lee <geteuid@gmail.com>
2012-11-28 09:28:50 +09:00
Kenny Root
be37b5fa24 Merge "Free resources in correct order in ResStringPool::uninit" 2012-11-14 09:33:49 -08:00
Chris Craik
7f92d516a9 am 7494f0c0: am a84c9639: Merge "Avoid tesselation path when useCenter is set" into jb-mr1-dev
* commit '7494f0c04b1abd010207ee5c7e8c9aff6d69c956':
  Avoid tesselation path when useCenter is set
2012-11-01 14:40:04 -07:00
Chris Craik
7fae5216d2 Avoid tesselation path when useCenter is set
bug:7458300

The tesselation path doesn't handle sharp joins.

Change-Id: I28bf03f3b72fc584a205daa40934dda17031098f
2012-11-01 11:27:03 -07:00
Chet Haase
4a82a0fc09 am f5fa64f2: am fbba753f: Merge "Handle offscreen animations correctly" into jb-mr1-dev
* commit 'f5fa64f24b0ee6aa53ac2803590e8729122c445b':
  Handle offscreen animations correctly
2012-10-23 15:51:24 -07:00
Chet Haase
fbba753f62 Merge "Handle offscreen animations correctly" into jb-mr1-dev 2012-10-23 15:46:04 -07:00
Chet Haase
3561d062ff Handle offscreen animations correctly
A bug in software rendering caused animations on views that are offscreen
to not get drawn, therefore the animation doesn't continue (since old-style
animations depend on the logic in the drawing code to keep running). Fix is
to special case the isAnimating case in ViewRoot to go ahead and schedule
a traversal even if the dirty rect does not intersect with the visible region.

Issue #7396035 Animations starting offscreen don't draw run/end/draw properly (sw rendering only)

Change-Id: Iae25b3a424ddc5a16ba431ecd68cf42d5500db3f
2012-10-23 15:30:15 -07:00
Romain Guy
2635e7431a am d04fe3c1: am 04c8d402: Merge "Properly draw the window background on window resize Bug #7385090" into jb-mr1-dev
* commit 'd04fe3c1aeaf4ce63f6a6f3def61a8cc5faff705':
  Properly draw the window background on window resize Bug #7385090
2012-10-23 10:53:40 -07:00
Romain Guy
41308e2936 Properly draw the window background on window resize
Bug #7385090

This change gets rid of two silly asumptions:
- That a layer needs to be cleared with opaque black (it shouldn't,
it's already cleared to transparent and the view will cover it up
with its own background)
- The the clip should be dirty at the beginning of a frame only
when the render target is opaque

Change-Id: I415b6d3cab196057fb0281419a53fef601a44e28
2012-10-22 20:02:43 -07:00
Chet Haase
85c1aef929 am 6534dd02: am 74261d84: Merge "Don\'t null the reference to Bitmap pixels until we\'re really ready" into jb-mr1-dev
* commit '6534dd0275c8d01de7e7400ba239d203c37c8164':
  Don't null the reference to Bitmap pixels until we're really ready
2012-10-22 15:52:20 -07:00
Chet Haase
547e66531d Don't null the reference to Bitmap pixels until we're really ready
A change in the VM triggers a native memory error more aggressively than before,
showing that there's a bug in the logic of recycling bitmaps. Since the pixel
memory is allocated on the Java heap, nulling out the reference to that memory
in the Java level Bitmap object can cause that memory to get collected at any time.
Meanwhile, we may have a reference to that memory at the native level for rendering
purposes, causing an error if/when we access that memory after it has been collected
by the VM.

The fix is to avoid setting the reference to the pixels to null unless we are
not referring to it in native code. This is determined at the time we call
recycle() - we return a boolean to indicate whether the native code is still
using the memory. if not, the Java code can null out the reference and allow the
VM to collect it. Otherwise, it will get collected later when the encompassing
Bitmap object is collected.

Issue #7339156 HTML5 tests crash the app (Vellamo)

Change-Id: I3a0d6b9a6c5dd3b86cc2b0ff7719007e774b5e3c
2012-10-22 15:25:19 -07:00
Romain Guy
be432fa01c am eb78cf53: am 8b946c05: Merge "Defer layer rendering to avoid stalls Bug #7326824" into jb-mr1-dev
* commit 'eb78cf538f87301c1612bf081ae2d5f93cae50f0':
  Defer layer rendering to avoid stalls Bug #7326824
2012-10-19 10:45:41 -07:00
Romain Guy
7c25aab491 Defer layer rendering to avoid stalls
Bug #7326824

When a layer is taken out of the cache and initialized it gets cleared
to prepare it for future rendering. This triggers the following sequence
of operations:

glBindFramebuffer(layer.fbo)
attach texture storage to FBO
glClear()
glBindFramebuffer(defaultFbo)

The clear forces a resolve on tilers which stalls the CPU for a little
while, thus producing jank during animations. This change moves the
clear to the next frame when we know we will have to execute a resolve
anyway.

Change-Id: Ic1939c25df20ed65a4c48dc81ee549b2cd8b6ec3
2012-10-18 15:05:02 -07:00
Romain Guy
3786a9b97a am 07a9ebd1: am b8460d15: Merge "Take into account the texture layer\'s transform for clipping Bug #7370212" into jb-mr1-dev
* commit '07a9ebd1a01bc2819a90ddc98263a24bd6459768':
  Take into account the texture layer's transform for clipping Bug #7370212
2012-10-17 19:21:20 -07:00
Romain Guy
b2e2f24706 Take into account the texture layer's transform for clipping
Bug #7370212

Change-Id: Ibdc3161306f54a1cfe66e08458f05ee01a13b1df
2012-10-17 18:18:35 -07:00
Romain Guy
ac6a0cafc9 am cdc70209: am 16627347: Merge "Enable mipmapping, without a deadlock this time Bug #7353771" into jb-mr1-dev
* commit 'cdc702093cc807237979f14776e75ffdba869ba6':
  Enable mipmapping, without a deadlock this time Bug #7353771
2012-10-17 12:38:40 -07:00
Romain Guy
5243957080 Enable mipmapping, without a deadlock this time
Bug #7353771

Change-Id: I89a08a58608e374f1c604a26ee0769d5850b2f7b
2012-10-17 12:14:11 -07:00
Chet Haase
9cb417b76f am c894029a: am be29d82f: Merge "Correctly adjust clip regions that lie offscreen" into jb-mr1-dev
* commit 'c894029a8e398502c058c2f5332bfe75d4b01735':
  Correctly adjust clip regions that lie offscreen
2012-10-17 07:57:04 -07:00
Chet Haase
be29d82f74 Merge "Correctly adjust clip regions that lie offscreen" into jb-mr1-dev 2012-10-17 07:51:46 -07:00
Romain Guy
e557b0ca62 am 3d2ecafd: am ec5acee1: Merge "workaround to unbreak the build (deadlock during boot)" into jb-mr1-dev
* commit '3d2ecafd7742a93a3ca83993cf12f352aa998112':
  workaround to unbreak the build (deadlock during boot)
2012-10-16 21:42:47 -07:00
Mathias Agopian
a33d161250 workaround to unbreak the build (deadlock during boot)
bug: 7363206
Change-Id: Ie79c309e367ba07336a5299af9fd59c6bd2390e7
2012-10-16 21:26:43 -07:00
Romain Guy
b7b30eb057 am fa71ba2c: am 1b85122b: Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev
* commit 'fa71ba2c847622c0b23321477b3914f4a4cdd536':
  Add API to enable mipmaps on Bitmap Bug #7353771
2012-10-16 19:11:13 -07:00
Romain Guy
1b85122bd2 Merge "Add API to enable mipmaps on Bitmap Bug #7353771" into jb-mr1-dev 2012-10-16 19:05:49 -07:00
Romain Guy
713e1bb9df Add API to enable mipmaps on Bitmap
Bug #7353771

This API can be used when scaling large images down to a small size
to get nicer looking results.

Change-Id: If09087eed36077eee5355f6047a3ca67747d7d9e
2012-10-16 18:44:09 -07:00
Chet Haase
aa42c9af6e Correctly adjust clip regions that lie offscreen
We were clamping the x/y location of the scissor to 0,0, but not adjusting
the width/height appropriately. This fix adjusts width/height and also clamps
them to 0 to correctly clip out offscreen operations.

Issue #7221524 Top left and top right portions of the screen blanks out after some time

Change-Id: I47f23336ea612409ed86652b9a68e272819ef00e
2012-10-16 17:36:16 -07:00
Romain Guy
9c198ecc2b am 7b852ab3: am 5778cb9a: Merge "Always use the correct pixel store size Bug #7357394" into jb-mr1-dev
* commit '7b852ab384ae420359309c959ec699992c94a86b':
  Always use the correct pixel store size Bug #7357394
2012-10-16 13:57:42 -07:00
Romain Guy
3492ee6d79 am 3edb0dda: am 827dde0e: Merge "Support clipping in Canvas.drawBitmapMesh() Bug #7354162" into jb-mr1-dev
* commit '3edb0dda40ae19653c51beb6c8858825e253f7b7':
  Support clipping in Canvas.drawBitmapMesh() Bug #7354162
2012-10-16 13:55:48 -07:00
Romain Guy
5778cb9a98 Merge "Always use the correct pixel store size Bug #7357394" into jb-mr1-dev 2012-10-16 13:50:54 -07:00
Romain Guy
d43b22da29 Always use the correct pixel store size
Bug #7357394

When a bitmap is reused it may change configuration which can lead
to a different pixel store alignment. Our current texture cache
implementation assumes this never happens and keeps the old alignment
which can lead to distorted texture (if the bitmap goes from
ARGB8888 to RGB565 for instance.)

Change-Id: Ic57acf2403411ae4d0924e92f221298350612617
2012-10-16 11:25:06 -07:00
Romain Guy
a92bb4dc96 Support clipping in Canvas.drawBitmapMesh()
Bug #7354162

Change-Id: Ifd1d0b365e8a4d88e0ff0629c9ee13f27e1a7331
2012-10-16 11:09:26 -07:00
Chris Craik
4bc446dae2 am 779ba3ad: am 2aa50b6b: Merge "HW Acceleration support for stroked arcs with BUTT caps" into jb-mr1-dev
* commit '779ba3ad84db57b99bfb742517e3ba157f3f8c4c':
  HW Acceleration support for stroked arcs with BUTT caps
2012-10-15 20:17:53 -07:00
Chris Craik
780c12875c HW Acceleration support for stroked arcs with BUTT caps
bug:4419017

Change-Id: I7371bfb36cef460da861a47d4d945218c6d0c3d0
2012-10-15 13:49:58 -07:00
Kenny Root
58b99bf1d8 am 82634313: Merge "Reject bad ResXMLTree::setTo calls"
* commit '826343138dfd8666d2263dd82bfdbf657fc1881e':
  Reject bad ResXMLTree::setTo calls
2012-10-12 23:57:38 -07:00
Chris Craik
2daca75ab1 am fb0bfa2b: am 3add43ab: Merge "fix stroke sub-hairline threshold" into jb-mr1-dev
* commit 'fb0bfa2b03a985c4c3cb548fbd56b4e1d4b62417':
  fix stroke sub-hairline threshold
2012-10-12 13:06:19 -07:00
Chris Craik
3add43ab0e Merge "fix stroke sub-hairline threshold" into jb-mr1-dev 2012-10-12 13:00:59 -07:00
Chris Craik
2154af209f fix stroke sub-hairline threshold
bug:7339943

Change-Id: I4051a03f4cd5bd2c313840208540601fb7a056e2
2012-10-12 12:45:08 -07:00
Romain Guy
146f04122a am 21ff8c9c: am 1460c8ca: Merge "Prevent possible divide by 0 Bug #7307304" into jb-mr1-dev
* commit '21ff8c9cf22b38ad577d7eb01088cb49274cb22d':
  Prevent possible divide by 0 Bug #7307304
2012-10-10 17:21:07 -07:00
Romain Guy
9068e1b6cc am 3bb02a34: am 38a64240: Merge "Allow 9patches to shrink Bug #7307304" into jb-mr1-dev
* commit '3bb02a347f453136dff28720aaf9d7db2f517bb4':
  Allow 9patches to shrink Bug #7307304
2012-10-10 17:15:37 -07:00