2357 Commits

Author SHA1 Message Date
Romain Guy
7f78b0c3ae Lines would not set the scissor before drawing.
Lines were not drawing in Calendar because they were getting clipped
by the previous clip rectangle. This change simply updates the scissor
as needed. This change also reduces the number of state changes in GL.

Change-Id: I41ab13dca3a33cfa6d1a44371c48852ab418b04e
2010-11-04 14:36:26 -07:00
Romain Guy
8ad4b47920 Merge "Fix possible rendering issue when drawing a path." 2010-11-04 12:14:37 -07:00
Romain Guy
1041aded2d Fix possible rendering issue when drawing a path.
Change-Id: I25f2e609589f0dd9294bcf7930de6398c0d7e377
2010-11-04 12:10:40 -07:00
Jason Sams
6b81399aa1 Merge "Update ScriptC constructor to remove depricated param." 2010-11-03 23:03:06 -07:00
Jason Sams
3ba02b3d2f Update ScriptC constructor to remove depricated param.
Change-Id: Id36e325834526c6b5416fd78d5cf4259d7df97e9
2010-11-03 23:01:38 -07:00
Romain Guy
617d74ac48 Merge "Fix rendering bug with saveLayerAlpha/drawColor." 2010-11-03 20:03:42 -07:00
Romain Guy
e45362cad9 Fix rendering bug with saveLayerAlpha/drawColor.
drawColor() was not calling quickReject because it fills the clip region
and thus always passes the test. However, quickReject also checks whether
the current layer is invisible. drawColor() now performs the same check
and avoid drawing inside an invisible layer.

Change-Id: I63d0e9a8a9c0fba774f0f5c3870d58e6ed96fbd1
2010-11-03 19:58:32 -07:00
Romain Guy
9195f75df0 Merge "Fix rendering issue with layers." 2010-11-03 16:23:41 -07:00
Romain Guy
5ec9924d24 Fix rendering issue with layers.
Change-Id: I1d511ab2707000762a942d32c300a9944ab38603
2010-11-03 16:19:08 -07:00
Jason Sams
5dc336e23a Merge "RS Error cleanup. Thow java exception during init if the GL driver fails rather than native crash." 2010-11-03 14:29:16 -07:00
Jason Sams
d5f0630034 RS Error cleanup.
Thow java exception during init if the
GL driver fails rather than native crash.

Change-Id: Ie96ef5a2ac12e64f9456545d86157c4c95179a8e
2010-11-03 14:27:11 -07:00
Jeff Brown
e46a0a4693 Fix a key repeating bug.
This change fixes a bug in the dispatcher where the window manager
policy would incorrectly receive a key repeat count of 0 in the case
where the key repeat was generated by the hardware or driver.
Long-press on HOME was broken as a result.

Bug: 3159581
Change-Id: If0f02662313f5b879a4e566fbb461389e274a550
2010-11-02 17:58:22 -07:00
Jeff Brown
5ffcd088ce Merge "Add plumbing for volume mute key." 2010-11-02 17:38:18 -07:00
Jeff Brown
b0418da0e7 Add plumbing for volume mute key.
Full support for the volume mute key will be implemented in a
later change.

Bug: 2912307
Change-Id: I98c27d6360f159c8b7447e04b45f442eff87b38a
2010-11-02 17:31:39 -07:00
Romain Guy
98444a944c Merge "Optimize FBO drawing with regions. This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file." 2010-11-02 16:23:22 -07:00
Romain Guy
5b3b35296e Optimize FBO drawing with regions.
This optimization is currently disabled until Launcher is
modified to take advantage of it. The optimization can be
enabled by turning on RENDER_LAYERS_AS_REGIONS in the
OpenGLRenderer.h file.

Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
2010-11-02 16:17:23 -07:00
Stephen Hines
611f56721f Merge "New RS types test for checking compilation." 2010-11-02 14:14:35 -07:00
Stephen Hines
ce13d94ccb New RS types test for checking compilation.
Change-Id: Ib4d0326462d4d0229430f61c74f16979f7b38dbb
2010-11-02 13:58:12 -07:00
Kenny Root
5c4cf8cd7c Fix default return code for getResource
Reorganization of getResource to allow for other densities accidentally
overrode the default return code for getResource from BAD_VALUE to
BAD_INDEX. This corrects the default return to BAD_VALUE which restores
other things to working.

Bug: 3155824
Change-Id: I13dafff85bc6978c5f5435fc09ab0474c7885c4d
2010-11-02 11:27:31 -07:00
Jeff Brown
c4b5bf3c76 am 7ab5d2d9: am a87ea46c: Fix bugs related to cheek event suppression.
* commit '7ab5d2d951792c9b1a1e7cfb279280c2d076506f':
  Fix bugs related to cheek event suppression.
