8675 Commits

Author SHA1 Message Date
Mike Reed
871cd2dd60 use SkVertices::Builder in drawBitmapLattice
override new virtual onDrawVerticesObject

Test:  CtsGraphicsTestCases

Change-Id: I38e3ee0aa2a1ee9c11474c2c5d648ee5fca20d78
2017-03-20 08:40:12 -04:00
Adam Lesinski
10eb1455b9 Merge changes from topic 'configForSplit'
* changes:
  libandroidfw: Search all packages for an identifier
  AAPT2: Finish support for feature splits
  Add support for configForSplit
2017-03-17 23:19:13 +00:00
Ben Wagner
3aeda5c5c4 Use access directly instead of sk_exists.
Skia would like to move SkOSFile and make it private spi. This appears
to be the only place SkOSFile is used outside Skia, and using access
here directly is more apropriate.

Test: Simple inline refactor, built and ran. Changes test code only.
Change-Id: Ib76c180bb3bccc54c20dcadc842837e3e8270929
2017-03-17 17:22:01 -04:00
Derek Sollenberger
08153e655a Merge "Remove usage of deprecated makeImageSnapshot parameter Test: Does it compile?" 2017-03-17 00:41:16 +00:00
Adam Lesinski
0e25d9ae77 libandroidfw: Search all packages for an identifier
In order to allow multiple packages with the same package name, but
different package ID, we need to keep searching packages until the
resource is found.

Bug: 30999713
Test: make libandroidfw_tests
Change-Id: If4540e12731ca18a18e9e550a9bf248606a586c5
2017-03-16 15:45:16 -07:00
TreeHugger Robot
f596ba9375 Merge "Bowing my head in shame, going back to gamma interpolated gradients" 2017-03-16 21:15:15 +00:00
Romain Guy
6183c97e5f Bowing my head in shame, going back to gamma interpolated gradients
Frankengradients (linearly interpolated RGB, gamma interpolated alpha) look
fantastic but unfortunately create sligh compatibility issues. For instance,
a gradient from 0xffea1030 to 0x00ea1030 (opaque to alpha, with a single
color) blended on top of 0xff101010 would not look the same as a single
opaque gradient from 0xffea1030 to 0xff101010. The difference is hardly
noticeable on simple gradients but it could cause confusion amongst app
developers. Their life is hard enough as it is, let's be good to them.

My crusade against the gamma world is not over and one day I shall
be the victor. I am patience.

Bug: 35485208
Test: UiRendering.ShaderTests, UiRendering.GradientTests, manual testing
Change-Id: I8204e60cdf0a6b12dfe22638d30ca9622687000e
2017-03-16 12:29:03 -07:00
Robert Phillips
cd2eb91c40 Remove usage of deprecated makeImageSnapshot parameter
Test: Does it compile?

Change-Id: Ia51ad621daa3409f65b2f3e4d5691891271918a2
2017-03-16 19:13:39 +00:00
TreeHugger Robot
9e8f05f77d Merge "Improve dithering of alpha gradients" 2017-03-16 17:41:43 +00:00
Romain Guy
0d86d7ebc2 Improve dithering of alpha gradients
Bug: 32984164
Test: CtsUiRenderingTestCases
Change-Id: Ic728725845befd3c52cc7b043d5c6f8e33fcfcd2
2017-03-15 20:38:11 -07:00
Mathias Agopian
26fddcd742 Get rid of LinearTransform
A copy of LinearTransform is moved here.

This reverts commit b80f086f69a4bc2e51d1f94ae58d7ba6b20514c4.

