Commit Graph

8725 Commits

Author SHA1 Message Date
Chris Craik
6e84287277 Merge "Fix include" into oc-dev am: 7e44951bb7
am: 4554fa6b7c

Change-Id: I44871c8098ffc01ca86dd8c16657cacaf26be3b3
2017-04-26 01:04:02 +00:00
Chris Craik
4554fa6b7c Merge "Fix include" into oc-dev
am: 7e44951bb7

Change-Id: I6e7ec68d95dc12fa3d87a0e366cf924a4dba32bc
2017-04-25 23:39:39 +00:00
TreeHugger Robot
7e44951bb7 Merge "Fix include" into oc-dev 2017-04-25 23:32:11 +00:00
Chris Craik
66c3a829dc Fix include
Bug: 35387665
Test: builds with HWUI_ENABLE_OPENGL_VALIDATION := false

Dependency on gl3.h was added while that header was auto-included for
error checking purposes. Add the include to enable us to disable gl
error checking.

Change-Id: Ic969da716e2323f8e42d20da8fd0a6fa653f9775
2017-04-25 13:42:53 -07:00
Greg Daniel
53a354365b Use new GrVkBackendContext::Create api
Test: manual testing

Change-Id: Ia8daebd2e028082a8b3d58f29057648746398735
2017-04-25 13:44:51 -04:00
TreeHugger Robot
6205e158f3 Merge "Create helper script to parse systrace files" 2017-04-21 14:09:24 +00:00
Colin Cross
8cf0d0d2b0 Convert libinputservice to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
(cherry picked from commit 3fc8f2df30)
2017-04-20 18:31:02 +00:00
Stan Iliev
2ccaec63ff Create helper script to parse systrace files
Create a script that can parse systrace files and calculates
metrics. The example metrics are average DrawFrame and average
time to record a View.

Test: ran the script and compared outputs with numbers visible,
when systrace file is opened in a browser.

Change-Id: If37322e7838e177efb3e2e4a00cb6e97755aa453
2017-04-20 10:08:11 -04:00
Matt Sarett
31e44d8e92 Merge "Add unit test for Skia path behavior" into oc-dev am: dc3ab163d3
am: 515222acd2

Change-Id: I214885c57e77ffd8a991478c96fb70582ce43e6c
2017-04-20 12:37:24 +00:00
Colin Cross
3fc8f2df30 Convert libinputservice to Android.bp
See build/soong/README.md for more information.

Test: m -j checkbuild
Change-Id: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
2017-04-19 17:39:21 -07:00
Matt Sarett
e07a91a8db Add unit test for Skia path behavior
Test: This is a test.
Bug: 35369941

Change-Id: Iaf21d3a903702f81a20e08e8b50b782f311ce7f3
2017-04-19 12:38:30 +00:00
TreeHugger Robot
6954897620 Merge "bitmaps and pixelrefs no longer need lock/unlock" 2017-04-18 18:35:20 +00:00
Derek Sollenberger
0bbc82cba1 Merge "Remove round rect clipping optimization." into oc-dev am: 190fe086df
am: c421f748a9

Change-Id: I6fe0b0eabb2ad17a7dd6df8c695029f36f8b3cd6
2017-04-18 16:29:39 +00:00
Derek Sollenberger
190fe086df Merge "Remove round rect clipping optimization." into oc-dev 2017-04-18 16:06:41 +00:00
Mike Reed
7c0ae0f58b bitmaps and pixelrefs no longer need lock/unlock
Test: covered by CtsGraphicsTestCases and hwui_unit_tests

Change-Id: I42a25961a2eb3755d2fd22a617aa21a24ec0994f
2017-04-18 10:22:42 -04:00
Chris Craik
2a8ec1014b Merge "Disable crashing drop shadow tests" into oc-dev am: 9d67b50308
am: 9c66ae77a0

Change-Id: I2bc2fdd8c6921dda826b35244fe880e8301b11a2
2017-04-18 02:01:41 +00:00
Chris Craik
c84824942d Disable crashing drop shadow tests
Bug: 36272398
Test: HWUI unit tests now run without crashing

Change-Id: I2877ed184640e5043d33b10605db71dde501fd2a
2017-04-17 13:58:22 -07:00
Romain Guy
6be819522d resolve merge conflicts of 2439e19d41 to master
Test: built locally
Change-Id: Idc922c7fa3306e6884b88c79e73f5375d8e65888
2017-04-17 12:31:09 -07:00
Derek Sollenberger
f7d98f436c Remove round rect clipping optimization.
This optimization fails to account for inverse fill.

Test: bit CtsGraphicsTestCases.CanvasTest
Bug: 37417782
Change-Id: I04adfa93542b1bd1f5d905c64bb40e521242e29d
2017-04-17 18:05:42 +00:00
TreeHugger Robot
71483a891a Merge "use sk_sp to manage colortables" 2017-04-17 17:11:33 +00:00
Romain Guy
5545518123 Properly decode colors spaces in BitmapRegionDecoder
Reusing a bitmap with BitmapRegionDecoder would preserve the
previous color space. This change also tweaks color space
matching to make sure we pick Display P3 with parameter d=0.039
or d=0.04045