2010-11-02 02:34:15 -07:00
Jeff Brown
7ab5d2d951 am a87ea46c: Fix bugs related to cheek event suppression.
* commit 'a87ea46cb023763e0a9b0222da20b0a354f79d8d':
  Fix bugs related to cheek event suppression.
2010-11-01 21:02:05 -07:00
Jeff Brown
a87ea46cb0 Fix bugs related to cheek event suppression.
Two issues:

1. First, due to an inverted conditional in the input dispatcher, we were
   reporting touches as long touches and vice-versa to the power manager.

2. Power manager user activity cheek event suppression also suppresses touch
   events (but not long touch or up events).  As a result, if cheek event
   suppression was enabled, touches would not poke the user activity timer.
   However due to the above logic inversion, this actually affected long
   touches.  Net result, if cheek suppression was enabled in the power manager
   and you held your thumb on the screen long enough, the phone would
   go to sleep!

Cheek event suppression is commonly turned on when making a phone call.
Interestingly, it does not seem to get turned off afterward...

This change fixes the logic inversion and exempts touches from the cheek
suppression.  The reason we do the latter is because the old behavior
was actually harmful in other ways too: a touch down would be suppressed
but not a long touch or the touch up.  This would cause bizarre behavior
if you touched the screen while it was dimmed.  Instead of brightening
immediately, it would brighten either when you lifted your finger or
300ms later, whichever came first.

Bug: 3154895
Change-Id: Ied9ccec6718fbe86506322ff47a4e3eb58f81834
2010-11-01 20:51:58 -07:00
Jeff Brown
fe17625238 Merge "Fix policy issues when screen is off." 2010-11-01 15:13:10 -07:00
Jeff Brown
4d396052de Fix policy issues when screen is off.
Rewrote interceptKeyBeforeQueueing to make the handling more systematic.
Behavior should be identical except:
- We never pass keys to applications when the screen is off and the keyguard
  is not showing (the proximity sensor turned off the screen).
  Previously we passed all non-wake keys through in this case which
  caused a bug on Crespo where the screen would come back on if a soft key
  was held at the time of power off because the resulting key up event
  would sneak in just before the keyguard was shown.  It would then be
  passed through to the dispatcher which would poke user activity and
  wake up the screen.
- We propagate the key flags when broadcasting media keys which
  ensures that recipients can tell when the key is canceled.
