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
See build/soong/README.md for more information.
Test: m -j checkbuild
Change-Id: I3cd2bb05ec89c40ebd1240e352a19f99d00dc114
(cherry picked from commit 3fc8f2df30)
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
This optimization fails to account for inverse fill.
Test: bit CtsGraphicsTestCases.CanvasTest
Bug: 37417782
Change-Id: I04adfa93542b1bd1f5d905c64bb40e521242e29d
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
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
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
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
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
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
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
For picture-backed canvases, we will defer the xform
until playback.
Test: Unit tests and cts test.
Bug: 32984164
Change-Id: Ib74663bcb688b74b6ba8792b403b0475126732af
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