Commit Graph

3162 Commits

Author SHA1 Message Date
Chris Craik
05cdededbe Merge "Add conic support for Path#approximate" into oc-dev am: ebd44d0076
am: a1e500ebf4

Change-Id: Ifc5033fbb595a672a29539599e39ac7e56c62d50
2017-04-28 19:11:02 +00:00
TreeHugger Robot
ebd44d0076 Merge "Add conic support for Path#approximate" into oc-dev 2017-04-28 18:47:37 +00:00
Chris Craik
4226800aa4 Merge "Make SurfaceTexture#isReleased public API" into oc-dev am: 533538c96e
am: 7b026d8aa4

Change-Id: Ia6d5b4179881c20f30a4de3b3e2efde38bfa4c23
2017-04-28 17:32:16 +00:00
Chris Craik
533538c96e Merge "Make SurfaceTexture#isReleased public API" into oc-dev 2017-04-28 17:09:55 +00:00
Chris Craik
96202d56ad Add conic support for Path#approximate
Fixes: 37722722
Test: bit CtsGraphicsTestCases:PathTest
Test: bit CtsUiRenderingTestCases:android.uirendering.cts.testclasses.PathTests

Also adds static asserts to path-walking code, to avoid this problem
in the future.

Also adds annotations, since this is public API now.

Change-Id: Ic39b167968b98fd8197be2d0f9aca79949717237
2017-04-27 16:24:18 -07:00
Seigo Nonaka
a517948365 Merge "Merge "Revise method comment on setFontVariationSettings" into oc-dev am: e6746726bc" into oc-dev-plus-aosp
am: af77018f5a

Change-Id: I4d1ebb95729eaad4f59d4ae7590d47665e927aa6
2017-04-27 17:56:53 +00:00
TreeHugger Robot
e6746726bc Merge "Revise method comment on setFontVariationSettings" into oc-dev 2017-04-27 17:34:48 +00:00
Seigo Nonaka
865ae63322 Merge "Font API clean up" into oc-dev am: 25c2cdc052
am: 7de96042ed

Change-Id: If2580c1ea3b58b377484a26fd7e9107e9958e3ed
2017-04-26 23:49:09 +00:00
Seigo Nonaka
443afa50fc Merge "Load font file from remote provider synchronously." into oc-dev am: 1c661d1943
am: 6c0dd10a7c

Change-Id: Ifc66af9b116093e3d63bfedd1782f017a7126d3a
2017-04-26 18:13:40 +00:00
Seigo Nonaka
080b054bdd Font API clean up
- Move FontRequest from android.graphics.fonts to android.provider since
  this is only used by android.provider.FontsContract and never draw
  anything.
- FontRequest is no longer being Parcelable.
- Remove FontSpec.aidl which is not necessary.

Bug: 37326126
Test: am instrument -w -e class android.provider.FontsContractTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontProviderTest
      android.provider.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.cts.FontRequestTest
      android.provider.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I0eb501844247c2f07eaa1fc7a71f72e404888b5b
2017-04-26 18:00:17 +00:00
Seigo Nonaka
d9de8be233 Load font file from remote provider synchronously.
Since CancellationSignal is not guaranteed to be handled by remote
process, introduce threaded font loading mechanism.
At the same time, this fixes possible NPE issue in openFont.

Bug: 37552479
Test: am instrument -w -e class android.provider.FontsContractE2ETest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: Ie235c5a57bd172b0882da5aa27a990d7c6686ff2
2017-04-25 21:19:22 -07:00
Seigo Nonaka
802c41bd11 Merge "Font provider cleaning ups." into oc-dev am: 5313eee98a
am: a3d5786a3d

Change-Id: Ic9a30e9bf8404c3a469bb0c998fd876ee94a3488
2017-04-26 00:39:15 +00:00
Chris Craik
f461219185 Make SurfaceTexture#isReleased public API
Bug: 36902442
Test: bit CtsUiRenderingTestCases:android.uirendering.cts.testclasses.TextureViewTests

This method is already tested in TextureViewTests in CtsUiRenderingTestCases.

Change-Id: Id2d186f966d5e2b7c50a8b2ecefcd66c8a87c1fd
2017-04-25 15:57:57 -07:00
Seigo Nonaka
54084b64b1 Font provider cleaning ups.
- Remove Columns.STYLE
- Decouple Context from Typeface.
- Make FontsContract constructor private since it is essentially static.
- Removed unused constants.

Bug: 37281200
Bug: 37268410
Test: am instrument -w -e class android.provider.FontsContractE2ETest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.provider.FontsContractTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: Ic46c256141d27ca28f30023bcc40f4e1161d5338
2017-04-25 19:40:58 +00:00
Seigo Nonaka
94bc52b2e1 Merge "Remove Typeface.create" into oc-dev am: 0a7096dccb
am: 0582ccb776

Change-Id: Ie116f1f179730d488913bf89627dad1f76b635b3
2017-04-25 19:38:26 +00:00
Seigo Nonaka
5a09c64345 Remove Typeface.create
Test: Manually done
Bug: 37514611
Bug: 37463988
Bug: 37281200
Change-Id: Ida704af910e0ae195b96803de506fa1e1d66c9f5
2017-04-25 09:38:39 -07:00
Jeff Sharkey
e01a56bb66 Merge "More auto-doc work." into oc-dev am: 6bc03748a7
am: f25b285706

