Commit Graph

3193 Commits

Author SHA1 Message Date
Andrew Solovay
591cccd2e7 Merge "docs: Fixing malformatted HTML escape" into oc-dev am: 1272847f1d
am: 670286ea89

Change-Id: I8f9acee143abd62b2d0599ad7ee866235916084d
2017-05-24 18:21:17 +00:00
Andrew Solovay
22ebb54e17 docs: Fixing malformatted HTML escape
Through the file's javadoc comments, the less-than character is
improperly coded as "&lt" instead of "<" (it's missing the
terminating semicolon). Chrome is clever enough to render that as <
, but I don't know if other browsers do, and in any event we
shouldn't count on that behavior.

Doc is staged to:

http://go/dac-stage/reference/android/graphics/drawable/RippleDrawable.html

Test: make ds-docs
Bug: 62028102
Change-Id: I81813fcb758349300f56ce10ccb0d03046ab4736
2017-05-23 12:24:12 -07:00
John Reck
3915e25d41 Convert Shader to NativeAllocationRegistry
Bug: 38258699
Test: manual
Change-Id: I1537dee3187ea0366f2c236f3e6825196d738a37
2017-05-22 13:30:00 -07:00
John Reck
8bde0be1b4 Convert Shader to NativeAllocationRegistry
Bug: 38258699
Test: manual
Change-Id: I1537dee3187ea0366f2c236f3e6825196d738a37
2017-05-19 10:55:20 -07:00
Chris Craik
68169d84d9 Merge "Update Bitmap#prepareToDraw doc" into oc-dev am: d4fff1565b
am: 27caadd2c4

Change-Id: I403d0a52958c7bf2720f078f5db140e3a3c3ebe7
2017-05-12 20:34:36 +00:00
TreeHugger Robot
d4fff1565b Merge "Update Bitmap#prepareToDraw doc" into oc-dev 2017-05-12 20:06:27 +00:00
Derek Sollenberger
ef16269e41 Merge "Add an O-release targetAPI check for Canvas.setBitmap. am: d70695ee34" into oc-dev-plus-aosp
am: 172bd07308

Change-Id: Iddc0babe08b2e1a9abe1bebe117fa66832417cff
2017-05-11 14:56:32 +00:00
Derek Sollenberger
d70695ee34 Add an O-release targetAPI check for Canvas.setBitmap.
For apps targeting releases earlier than O setBitmap will attempt
to preserve the matrix from the previous bitmap.  It does not however
attempt to reconstruct the save/restore stack or the clip.

Test: manual test of messenger app referenced in the bug
Bug: 37589964
Change-Id: I67f0928a3f84a8be41da38ef1868e79bdeb03e46
2017-05-11 09:28:02 -04:00
Sergey Vasilinets
4f2c7f88ac Merge "Fix npe due to strict mode in Bitmap.sameAs" into oc-dev am: 8d2b02bf08
am: 54b5a35cbf

Change-Id: I2cc440261656e5cbba5e0e24b7da22b7bc631106
2017-05-11 04:57:44 +00:00
Chris Craik
b1d2f0a1d0 Update Bitmap#prepareToDraw doc
Fixes: 38132750
Test: none

Change-Id: I95d4617c08c1aab23c322ec40ae15462766db3ba
2017-05-10 16:38:50 -07:00
sergeyv
e1fc36d197 Fix npe due to strict mode in Bitmap.sameAs
bug:38164234
Test: none
Change-Id: Ib267d1b06f86980202693fc1c330f73ed06411b0
2017-05-09 16:36:09 -07:00
Tenghui Zhu
dddc5c5418 Merge "Fix VectorDrawable size rounding issue" into oc-dev am: be030126fe
am: ca353e51ce

Change-Id: I41bb4065bb6684871f5d2edb8037d6d98b1f6d49
2017-05-09 18:54:29 +00:00
Tenghui Zhu
be030126fe Merge "Fix VectorDrawable size rounding issue" into oc-dev 2017-05-09 16:38:36 +00:00
Seigo Nonaka
373b15bda9 Fix double bolding
resolveStyle increases minikinStyle's weight value based on Skia's style
value. Since we compute Skia's style based on given weight value, we
should not add extra bold weight to minikinStyle.

This CL also fixes misunderstanding of base weight.
The base weight is only used for computing weight relative to the
weighted alias. Thus, base weight should not be updated except for
createWeightAlias method.

To be clear, this CL changes the function names but keeps the same
semantics as before.

Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests
Test: am instrument -w -e class android.graphics.cts.TypefaceTest\
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Bug: 37880319
Merged-In: Ied73189b11792fb062da46f45afd2db664e6ecb4

Change-Id: I82350a1bfb99ce198b955f127949e21bccccb1cb
2017-05-09 04:10:07 +00:00
ztenghui
e2ec2e86ae Fix VectorDrawable size rounding issue
b/36668701
Test: Added new CTS test for this.
Change-Id: Ifcd74bc89e85841bf9f47eca8eb7d4eb401cf6ff
2017-05-08 13:54:58 -07:00
Seigo Nonaka
1f9c461e6a Fix double bolding
resolveStyle increases minikinStyle's weight value based on Skia's style
value. Since we compute Skia's style based on given weight value, we
should not add extra bold weight to minikinStyle.

This CL also fixes misunderstanding of base weight.
The base weight is only used for computing weight relative to the
weighted alias. Thus, base weight should not be updated except for
createWeightAlias method.

To be clear, this CL changes the function names but keeps the same
semantics as before.

