1791 Commits

Author SHA1 Message Date
Dianne Hackborn
aa9d84c37e resolved conflicts for merge of 05be6d6f to master
Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
2011-05-09 19:00:59 -07:00
Dianne Hackborn
05be6d6fe0 am 4907d1d5: am 0c6cbf41: Merge "Better compat mode part one: start scaling windows." into honeycomb-mr2
* commit '4907d1d5e2c7d244b07579b8c52153df69754e85':
  Better compat mode part one: start scaling windows.
2011-05-09 17:10:34 -07:00
Dianne Hackborn
e2515eebf4 Better compat mode part one: start scaling windows.
First step of improving app screen size compatibility mode.  When
running in compat mode, an application's windows are scaled up on
the screen rather than being small with 1:1 pixels.

Currently we scale the application to fill the entire screen, so
don't use an even pixel scaling.  Though this may have some
negative impact on the appearance (it looks okay to me), it has a
big benefit of allowing us to now treat these apps as normal
full-screens apps and do the normal transition animations as you
move in and out and around in them.

This introduces fun stuff in the input system to take care of
modifying pointer coordinates to account for the app window
surface scaling.  The input dispatcher is told about the scale
that is being applied to each window and, when there is one,
adjusts pointer events appropriately as they are being sent
to the transport.

Also modified is CompatibilityInfo, which has been greatly
simplified to not be so insane and incomprehendible.  It is
now simple -- when constructed it determines if the given app
is compatible with the current screen size and density, and
that is that.

There are new APIs on ActivityManagerService to put applications
that we would traditionally consider compatible with larger screens
in compatibility mode.  This is the start of a facility to have
a UI affordance for a user to switch apps in and out of
compatibility.

To test switching of modes, there is a new variation of the "am"
command to do this: am screen-compat [on|off] [package]

This mode switching has the fundamentals of restarting activities
when it is changed, though the state still needs to be persisted
and the overall mode switch cleaned up.

For the few small apps I have tested, things mostly seem to be
working well.  I know of one problem with the text selection
handles being drawn at the wrong position because at some point
the window offset is being scaled incorrectly.  There are
probably other similar issues around the interaction between
two windows because the different window coordinate spaces are
done in a hacky way instead of being formally integrated into
the window manager layout process.

Change-Id: Ie038e3746b448135117bd860859d74e360938557
2011-05-09 17:03:24 -07:00
Chet Haase
3825fef300 Merge "Fix for scaled AA lines" 2011-05-06 13:51:09 -07:00
Chet Haase
99ecdc480d Fix for scaled AA lines
Previously, the translucent boundary of AA lines would be scaled
by the line's transform. It should always be exactly one pixel wide
in screen space. This fix accounts for scaling for the boundary
region, and fixes some AA calculations that make wide/AA lines
more correct.

Change-Id: I30df2d5d96315bf3e7ff30be9735282fd5439a39
2011-05-06 12:10:54 -07:00
Alex Sakhartchouk
4f413e413d Merge "save benchmark results" 2011-05-05 09:37:07 -07:00
Alex Sakhartchouk
4d7b19aa23 save benchmark results
Change-Id: I5b6a9f03de574be7983f1311173484f2cc0b4fe5
2011-05-04 14:38:53 -07:00
Stephen Hines
ceae02e2c7 Merge "Clean up use of rsSetObject/rsClearObject." 2011-05-03 14:32:11 -07:00
Romain Guy
df0a7fbdcf Merge "Allows to render with an OpenGL context inside a TextureView." 2011-05-02 18:33:26 -07:00
Romain Guy
8f0095cd33 Allows to render with an OpenGL context inside a TextureView.
Change-Id: I59453f7fc3997f0502a1c5d325d37fed376fabc7
2011-05-02 18:32:29 -07:00
Stephen Hines
c32b99404b Clean up use of rsSetObject/rsClearObject.
Change-Id: I8d8e198135d680a1cab7fde64407dec8030bd6a6
2011-05-02 18:06:48 -07:00
Chet Haase
99585adeb4 Line endcaps for AA lines are now antialiased.
Also fixed other minor issues with AA and line rendering.