Change-Id: Ic6b7c359259b6fd809b1a01ba249a7b44e15a29f
2017-04-24 18:37:08 +00:00
Jeff Sharkey
6bc03748a7 Merge "More auto-doc work." into oc-dev 2017-04-22 19:11:34 +00:00
John Reck
edc106d63e Merge "Fix @throws javadoc on SurfaceTexture ctors" into oc-dev am: aec1fbeaa3
am: 30baf2affa

Change-Id: I55e33f2d6b4e536d93daac57ff543c1f0d4780e9
2017-04-21 23:48:38 +00:00
Adam Lesinski
ea957eb6d2 Merge "Propagate density through AdaptiveIconDrawable and BitmapDrawable" into oc-dev am: 5be3647a9e
am: 091fe96343

Change-Id: Ib313379b085c4d3ee435b22bb844aeeef6ff74cf
2017-04-21 23:40:31 +00:00
TreeHugger Robot
aec1fbeaa3 Merge "Fix @throws javadoc on SurfaceTexture ctors" into oc-dev 2017-04-21 23:25:54 +00:00
TreeHugger Robot
5be3647a9e Merge "Propagate density through AdaptiveIconDrawable and BitmapDrawable" into oc-dev 2017-04-21 22:35:57 +00:00
Jeff Sharkey
910e081216 More auto-doc work.
Add support for AnyThread, CallSuper, and UiThread.

Another related CL started documenting @RequiresPermission, so remove
duplicated information in existing APIs.

Suppress auto-doc on a handful of classes that are already
well-documented.

Test: make -j32 offline-sdk-docs
Bug: 37526420
Change-Id: I791437dccec0f11d5349a23b982ba098cb551af8
2017-04-21 16:35:08 -06:00
John Reck
b8d152f5cd Fix @throws javadoc on SurfaceTexture ctors
Change-Id: I63bd76ec4e44251b7e06ad6fc8aa5a3372104656
Fixes: 37323694
Test: Looked at generated docs, verified correct
2017-04-21 13:49:36 -07:00
Adam Lesinski
50954d2b4e Propagate density through AdaptiveIconDrawable and BitmapDrawable
Resources#getDrawableForDensity now propagates the overridden
density through to AdaptiveIconDrawable so that the density can be
propagated to leaf BitmapDrawables correctly.

This enables AdaptiveIconDrawable to support higher resolution
foreground/background bitmaps for use in Launcher.

Bug: 36039665
Test: bit CtsContentTestCases:android.content.res.cts.ResourcesTest
Change-Id: Iaa9a5592626e38e1ff839a76f7c6cfb9e16e5dc1
2017-04-21 13:25:44 -07:00
Lucas Dupin
db83feae54 Merge "Add transfer mode support to ColorDrawable" into oc-dev am: eedceb5721
am: a17c58ff59

Change-Id: Ied2dd786e7a31f53c685b920e119bd127f9d9f82
2017-04-21 20:04:00 +00:00
TreeHugger Robot
eedceb5721 Merge "Add transfer mode support to ColorDrawable" into oc-dev 2017-04-21 19:29:07 +00:00
Seigo Nonaka
a691442ce0 Merge "Cache the Typeface based on the FontRequest." into oc-dev am: 5b96e55d90
am: a121eabf99

Change-Id: Ib4e0860910b498cc8effb5b62b5642d0d9bbd39d
2017-04-21 18:18:19 +00:00
Seigo Nonaka
daa8dfc690 Cache the Typeface based on the FontRequest.
Bug: 37471729
Test: FontsContractE2ETest
Change-Id: Ifb1bd2b50077471404f5f1dffc01e7697d7042e6
2017-04-21 09:11:10 -07:00
Hyunyoung Song
2d63567164 Merge "Support fraction type for inset* for InsetDrawable. b/36024318" into oc-dev am: ab7a2879eb
am: a457ce7ce8

Change-Id: I9dab39e4f2ee254925bcf2bdba592e8769016cc9
2017-04-21 15:38:14 +00:00
TreeHugger Robot
ab7a2879eb Merge "Support fraction type for inset* for InsetDrawable. b/36024318" into oc-dev 2017-04-21 15:14:27 +00:00
Clara Bayarri
506847aa92 Merge "Update Typeface callback docs about error codes" into oc-dev am: 337be5a12f
am: 5d2334fb7c

Change-Id: Ib85820fd4e743102b6697ecb9ac92b5e45aa9c05
2017-04-21 09:55:49 +00:00
TreeHugger Robot
337be5a12f Merge "Update Typeface callback docs about error codes" into oc-dev 2017-04-21 09:44:53 +00:00
Hyunyoung Song
d0dfe3008d Support fraction type for inset* for InsetDrawable.
b/36024318

Test: manually tested on default icons.
Test: $ runtest --path=cts/tests/tests/graphics/src/android/graphics/drawable/cts/InsetDrawableTest.java