- We ignore endcall or power if canceled (shouldn't happen anyways).

Changed the input dispatcher to not poke user activity for canceled
events since they are synthetic and should not wake the device.

Changed the lock screen so that it does not poke the wake lock when the
grab handle is released.  This fixes a bug where the screen would come
back on immediately if the power went off while the user was holding
one of the grab handles because the sliding tab would receive an up
event after screen turned off and release the grab handles.

Fixed a couple of issues where media keys were being handled inconsistently
or not at all, particularly in the case of the new PAUSE, PLAY
and RECORD keys.

Bug: 3144874
Change-Id: Ie630f5fb6f128cfdf94845f9428067045f42892c
2010-11-01 15:00:25 -07:00
Jason Sams
8f0adba7cb Add code to mark functions rather than whole files as threadable.
Change-Id: Ie635fbbb96b8ade48501ec564fe135edc256537d
2010-11-01 14:26:30 -07:00
Jason Sams
ab3ff25a6f Remove excessive logging.
Change-Id: I22497b1b169ca0f3edbc20649594f6f58f6144d0
2010-10-29 16:49:08 -07:00
Kenny Root
03034739eb Merge "Add path to get different DPI drawables" 2010-10-29 14:20:04 -07:00
Kenny Root
55fc850cf9 Add path to get different DPI drawables
Allow a caller to request a different density than their current display
allows. This can mean a device displaying mdpi can get a resource that's
in hdpi and have it pretend to be in mdpi resolution. If a drawable
that's returned is not in the requested density, it will set it at the
appropriate density to be scaled up later on.

The API for this is hidden currently.

Bug: 3134688
Change-Id: I6c3908cbdef4907b8d3f1576df9e3b0e7af1755a
2010-10-29 12:47:07 -07:00
Jason Sams
5585e36a41 Balls test app.
Change-Id: I842f43e37145f8112120e2bd49925f81c588c40c
2010-10-29 10:28:13 -07:00
Jim Miller
858b93c0fd Merge "Fix 3140348: Signature was wrong for atan2() in RS." 2010-10-28 13:55:14 -07:00
Jim Miller
420a5fbbd5 Fix 3140348: Signature was wrong for atan2() in RS.
Change-Id: I6c5b79efc12e2dcef06f3f0bcbbdf8871947af26
2010-10-28 13:00:09 -07:00
Alex Sakhartchouk
de33dd7c0d Merge "Adding nvidia extension for limited npot support. Updating a3d loading to be async." 2010-10-28 10:32:12 -07:00
Jeff Brown
88e7b31ba1 resolved conflicts for merge of df3cccf3 to master
Change-Id: I425496a9fc4e9cbc50ad6938e9dccb14827d9558
2010-10-27 22:18:43 -07:00
Jeff Brown
df3cccf3dc am 120a4594: Drop all dispatcher state when dispatcher is disabled. 2010-10-27 19:31:24 -07:00
Jeff Brown
120a459485 Drop all dispatcher state when dispatcher is disabled.
This patch makes the dispatcher drop all of its state when it is
disabled (when the screen turns off).  This ensures that the dispatcher
does not get stuck thinking a pointer is still down if the screen
turned off while the user was touching the display (such as a fat touch
while hitting the power button).

Bug: 3098344
Change-Id: If50ef5804870aa1acd3179fd4b40e3cda58dd39d
2010-10-27 18:43:51 -07:00
Alex Sakhartchouk
581cc64028 Adding nvidia extension for limited npot support.
Updating a3d loading to be async.

Change-Id: I4be71d2002b9ad6ab8896d63e625f031e6b7ea6c
2010-10-27 14:10:07 -07:00
Vasu Nori
fd7b62d5be Merge "convert one of the LOGE to LOG_WINDOW msg to reduce grief" 2010-10-26 18:39:27 -07:00
Vasu Nori
e6544e4cc9 convert one of the LOGE to LOG_WINDOW msg to reduce grief
grief from people who think this message is bad news.
but in reality, this message is really just an informational message
to aid in debugging

Change-Id: I1a2ab1666a27adb7d3fd210528b2c5218640d53d
2010-10-26 16:44:44 -07:00
Romain Guy
f887594d0e Merge "Remove unnecessary GL calls." 2010-10-26 16:31:31 -07:00
Romain Guy
746b7401ce Remove unnecessary GL calls.
This change batches calls to glScissor() and removes extra GL
queries and glActiveTexture() calls.

Change-Id: I1cd079d314f87cd9c088f95c8d4909c2f860f6aa
2010-10-26 16:27:31 -07:00
Jason Sams
64eb351cff Merge "Begin adding async allocation creation." 2010-10-26 16:16:17 -07:00
Jason Sams
31a7e42f4b Begin adding async allocation creation.
Change-Id: I5d1381699e2b334c1d824f357bd6b310a5f79be8

Implement async bitmap upload and clean up types.

Change-Id: Icbe9894e04c1319351c1cd75b0e0017855198f20
2010-10-26 13:09:17 -07:00
Chet Haase
9440083be2 Merge "Optimizing ColorFilter in display lists" 2010-10-26 12:53:57 -07:00
Chet Haase
ad93c2bb63 Optimizing ColorFilter in display lists
Change-Id: Ie4d5e5b0bc45e0ce47bba144049303c270762e54
2010-10-26 12:52:03 -07:00
Mathias Agopian
32b1dd2632 am 85c5ca07: am 2f19f56a: Merge "Updade Surface (ANativeWindow) format based on its buffers format" into gingerbread 2010-10-26 12:26:23 -07:00
Mathias Agopian
85c5ca07b9 am 2f19f56a: Merge "Updade Surface (ANativeWindow) format based on its buffers format" into gingerbread 2010-10-26 12:22:12 -07:00
Chet Haase
dcaff67a80 Merge "DisplayList optimizations and fixes." 2010-10-26 06:59:19 -07:00
Chet Haase
d98aa2de9a DisplayList optimizations and fixes.
We now use a copy of SkPaint objects to avoid having it changed from under us.
We reuse copies that have not changed. We also copy the SkMatrix every time to
avoid the same problem.

Change-Id: If3fd80698f2d43ea16d23302063e0fd8d0549027
2010-10-26 06:54:55 -07:00
Jeff Brown
3f87246dd3 Merge "Tweak log messages a bit." 2010-10-25 18:51:57 -07:00
Romain Guy
9bca4793a3 Small cleanup.
Removes unnecessary forward class declaration, make Caches::currentBuffer
private instead of public.

Change-Id: Idba6325c8c602d89239e667cb8ec87e7943f8e75
2010-10-25 18:42:25 -07:00