Change-Id: Icd4638d27c70e2ee0f28b5d9a2b97d8b29e8ac4d
2011-05-02 15:08:38 -07:00
Romain Guy
ad44445c77 Merge "New widget: TextureView Bug #4343984" 2011-04-28 18:47:01 -07:00
Romain Guy
aa6c24c21c New widget: TextureView
Bug #4343984

TextureView can be used to render media content (video, OpenGL,
RenderScript) inside a View.

The key difference with SurfaceView is that TextureView does
not create a new Surface. This gives the ability to seamlessly
transform, animate, fade, etc. a TextureView, which was hard
if not impossible to do with a SurfaceView.
A TextureView also interacts perfectly with ScrollView,
ListView, etc. It allows application to embed media content
in a much more flexible way than before.

For instance, to render the camera preview at 50% opacity,
all you need to do is the following:

mTextureView.setAlpha(0.5f);
Camera c = Camera.open();
c.setPreviewTexture(mTextureView.getSurfaceTexture());
c.startPreview();

TextureView uses a SurfaceTexture to get the job done. More
APIs are required to make it easy to create OpenGL contexts
for a TextureView. It can currently be done with a bit of
JNI code.

Change-Id: Iaa7953097ab5beb8437bcbbfa03b2df5b7f80cd7
2011-04-28 18:46:19 -07:00
Stephen Hines
b994ed33c5 Fix RS graphics samples/tests.
Change-Id: Id5b586a9d9bead426eb46d79a93941893f0d4925
2011-04-27 18:25:49 -07:00
Chet Haase
8a5cc92a15 Fix various hw-accelerated line/point bugs
All accelerated lines are now rendered as quads. Hairlines used to
be rendered as GL_LINES, but these lines don't render the same as our
non-accelerated lines, so we're using quads for everything. Also, fixed
a bug in the way that we were offsetting quads (and not offseting points)
to ensure that our lines/points actuall start on the same pixels as
Skia's.

Change-Id: I51b923cc08a9858444c430ba07bc8aa0c83cbe6a
2011-04-27 14:23:29 -07:00
Alex Sakhartchouk
998d4570bd Merge "Better workaround for the bitmap invalidation problem." 2011-04-27 12:08:59 -07:00
Guang Zhu
d45d463095 Merge "Make DRT pull data over network" 2011-04-27 11:05:28 -07:00
Guang Zhu
f6d1b3f125 Make DRT pull data over network
command format:

adb shell am instrument -w -e class \
    com.android.dumprendertree.LoadTestsAutoTest#runPageCyclerTest \
    -e suite moz \
    -e iteration 1 \
    -e forward android-browser-test:80/page_cycler/ \
    com.android.dumprendertree/.LayoutTestsAutoRunner

Change-Id: Ib4e9db28953f6be155517bb4b139e4477305c2c2
2011-04-26 17:55:27 -07:00
Alex Sakhartchouk
9dc8b3652d Better workaround for the bitmap invalidation problem.
Change-Id: I9aa5ff9f68413ec36596d976a2e65b8ef272d56e
2011-04-26 17:19:41 -07:00
Xia Wang
93970c30e3 Merge "- Add instrumentation utility to automate rs performance tests: The RsBench test activity can be launched within instrumentation" 2011-04-26 17:03:05 -07:00
Xia Wang
2738fb1cb1 - Add instrumentation utility to automate rs performance tests:
The RsBench test activity can be launched within instrumentation

- Provide parameter to control test run:
  set the maximum number of loops from test runner,
  the script will send out a message after the test loops exceeds the maxium number

Change-Id: I5fba0543094ef7a8b5eaa6ff9a04367d272b4d65
2011-04-26 16:13:32 -07:00
Romain Guy
740bf2bb2e Apply shaders/filters to text drop shadows.
Bug #4318323