Bug: 36905374
Test: CtsGraphicsTestCases
Change-Id: I4d2d66e5babebb0b5ce5cbdc7e8244177b4b7f9c
2017-04-15 21:41:22 -07:00
Matt Sarett
00ce770070 Merge "Bug fix: use legacy SkCanvas regardless of color space tag" into oc-dev am: 101dc265a8
am: 7e92ac449b

Change-Id: Ic50bd5fe0358390024bdb9a34e14906dba669f25
2017-04-14 19:02:54 +00:00
Seigo Nonaka
24c6464663 Merge "Use provided style for fallback font selection" into oc-dev am: 43112fd26e
am: 83c52e0a40

Change-Id: Ia42f6a377c2617c8da9a84cb8bd7781326e464a1
2017-04-14 18:09:55 +00:00
Matt Sarett
ca9b703b88 Bug fix: use legacy SkCanvas regardless of color space tag
Test: Added unit test. CtsGraphicsModule.

Bug: 32984164

Change-Id: If72e1e31c98e01f97f3a05d763f5d4c71cf88313
2017-04-14 16:26:50 +00:00
Jim Van Verth
99effcccbc Merge "Add uncached and perspective shadows to Skia renderer" into oc-dev am: 1be9766a68
am: c7fd8db8a6

Change-Id: If7f3bfc01496a9fe9b198dc63bd7c064943c9008
2017-04-14 16:03:13 +00:00
Seigo Nonaka
659c9cfac3 Merge "Introduce setFallbackTypeface" into oc-dev am: 729a515e5e
am: 17452ee553

Change-Id: I66fe816727aae3fdf617c41796b25478090704fe
2017-04-14 15:31:25 +00:00
Seigo Nonaka
d154829cb1 Use provided style for fallback font selection
If the developer gives some weight/italic to the Typeface.Builder
the fallback used the metadata in the font file. We should use
provided data instead.

This CL also adjusts upper and lower limits on weight, from 100..900 to
1..1000

Bug: 37257745
Bug: 37251569
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I7cf390d96b49afcce359928373698b0c9a9babd8
2017-04-14 00:54:46 +00:00
Jim Van Verth
1be9766a68 Merge "Add uncached and perspective shadows to Skia renderer" into oc-dev 2017-04-13 20:01:47 +00:00
TreeHugger Robot
5690917679 Merge "Add SkiaCanvas::captureCanvasState()" 2017-04-13 19:54:11 +00:00
Mike Reed
0a8fb522eb use sk_sp to manage colortables
The goal is to eliminate the times we have to manually save ref or
unref.

Test: hwui_unit_tests and CtsGraphicsTestCases pass

Change-Id: I69273acc18d3f3beea60625a37bf007907ff05e9
2017-04-13 15:40:20 -04:00
TreeHugger Robot
729a515e5e Merge "Introduce setFallbackTypeface" into oc-dev 2017-04-13 19:21:25 +00:00
Matt Sarett
d0814db633 Add SkiaCanvas::captureCanvasState()
Test: Verified bug is fixed.  Wrote unit test.

Bug: 37268771

Change-Id: I9deb7db353cd2129ad245e7f65419670463bb717
2017-04-13 14:23:38 -04:00
TreeHugger Robot
4085d2cd80 Merge "lockPixels is no longer virtual" 2017-04-13 17:52:12 +00:00
Seigo Nonaka
5b6347a6af Introduce setFallbackTypeface
setFallbackTypeface is returned by Builder.build() method when the
provided font is not loaded due to some reasons.
The fallback family is resolved with width/italic passed to Builder.

Bug: 36794225
Test: android.graphics.cts.TypefaceTest passes
Change-Id: I65e220aca823fd815a52437b11c8e6dc952de8e2
2017-04-13 10:12:27 -07:00
Matt Sarett
44dc270830 Add SkiaCanvas::captureCanvasState()
Test: Verified bug is fixed.  Wrote unit test.

Bug: 37268771

Change-Id: I9deb7db353cd2129ad245e7f65419670463bb717
2017-04-13 11:11:11 -04:00
Jim Van Verth
5745a0a37f Add uncached and perspective shadows to Skia renderer
Test: manual - looked at FrameworkShadow app

Bug: 37300468
Change-Id: I72d820479141db2d83363747d9f76abbaca70d98
2017-04-13 13:15:12 +00:00
Derek Sollenberger
86a1c30a11 Merge "Change behavior of setBitmap to cleanly reset the canvas" into oc-dev am: 7944962b7e
am: 43844db75d

Change-Id: I8e362993a2fc51ce93015924d4819884301aa0c1
2017-04-12 17:59:18 +00:00
Mike Reed
2cb0826d2e lockPixels is no longer virtual
See skbug.com/6481

With pixelrefs now always (logically) locked, we no longer override
onNewLockPixels/onUnlockPixels. We also must now pass our
address/rowBytes to the base constructor.

These changes allow us to remove duplicate fields in the hwui Bitmap
subclass -- mRowBytes and mColorTable, since these fields are now always
available from the base-class.