Test: adb shell /data/nativetest/hwui_unit_tests/hwui_unit_tests
Test: am instrument -w -e class android.graphics.cts.TypefaceTest\
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Bug: 37880319

Change-Id: Ied73189b11792fb062da46f45afd2db664e6ecb4
2017-05-08 11:11:06 -07:00
Hyunyoung Song
eff12badb7 Merge "Fix issue in InsetDrawable where master inset attribute get ignored. Test: builds, and did manual test b/37752336" into oc-dev am: 52eba0ad70
am: 3c69ff323a

Change-Id: I146034df4aaf54d137897855f60133859deb45cc
2017-05-05 21:15:21 +00:00
Hyunyoung Song
52eba0ad70 Merge "Fix issue in InsetDrawable where master inset attribute get ignored. Test: builds, and did manual test b/37752336" into oc-dev 2017-05-05 20:52:55 +00:00
Sergey Vasilinets
de0c35decb Merge "Add StrictMode.noteSlowCall to calls that result in hw bitmap readback" into oc-dev am: 01a5cc9004
am: 9c29d93ee3

Change-Id: I85f853aee80cbe9659c646468d35fbd15a5a45d4
2017-05-05 19:56:10 +00:00
Sergey Vasilinets
01a5cc9004 Merge "Add StrictMode.noteSlowCall to calls that result in hw bitmap readback" into oc-dev 2017-05-05 19:31:53 +00:00
Seigo Nonaka
c7b291aad6 Merge "Resolve styles by font table if not specified." into oc-dev am: 1ea3a2600b
am: c000acd771

Change-Id: I7dc5268ddea18dfda560742b370388860dd87344
2017-05-05 19:15:24 +00:00
Seigo Nonaka
a5fa9e8a63 Resolve styles by font table if not specified.
android:fontStyle and android:fontWeight is an optional attribute.
If they are missing, we are using non-italic 400 weight, but this is
not good idea. We should resolve these style value from font metadata.

Bug: 37988154
Test: am instrument -w -e class android.content.res.cts.ResourcesTest
      android.content.cts/android.support.test.runner.AndroidJUnitRunner

Change-Id: I80a436cd3632d8c58fa3d8bdaedac73b95f61a8c
2017-05-05 09:30:34 -07:00
Hyunyoung Song
f9fe6c11d3 Fix issue in InsetDrawable where master inset attribute get ignored.
Test: builds, and did manual test
b/37752336

Change-Id: I85182a4cf94fa5bcb7c2ac09c701496fb3e72f61
2017-05-04 12:19:35 -07:00
sergeyv
9fd259c9b0 Add StrictMode.noteSlowCall to calls that result in hw bitmap readback
bug:37748500
Test: BitmapTest:*inStrictMode
Change-Id: Ifea1c6f0c50ba2f409c96b7ccf7eb31c89ef81c8
2017-05-03 17:41:33 -07:00
Seigo Nonaka
4fab38f1be Merge "Fix NPE happens if no source was specified to font element." into oc-dev am: b3e92234fa
am: 159f549c8f

Change-Id: Ief83bf6522468ab40d8dd9c3a68ab72892952ea4
2017-05-02 17:44:46 +00:00
Seigo Nonaka
5e0aed49a8 Fix NPE happens if no source was specified to font element.
This also fixes unexpected fallback to the old implemntation by calling
allowUnsupportedFont() which is only for backward compatibility.

This CL also remove getResourceId() method. Nobody uses this method.

Bug: 37865521
Bug: 37844248
Test: am instrument -w -e class android.content.res.cts.ResourcesTest\
      android.content.cts/android.support.test.runner.AndroidJUnitRunner
Change-Id: I987448add728c53c916f24a2ea8f337be417248f
2017-05-01 23:23:50 -07:00
Hyunyoung Song
d6afaa8563 Merge "Add @TestApi annotation to AdaptiveIconDrawable" into oc-dev am: 1e8f451bbf
am: 090109cb19

Change-Id: I688ef5dd83d10529e8669dfb9e5ea818e0fdc348
2017-05-01 23:40:10 +00:00
TreeHugger Robot
1e8f451bbf Merge "Add @TestApi annotation to AdaptiveIconDrawable" into oc-dev 2017-05-01 23:18:41 +00:00
Jeff Sharkey
15971f8328 Merge "Remove FontVariationAxis.InvalidFormatException." into oc-dev am: 408ec0b463
am: 11188aee8a

Change-Id: I49be72bd46caf9d3a9e71fb68326ade9ffd5826f
2017-04-29 16:53:35 +00:00
Hyunyoung Song
d2afdab226 Add @TestApi annotation to AdaptiveIconDrawable
Bug: 37779858
Bug: 37788590

Test: $ make -j31
Test: $ make update-api -j31

Change-Id: I459317e8b9f6db227a4bb567c17b212639454e9d
2017-04-28 15:40:50 -07:00
Seigo Nonaka
0f07dd5b14 Remove FontVariationAxis.InvalidFormatException.
Use IllegalArgumentException instead.

Bug: 37769084
Bug: 37765945
Test: am instrument -w -e class android.widget.cts.TextViewTest
      android.widget.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.TypefaceTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.PaintTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.graphics.cts.FontVariationAxisTest
      android.graphics.cts/android.support.test.runner.AndroidJUnitRunner
Test: am instrument -w -e class android.text.VariationParserTest
      com.android.frameworks.coretests/\
      android.support.test.runner.AndroidJUnitRunner

Change-Id: I50b70e3e7e37585c937dcce2416a83353de62a5d
2017-04-28 15:24:40 -07:00
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