Test: compile/run
Bug: treble cleanup
Change-Id: I435cac1f57ded10d434e4354985ad1a1bd3841f3
2017-03-15 14:19:40 -07:00
TreeHugger Robot
402a384ac8 Merge "Pass FontCollection to doLayout's argument instead of ctor" 2017-03-15 17:34:21 +00:00
Seigo Nonaka
51218e80f7 Pass FontCollection to doLayout's argument instead of ctor
Test: minikin_unit_tests
Test: minikin_stress_tests
Bug: 36223724
Change-Id: I55aca62eab4df0c138fec764d616984b50bd73f1
2017-03-14 16:56:10 -07:00
Chris Craik
95e8afbb5e Merge "Revert "Change behavior of setBitmap to cleanly reset the canvas - identity matrix - no save stack - wide-open clip"" 2017-03-14 23:35:29 +00:00
Tony Mantler
4f641d1e45 Revert "Change behavior of setBitmap to cleanly reset the canvas - identity matrix - no save stack - wide-open clip"
https://buganizer.corp.google.com/issues/36218535

This reverts commit 269f989fbf198b17994baf9141c4640aeaf34b4e.

Change-Id: Ib2473e4fce90c9abaa39eea2b77082ae26197b80
2017-03-14 22:40:31 +00:00
Ian Pedowitz
b73ea72723 Merge "Revert "remove LinearTransform from libutils"" 2017-03-14 08:15:42 +00:00
Ian Pedowitz
b80f086f69 Revert "remove LinearTransform from libutils"
This reverts commit d4d6167f614a9001d9827a8634a26b5e9445a22c.

Bug: 36206160
Test:  Fugu compiles, didn't before the revert
Change-Id: I2b0d3a05546ee2605555a9aa7ae028f2baeaf439
2017-03-14 08:11:32 +00:00
TreeHugger Robot
a813413a6e Merge "remove LinearTransform from libutils" 2017-03-13 22:06:15 +00:00
Mathias Agopian
d4d6167f61 remove LinearTransform from libutils
this was the only client.

Test: compile
Bug: cleanup for treble
Change-Id: Ibe2308d5fffb18c398db47e27d0123d629f675fe
2017-03-13 13:36:52 -07:00
TreeHugger Robot
9b0a5d1919 Merge "use _deprecated suffix for deprecated clipops" 2017-03-13 19:19:34 +00:00
Mike Reed
a0a74d5f8e use _deprecated suffix for deprecated clipops
Allows skia to remove legacy flag for older names
- SK_SUPPORT_EXOTIC_CLIPOPS
- SK_SUPPORT_LEGACY_CLIPOP_EXOTIC_NAMES

Test: CtsGraphicsTestCases

Change-Id: I78478d94d059641a9381579cae6d28f9f0685ad1
2017-03-13 17:38:16 +00:00
TreeHugger Robot
1965d2898c Merge "Change behavior of setBitmap to cleanly reset the canvas - identity matrix - no save stack - wide-open clip" 2017-03-13 17:33:05 +00:00
Mike Reed
269f989fbf Change behavior of setBitmap to cleanly reset the canvas
- identity matrix
- no save stack
- wide-open clip

Behavior around the new bitmap is the same.

Tests : CtsGraphicsTestCases

Change-Id: Ieaf8c2a1b96262ed33940dd852a86089eb93efdb
2017-03-13 15:39:57 +00:00
Stan Iliev
7d73fc2303 Add a new macrobench to test layer resize
Create a new HWUI macrobench to test hardware layer resize code path.

Test: Executed the new test on bullhead device with "adb shell
/data/benchmarktest64/hwuimacro hwlayersize --onscreen --wait-for-gpu -c
1000".

Change-Id: I9ed411d76ac3d51339a69add8ab1843c3256994a
2017-03-13 10:16:08 -04:00
TreeHugger Robot
cfdfd997bd Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-10 05:15:21 +00:00
TreeHugger Robot
0c1563d3dd Merge "Prematurely optimizing a Path." 2017-03-09 21:43:01 +00:00
Derek Sollenberger
d7f13f84f8 Prematurely optimizing a Path.
If the path had an inverse fill type we were incorrectly
converting ovals and roundRects to their primitive form
without checking to ensure the path was not inverse fill.

