This change detects what area of a layer was drawn into and generates a mesh
to match this area exactly. This can be used to avoid blending empty pixels
when the layer is composited.
This change also adds proper layers support to lines rendering and implements
layers composition in a more readable way.
Change-Id: I4a5588b98b19bd66891ebdc39631b193c5e31999
We removed the implementation, so there's no point trying to test it. (The
methods are still there for binary compatibility, which is why this still
compiled.)
Change-Id: I51f392f3dab542fca0c80fab4974354e2c689b9e
This API can be used to back a view and its children with either a
software layer (bitmap) or hardware layer (FBO). Layers have
various usages, including color filtering and performance
improvements during animations.
Change-Id: Ifc3bea847918042730fc5a8c2d4206dd6c9420a3
if a webview dump times out, normally it's already in a bad state,
throwing runtime execption will generate a crash on the test case
and make the test move forward.
Change-Id: Id7430700db6b6d90160d60d23debd250b1731789
Layers require that drawing methods potentially
draw in more than one bitmaps.
To handle this this patch offers the following:
- move all drawing methods to use Drawable
- Drawables are now handled by GcSnapshot since
its the one handling the layers
- moved Canvas_Delegate.createCustomGraphics to
GcSnapshot which does not expose the Graphics2D
objects anymore so its draw() methods are the only
way to draw.
- handles creating layers in GcSnapshot.save() and
blitting them in restore()
Other changes:
- Clean up the create/save API in GcSnapshot
- Fixed drawing bitmaps with alpha and other
composite modes.
Change-Id: I1e230087493d044a10de71f4b6d29083e3f3bf64
- always set up the stroke. Paint may not have the proper
style when drawing lines. stroke should still be setup.
- Fixed vertical linear gradient. Old code generated
a gradient ratio of NaN
- Fixed alpha rendering when using shaders. In that
case the alpha channel from the paint color should be
used in conjunction with the shader.
- Fixed miter limit. Java expects the value to be multiplied
by the stroke width
- Fixed support for drawing ALPHA_8 bitmaps. Java2D doesn't
have bitmaps with only alpha channels, so we keep using
ARGB bitmaps but when drawing them into a bitmap we erase
the color information.
Change-Id: I4f04341fc843e3f7dadd1fdbf709b11a4f1e24b9
Also created delegates for all missing shader, xfermode
and patheffect classes. Moved the logic of the xfermode,
and patheffects that was in Canvas_Delegate into the
xfermode/patheffect classes, and added support (in all
3 clases) for knowing if the shader/xfermode/patheffect
is actually supported or not. Make use of fidelityWarning
in LayoutLog if they are not.
The goal is use the app to test layout lib, so layout
files are needed, and custom views must be instantiable
(ie public)
Change-Id: I46bb3d8af6e4d7973d041aa618f1c7762efd93d0
Also know as:
Issue #3272051 Contacts edit view: Tapping the in-app back button
results in a forward transition
Yeah more complexity in deciding which animation to use.
Also reduce complexity in deciding which app's animation set to use,
to balance things out (and make it have less stupid behavior).
Change-Id: I78c6c5c5249a96206f7e03ce587c1dcb9a7dc14f
Currently test code use getActivity to get DRT's assets. However
the side effect is that this will actually launch the activity.
This is not affecting any tests yet, however there are cleaner
ways to do this. The instrumentation framework provides a
getTargetContext call which will give access to app under test's
context, and therefore granting access to its assets.
Change-Id: I0560b0fa5681f80bcb9296beec3fd0549c40cc8e
(This introduces a StatusBarManager disable flag to ask the
status bar to hide just the clock, which might be useful in
other situations, such as clock/dock apps.)
Bug: 3130393
Change-Id: Ia08627508518e2ed3713ffbf856e4ec42952b3a8
Ordinarily, changing the "when" slot when updating a
Notification will move its expanded payload to the bottom of
the notification panel's list. But if it's already at the
bottom, this causes an unsightly out-then-in animation
sequence. We now check for that exact situation.
Bug: 3222274
Bug: 3162218
Change-Id: I8b643b3f8bce64e57a22bdbb06d92c196c2484c2
Currently layout test list is passed between two processes in
intent, which does not work for large lists. This change store
the list in external storage folder (per app based, actual
location determined by framework) instead.
Change-Id: Ib175f766159f5e4f831d6b9ace9f1c4caef7298d
What this adds:
- A new Intent activity flag to completely replace an existing task.
- A new Intent activity flag to bring the current home task up behind
a new task being started/brought to the foreground.
- New versions of startActivity() that take an array of Intents to be
started, allowing applications to start a task in a specific state.
- A public moveTaskToFront() method on ActivityManager, with a new flag
that allows the caller to have the task moved to the front with the
current home task immediately behind it.
Change-Id: Ie8028d09acffb5349d98043c67676daba09f75c8
We now decide whether to use a bitmap background based on whether the
window's drawing is hardware accelerated. To do this, there is a new
"state_accelerated" that state list drawables can be parameterized on,
and the standard window background uses this to select a solid color
or bitmap drawable as appropriate.
Introduces a little hackery to have wm preview windows pretend like
they are hardware accelerated even if they aren't, so the preview looks
closer to the actual app.
Also Add a DialogWhenLarge variation for the light theme.
Change-Id: I215a79d5df65ba3eed52ab363cade9d8218a6588
This factors out a new Point class and a new
createViewPointFromContentCoordinates() method. This will allow Point
and the conversion method to be re-used with mouse events.
Change-Id: I2d689d0ffa0ad7ba01d0e90f78c812604ab96234
I've manually checked the existing LayoutTests for false positives.
There are non-test .php files, but they're all in "resources"
subdirectories, so they should be caught by isTestDir(). Added an
extra @warning to isTestFile() just in case.
Bug: 3164771
Change-Id: Ib282acf46f6e839439ce521c4b2cb5820fcd263c