This change also fixes the fact that shaders were not modulated
by the paint's color when drawing paths.

Change-Id: Id88804143aea06c895d4cbcdbe106d660230aa5a
2011-04-26 15:33:10 -07:00
Romain Guy
3a03eeedaf Update shader text to test with drop shadows.
Change-Id: Iefdf116846c9b5649d1561a9d80d66d1c3acfeca
2011-04-26 14:04:08 -07:00
Fabrice Di Meglio
589e4e27ee Fix bug #4338103 (Android Arabic and Hebrew input is broken)
- fix glyph order when there is only a single run
- update tests

Change-Id: I113f28a8c76cab622fb75ce84bc50d1d38fa254e
2011-04-25 17:48:55 -07:00
Fabrice Di Meglio
3f92b8b188 Merge "Clean getTextRunAdvances() APIs" 2011-04-22 16:54:37 -07:00
Alex Sakhartchouk
abf2b931ff sped up the ui in image processing test app
Change-Id: I5e8637cf4386b31d961d41c64019f9ac98d21905
2011-04-22 12:42:47 -07:00
Fabrice Di Meglio
0a1413e4bf Clean getTextRunAdvances() APIs
- remove ICU reference in API names
- use a "reserved" int parameter to pass either "0" for Harfbuzz or "1" for "ICU"

Change-Id: I88b4f76feafd203a6999cd7349402fa36a9a4b2a
2011-04-21 17:36:26 -07:00
Chet Haase
bf96c356c0 Merge "Enable anti-aliasing for hw-accelerated lines" 2011-04-21 11:52:59 -07:00
Chet Haase
5b0200bd47 Enable anti-aliasing for hw-accelerated lines
Draw anti-aliased lines with OpenGL by constructing a quad with
a border that fades out (to mimic fragment coverage).

Change-Id: Ib81a3e62d663acdf1b46b401ac4aa7ee9855cc7e
2011-04-21 11:47:05 -07:00
Fabrice Di Meglio
f7b9e78486 Merge "Add Unicode BiDi Algo before drawing text in Canvas" 2011-04-18 11:15:57 -07:00
Fabrice Di Meglio
689e515ed2 Add Unicode BiDi Algo before drawing text in Canvas
- only for temporary API
- update BiDiTest

Change-Id: Ifd445799dc0fda4da896246e41978cd8d71aa035
2011-04-15 19:39:47 -07:00
Dianne Hackborn
0c5001d776 Add APIs to remove tasks.
You can remove sub-tasks inside of a task, or an entire task.

When removing an entire task, you can have its process killed
as well.

When the process is killed, any running services will get an
onTaskRemoved() callback for them to do cleanup before their
process is killed (and the service possibly restarted).

Or they can set a new android:stopWithTask attribute to just
have the service automatically (cleanly) stopped at this point.

Change-Id: I1891bc2da006fa53b99c52f9040f1145650e6808
2011-04-12 18:28:06 -07:00
Dianne Hackborn
bcbab36843 Merge "Rework thumbnails in activity manager." 2011-04-08 18:28:14 -07:00
Dianne Hackborn
f26fd99a7c Rework thumbnails in activity manager.
We now only keep a thumbnail for the task, not for each
activity.  However if you use FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET,
we will make a new secondary thumbnail for that series of
activities.  There is a new API for the app to get these
secondary thumbnails.

Also set a default thumbnail size for non-xlarge screens
so we have thumbnails on phones.  (We need some smarter
code in the platform for computing the actual thumbnail
dimensions of the current device).  And add a test app
to show recent tasks + thumbnails.

Change-Id: Ic36759f6635522118a2cb7f156662229a610c492
2011-04-08 18:16:21 -07:00
Fabrice Di Meglio
0343a7eb6d Merge "TextLayoutCache - add glyphs caching" 2011-04-08 14:51:08 -07:00
Fabrice Di Meglio
fcf2be1846 TextLayoutCache - add glyphs caching
- cache glyphs after Harfbuzz shaping
- use "m" prefix for member variables
- add temporary API for drawing text with glyphs
- update BiDiTest app