This CL removes these optimizations as they happen internally
within Skia.

Bug: 34245907
Test: verified broken app is fixed and that skia has existing tests
Change-Id: I8c1ff6522ae19fc6c21520adc7e9bc2473a8a4ad
2017-03-09 13:59:23 -05:00
Robert Carr
d5c7dd6da8 Modify SurfaceView to use SurfaceFlinger child surfaces.
Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing the revert was an incorrect JNI signature
around deferTransactionUntilSurface. I've noted it inline.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ie56b6f7ab16f32d7fc459b8eba26594337ad55de
2017-03-08 17:36:10 -08:00
Mathias Agopian
2bd7d98fe8 fallout from getting rid of IGraphicBufferAlloc
Test: compiled & run
Bug: cleanup
Change-Id: I1590105d3abef985c2ae7c1a03cdf5fd2ec4bef9
2017-03-08 23:12:06 +00:00
TreeHugger Robot
07be4d6781 Merge "Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."" 2017-03-08 06:28:11 +00:00
Wonsik Kim
5aec7b9031 Revert "Modify SurfaceView to use SurfaceFlinger child surfaces."
This reverts commit cd4aeef88052571365d4e193a2c41e2e6d145491.

Bug: 36027342
Bug: 36015884
Change-Id: Ifd5b69caf64d65a8cd6570b7fe1fb6abe90e30b8
2017-03-08 01:52:19 +00:00
TreeHugger Robot
f4f093c52c Merge "Reinstate codes to enable RRO on system server" 2017-03-08 00:43:00 +00:00
TreeHugger Robot
7ef25b7894 Merge "Add ColorSpace information on Bitmap" 2017-03-07 18:37:13 +00:00
Chris Craik
3cad2c33ee Merge "Workaround arc textures drawing outside of bounds" 2017-03-07 17:53:22 +00:00
Romain Guy
efb4b06493 Add ColorSpace information on Bitmap
This is the first step toward interpreting color spaces at render time.

Bug: 32984164
Test: BitmapColorSpaceTest in CtsGraphicsTestCases

Change-Id: I0164a18f1ed74a745874fe5229168042afe27a04
2017-03-06 19:33:25 -08:00
Chris Craik
49b403dc9c Workaround arc textures drawing outside of bounds
Fixes: 34077513
Test: hwui unit tests passing

This fixes an issue where drawArc operations would cause artifacts by
drawing outside of the clip / screen damage area. We now more
conservatively clip drawArc operations specifically, as they tend to
draw into the outer parts of their path textures more than other
operations.