adb  shell am instrument -e class 'android.graphics.drawable.cts.InsetDrawableTest' -w 'android.graphics.cts/android.support.test.runner.AndroidJUnitRunner'

android.graphics.drawable.cts.InsetDrawableTest:........................

Time: 0.132

OK (26 tests)

Change-Id: Ie8d24680b6884e65017f07723a371120f5ae610c
2017-04-20 16:23:40 -07:00
Lucas Dupin
b27b47df6b Add transfer mode support to ColorDrawable
Test: runtest --path cts/tests/tests/graphics/src/android/graphics/drawable/cts/ColorDrawableTest.java
Change-Id: Ice87f248e307710315304fc191cb58ee7142e525
2017-04-20 13:57:01 -07:00
Romain Guy
fdd18cf325 Merge "Set the color space as nullptr on native bitmaps when sRGB is requested" into oc-dev am: e53b00c6d1
am: 09071f9bdf

Change-Id: I7229520e46f2ee3f0f49f0971b761b2a4a4358c1
2017-04-20 13:46:24 +00:00
Chris Craik
3eccc9b7fe Merge "Fix compose shader child local matrix mutation" into oc-dev am: 611fae13df
am: 88677af970

Change-Id: I68729ff5415f329feeabb160c0308ecbe3d8fb3f
2017-04-20 13:21:35 +00:00
Seigo Nonaka
d6c8688ca7 Merge "Add comment to Typeface.Builder about file descriptor." into oc-dev am: f3157e1692
am: 39b5ad8411

Change-Id: Ia159ba2bff5cc333e6945d05291002ab8669c612
2017-04-20 12:42:11 +00:00
Clara Bayarri
5706a1b12d Update Typeface callback docs about error codes
As requested by API council, mention that the provider may
return its own error codes within the positive int range.

Bug: 37084803
Test: none
Change-Id: Ia8ee99432cc5025a12d43049e327605095dd2b57
2017-04-20 12:02:57 +01:00
TreeHugger Robot
e53b00c6d1 Merge "Set the color space as nullptr on native bitmaps when sRGB is requested" into oc-dev 2017-04-19 21:09:46 +00:00
TreeHugger Robot
611fae13df Merge "Fix compose shader child local matrix mutation" into oc-dev 2017-04-19 20:41:06 +00:00
TreeHugger Robot
f3157e1692 Merge "Add comment to Typeface.Builder about file descriptor." into oc-dev 2017-04-19 20:08:57 +00:00
Romain Guy
08587d45b1 Set the color space as nullptr on native bitmaps when sRGB is requested
This regression is a fallout from the recent API council feedback
fallout. The default color space used to be always set to null but
it's now the named SRGB instance. This change passes null to native
when the specified color space is known to be sRGB.

Bug: 37496760
Test: runtest managed-provisioning
Change-Id: Ie933c84e429a682a58ee253b57b77bd61b88ee5e
2017-04-19 11:58:05 -07:00
Chris Craik
f6b0e60bd0 Fix compose shader child local matrix mutation
Bug: 37495696
Test: cts-tradefed run singleCommand cts-dev --module CtsGraphicsTestCases --test android.graphics.cts.ComposeShaderTest

Adds back the verify step that discards a stale native ComposeShader if a child
changes.

Change-Id: I44f40c1edfdb7633994a69efb583cf28ee2c26b2
2017-04-19 10:57:25 -07:00
Romain Guy
b58a40d40f Merge "Change nullability of colorspace parameter" into oc-dev am: 944782fac2
am: 1c32d2cd98

Change-Id: I92853da836ce26801b9350cb1f65664e58e15d47
2017-04-18 23:42:41 +00:00
TreeHugger Robot
944782fac2 Merge "Change nullability of colorspace parameter" into oc-dev 2017-04-18 23:26:00 +00:00
Chris Craik
c8f8c6a7c7 Merge "Re-hide shader mutation, remove colorfilter mutation" into oc-dev am: 0f9f0f90e7
am: 0d6ea6a1f5

Change-Id: I84496c4aeee4cccc73f5d17f909d91f6910f1d85
2017-04-18 22:30:04 +00:00
Romain Guy
1fa9d86ea4 Change nullability of colorspace parameter
Bug: 37323693
Test: android.graphics.cts.BitmapColorSpaceTest
Change-Id: I705ac18e5c64c028c2e8366a18ec4ef20f44a630
2017-04-18 14:06:49 -07:00
Chris Craik
8a6ad4a89d Re-hide shader mutation, remove colorfilter mutation
Bug: 36025103
Bug: 37327129
Test: boots, CtsGraphicsTestCases passes

Change-Id: I937f8ae26ed47b4811dc033ed91c257670fc3a39
2017-04-18 12:57:59 -07:00
Seigo Nonaka
83ba4f9a04 Add comment to Typeface.Builder about file descriptor.
Add comment to Typeface.Builder about the responsibility of closing
file descriptor.

Bug: 37082657
Test: N/A
Change-Id: Id33b15895d75ad6693f3ad6231f1ba0c2cec9f79
2017-04-17 19:33:00 -07:00