Change-Id: I619b3f313b15f010018daad21b3e5e486619b4e4
2011-04-08 14:37:18 -07:00
Joe Onorato
43a17654cf Remove the deprecated things from Config.java. These haven't been working since before 1.0.
Change-Id: Ic2e8fa68797ea9d486f4117f3d82c98233cdab1e
2011-04-07 19:23:05 -07:00
Alex Sakhartchouk
78a9f6a822 Merge "First draft of fbo in renderscript. Updating samples and benchmark" 2011-04-04 14:33:19 -07:00
Alex Sakhartchouk
8e90f2bc1f First draft of fbo in renderscript.
Updating samples and benchmark

Change-Id: I469bf8b842fca72b59475c8fa024c12cf0e14954
2011-04-01 14:19:01 -07:00
Brad Fitzpatrick
d117428bf9 am 5db7fd6b: am f7a9b869: am 1e7fb7ae: Merge "Error in compound cache-control header."
* commit '5db7fd6b70f47f31fbc59f92907b9807f9c4e64d':
  Error in compound cache-control header.
2011-03-30 16:38:18 -07:00
Brad Fitzpatrick
5db7fd6b70 am f7a9b869: am 1e7fb7ae: Merge "Error in compound cache-control header."
* commit 'f7a9b8691918642db74a667a71028c0a77b527ff':
  Error in compound cache-control header.
2011-03-30 08:21:23 -07:00
Fabrice Di Meglio
eee49c699c Fix text redering issue where the text was sometimes truncated
- mostly was visible in Settings apps / Wi-Fi networks summary info for each network
- correctly setup the local SkPaint for advances computation
- improve test app for adding live resizing

Change-Id: Ia031fe1b115b521ba55c7e68f2a26300f02e48ca
2011-03-29 19:44:33 -07:00
Henrik Baard
eb0ced7a09 Error in compound cache-control header.
A cache control header containing both no-cache and max-age attribute does not
behave as expected.

Cache-Control: no-cache, max-age=200000

Will set expired to 20000ms seconds, ignoring the no-cache header. My
interpretation is that the no-cache header should not be ignored in
this case.

Change-Id: Iadd1900e4d2c6c0dacc6bb3e7b944cf78ca9b266
2011-03-29 08:54:09 +02:00
Fabrice Di Meglio
aa5eb64a0c Merge "Use Harfbuzz instead of ICU4C for computing advances" 2011-03-23 10:56:41 -07:00
Fabrice Di Meglio
9f82b580d7 Use Harfbuzz instead of ICU4C for computing advances
- use Harfbuzz shaper for shaping and getting glyphs
- add test app for showing result of drawText() and drawGlyphs()
- add private API in Canvas and Paint for test app

Change-Id: Ia15be216f8636d2d864066e9b7de2f53008c30f6
2011-03-22 19:36:30 -07:00
Romain Guy
1a81aea814 Update GL textures when changing a Bitmap's pixels
Bug #4146495

Change-Id: I4fe3f8501373b86b164af11ae51642b140035bb8
2011-03-21 15:30:27 -07:00
Romain Guy
ed6fcb034b Add support for drawPoint() and drawPoints().
Change-Id: I01bef50c08ec3160f8d40dc060b2cf6c2e4d7639
2011-03-21 13:11:49 -07:00
Romain Guy
8329db39f2 am b245e31f: am ee7ace06: Merge "Fix rendering artifact in edge fades. Bug #4092053" into honeycomb-mr1
* commit 'b245e31fa8dd1ad6a59ccf858154f3c7b92e0eb8':
  Fix rendering artifact in edge fades. Bug #4092053
2011-03-14 18:21:21 -07:00
Romain Guy
ee7ace065f Merge "Fix rendering artifact in edge fades. Bug #4092053" into honeycomb-mr1 2011-03-14 18:16:39 -07:00