However, since this subclass still wants to overwrite const fields in
the base-class (its reconfigure api), change the impl to use the newly
added private method (android_only_reset) to encapsulate this.

Test: hwui_unit_tests and CtsGraphicsTestCases pass

Change-Id: I57a3af1135580513b708f35549a6defb7ac6c04e
2017-04-12 11:52:22 -04:00
Derek Sollenberger
eb69cbbe22 Change behavior of setBitmap to cleanly reset the canvas
- identity matrix
 - no save stack
 - wide-open clip

This reverts commit 4f641d1e45

Test: bit CtsGraphicsTestCases:.CanvasTest
Bug: 36218535
Change-Id: Id11deb06e37d6df61f1f171d424ab150d812a7a8
2017-04-11 14:00:25 -04:00
Mike Reed
63df65dfe2 mark mPixelStorageType const
This is a natural consequence of the fact that we always call
setPreLocked from the constructor. Future Skia will remove the virtual
for lockPixels (onNewLockPixels), but that is compatible with this
subclass since does not change its pixel-addr or pixel-type after the
constructor.

See skbug.com/6481 for more details

Test: existing tests apply, no behavior change

Change-Id: I0f9d3efc9a05b71907480eaaadbc7fafe9dd491b
2017-04-10 17:46:03 +00:00
Romain Guy
0246a298f9 Merge "Color management, the missing pieces" into oc-dev am: 7dfa16c2ef
am: 3eafcb2d8b

Change-Id: I079d8d17982eecc022f2a53e1e6ca193dc7a3ace
2017-04-07 18:48:57 +00:00
Romain Guy
8242656f49 Color management, the missing pieces
Implement missing color management pieces for bitmaps:

- Bitmap.createBitmap(Bitmap src, ...) now creates a bitmap
  in the same color space as the source bitmap
- Bitmap.createScaledBitmap() now creates a bitmap in the
  same color space as the source bitmap
- Bitmap.createBitmap(..., ColorSpace colorSpace) to create
  bitmaps in a specific color space
- Fix copy from A8 to F16
- Copying bitmaps in F16 or with a color space does not work,
  it's currently a limitation in Skia

Bug: 36905374
Test: BitmapColorSpaceTest
Change-Id: I0092fe4432511db50daa3a9393389a9db05e0c2a
2017-04-07 07:56:14 -07:00
Romain Guy
ef6c9b1d8b Merge changes I6f00614d,I987eeab2 into oc-dev am: c273784c91
am: 3b447f6ed7

Change-Id: Ia6c35dd4a3fff3c300cb8c390d9628481605928a
2017-04-06 22:46:04 +00:00
Matt Sarett
7c9fb6076e Merge "Xform bitmaps to sRGB on SW and PDF canvases" into oc-dev am: c29dffed16
am: fd5d5425ee

Change-Id: If960ccd900ebc2b841c2f13ca4f25820a48a950f
2017-04-06 22:16:49 +00:00
TreeHugger Robot
c273784c91 Merge changes I6f00614d,I987eeab2 into oc-dev
* changes:
  Convert 16 bit bitmaps to 8 bit on devices that do not have GLES3.0
  Fix HardwareBitmapTests.testBitmapConfigFromRGB565
2017-04-06 21:21:59 +00:00
Romain Guy
89de234c72 Convert 16 bit bitmaps to 8 bit on devices that do not have GLES3.0
Bug: 37077308
Test: CtsUiRenderingTests (ran to manually emulate 2.0 devices)
Change-Id: I6f00614d79797835adcfe4716bd331573e1463e3
2017-04-06 12:24:29 -07:00
Romain Guy
7c98f5da3d Fix HardwareBitmapTests.testBitmapConfigFromRGB565
Bug: 37077304
Test: HardwareBitmapTests.testBitmapConfigFromRGB565
Change-Id: I987eeab243f93f9ee8fe8d1b6a12ddbd23225651
2017-04-06 11:00:21 -07:00
Matt Sarett
ea70d22dc8 Xform bitmaps to sRGB on SW and PDF canvases
For picture-backed canvases, we will defer the xform
until playback.

Test: Unit tests and cts test.
Bug: 32984164
Change-Id: Ib74663bcb688b74b6ba8792b403b0475126732af
2017-04-06 15:14:00 +00:00
Mike Reed
d20f2c2d02 use new api for passing colortable to allocPixels
Test: Bitmap:colorTableRefCounting still passes

Change-Id: I5f20a55a98f5766da7c4a490c9be56f9140024c3
2017-04-05 17:39:25 -04:00
Mike Reed
826deefda5 switch over to SkVertices object, and stop using deprecated methods.
This allows Skia to remove
  SK_SUPPORT_LEGACY_CANVAS_VERTICES
  SK_SUPPORT_LEGACY_BITMAP_SETPIXELREF
  SK_SUPPORT_LEGACY_PIXELREFFACTORY

Test: Existing CTS cover these changes

Running CtsGraphicsTestCases, there were 6 failures w/ and w/o this CL.
None of the 6 seems related to this CL.

Change-Id: I724082357d9f6cb699770df3c0b9ef555b957697
2017-04-05 14:20:38 +00:00