A more long term fix would involve alignment between draw operation
sizing (in terms of what's resolved in a BakedOpState), and
PathTexture sizing (which currently conservatively expands beyond
stroked op bounds).

Change-Id: I5aff39cc04382323b457b159974032f5f371251a
2017-03-06 13:51:44 -08:00
Tom Cherry
4d7094dc99 Merge "Check for spurious wake ups" am: 3a3cd0a27f am: c2dcebe6e6
am: 1344c034c5

Change-Id: I8ffc749ab6fbd825ce238fff4ba1d12609585c04
2017-03-06 20:14:37 +00:00
TreeHugger Robot
df2870df9a Merge "AAPT2: Fix parsing ResTable_type" 2017-03-06 20:01:17 +00:00
Tom Cherry
c2dcebe6e6 Merge "Check for spurious wake ups"
am: 3a3cd0a27f

Change-Id: Ia445070278f5a80c85b48e06ddf614d462db45af
2017-03-06 19:57:18 +00:00
Roozbeh Pournader
b85f02e9ad Merge "Frameworks support for hyphenation for various complex cases" 2017-03-06 19:19:11 +00:00
Roozbeh Pournader
46c6f4c5ea Frameworks support for hyphenation for various complex cases
This adds better support for Arabic script languages, Armenian,
Catalan, Hebrew, Kannada, Malayalam, Polish, Tamil, and Telugu by
adding various hyphenation types and edits appropriate for the
locales.

The actual implementations are in Minikin. This CL takes care of the
changes needed in frameworks, to support different end-of-line and
start-of-line hyphen edits.

Two bugs in TextLine.java are also fixed:

1. Where hyphen edits on non-spanned texts were not eliminated in
handleRun() when they should have. This had manifested itself in
double hyphenation in some bidi paragraphs.

2. Some no op assignments and comparions around the change for the
above bug are removed.

Test: thorough manual testing for various cases
Bug: 19756624
Bug: 19950445
Bug: 19955011
Bug: 25623243
Bug: 26154469
Bug: 26154471
Bug: 33387871
Bug: 33560754
Bug: 33752592
Bug: 33754204
Change-Id: I48c047d1f6a75c39a78a6ea38a0a3282f63326ec
2017-03-03 15:34:42 -08:00
TreeHugger Robot
f1e54c9a1c Merge "Modify SurfaceView to use SurfaceFlinger child surfaces." 2017-03-03 22:45:24 +00:00
Adam Lesinski
136fd0764f AAPT2: Fix parsing ResTable_type
ResTable_type's size changes due to it containing
ResTable_config. Make sure we check for the minimum size
required to read it.

Bug: 35861796
Test: Manual (don't have an integration test harness setup yet)
Change-Id: Ifb0cd1d732625f59835c8ed0449adb78129636de
2017-03-03 14:01:09 -08:00
Robert Carr
cd4aeef880 Modify SurfaceView to use SurfaceFlinger child surfaces.
Here we have SurfaceView bypass the WindowManager and speak
directly to SurfaceFlinger using child surfaces. We also
implement some logic in the WM to handle child surfaces
in various Surface replacement scenarios.

For those following along in the revert Saga, this
also includes the follow up CLs to the original CL.
- Surface inset calculation
- Animation fixes.

The error causing revert was a deferTransactionUntil(-1)...-1
cast to uint, defer transaction until MAX_UINT.

Bug: 28858420
Bug: 31518219
Bug: 34888808
Bug: 35588318
Bug: 35396882
Test: Existing tests still pass (except for the ones that don't and will be deleted).
Change-Id: Ib37236950a1dd3c4f9f4b58fd41ef9003c0557ef
2017-03-03 13:06:59 -08:00
Derek Sollenberger
792fb3252f Use SkPaint.nothingToDraw instead of PaintUtils helper.
The PaintUtils helper is now shared between all pipelines and was
missing a quick reject test for drawLoopers which are used in
view.setShadowLayer and supported in the Skia pipelines.

Bug: 35809097
Test: added hwui unit test and verified in DocumentsUI app
Change-Id: I3c4a988f1c42b7f421f78ac3659af1daee910ea2
2017-03-03 14:24:58 -05:00
Rob Carr
115d2dbf93 Merge "Revert "SurfaceView: Include surfaceInsets in position calculation"" 2017-03-03 01:16:28 +00:00
Rob Carr
8009012644 Revert "SurfaceView: Include surfaceInsets in position calculation"
This reverts commit 8c31e1db2a2cea4278503d6b9b27bca87946ef36.

Change-Id: Id25f493ca272878c2105f9cd302db1e05284998d
2017-03-03 01:15:36 +00:00
TreeHugger Robot
4f357c0812 Merge "Fix potential use-after-free in LayerUpdateQueue" 2017-03-02 23:16:27 +00:00
TreeHugger Robot
e1c54d53f1 Merge "Update SkiaDisplayList to use the modified SkLiteDL" 2017-03-02 22:45:35 +00:00
Jaekyun Seok
7de2f9c73f Reinstate codes to enable RRO on system server
Test: building succeeded and tested with sailfish
Bug: 35742444
Change-Id: I99d0f1d097525d3eb46255d6cf823f6ae2a02385
2017-03-03 07:23:23 +09:00