Age | Commit message (Collapse) | Author |
|
... to give SwiftShader some more time to complete.
Bug: b/354222246
Test: CtsUiRenderingTestCases x100
Change-Id: I943249a84daa873508bddcfc532048ef71eb4129
|
|
Follow-up to http://review.skia.org/687639
Change-Id: I37ed05e68fa8d8edcad55e7700aca67e371f512d
|
|
Will need to land after
https://skia-review.googlesource.com/c/skia/+/648297
lands and rolls
Change-Id: Ie2ecb8f74dd52fcdd35e7cf9c311e8ed94781a07
Bug: skbug.com/13983
|
|
Follow-up from https://skia-review.googlesource.com/c/skia/+/621977
Change-Id: I2a381a325c5c0c50f0d27e9d06210bb6be878919
Bug: skbug.com/13983
|
|
* Hookup tonemap support for PixelCopying a SurfaceView
* Fix issue in PixelCopying a SurfaceView where the wrong dataspace was
retrieved from the last queued buffer, since the bufferqueue dataspace
may drift due to another process like camera setting the dataspace
without being propagated to the app process
* Cleanup LayerDrawable to share code
Bug: 238395777
Test: Switching HDR cameras doesn't color shift
Test: TextureView playback in Photos
Change-Id: I0fd1bd86410630acfbb7de72339874a3d0ecac58
|
|
Also make it actually async, and allow the bitmap
to be auto-allocated
Bug: 195673633
Test: PixelCopyTest CTS suite
Change-Id: Ie872f20c809eaaeb8dc32f3ec6347f21a9a7bc1a
|
|
178f91656b am: 031b2963f1 am: ab99d914c5 am: 4ee48e14af am: 79f7066a46
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2144501
Change-Id: I4ea6a13d0205b8c6d9f46ea74c7776584bcd5dcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
178f91656b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2144501
Change-Id: I3c69c59a9124d407562b7e9fddb78a9d4b1300ec
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
|
|
Chroma channels of YUV420 images are subsampled we may need to shrink
the crop region by a whole texel on each side. Since skia still adds
its own 0.5 inset, we apply an additional 0.5 inset. See
GLConsumer::computeTransformMatrix for details.
Bug: 204725913
Test: android.media.cts.DecodeAccuracyTest
Test: android.view.cts.PixelCopyTest
Change-Id: I38bd3d1e5f4c62fff3dd0374c3f2500f1a2d90b9
|
|
In https://skia-review.googlesource.com/c/skia/+/512416,
we would like to decouple SkImage and SkImageEncoder. This CL
was created by searching for use of these objects:
- SkEncodedImageFormat
- SkStream
- SkData
- SkBitmap
- SkPixmap
and making sure those files followed the Include What You Use
(IWYU) guidelines.
Signed-off-by: Kevin Lubick <kjlubick@google.com>
Change-Id: I8edbcd1c9a526b8084d7e2c023895d1ad2f8c9b1
|
|
may fail when video is cropped."" am: fbc849e9d8 am: 423a67e7aa am: 611cfb5d99 am: c736d8d0d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1959133
Change-Id: I31e6dcc0f08c151de7ee6df1ce914e22db5cf682
|
|
may fail when video is cropped.""
|
|
fail when video is cropped."
This reverts commit b48d4d10abfd1af41d8226939f12b6af5e243dff.
Reason for revert: the original CL caused regression on many devices.
Bug: 206079174
Bug: 207083066
Bug: 192912975
Bug: 208373431
Bug: 209522191
Bug: 208140353
Bug: 208741105
Bug: 211528580
Bug: 211837929
Bug: 211566842
Change-Id: I65206c683f1f067365a4993fa8d2dbd3cffc17cb
|
|
fail when video is cropped. When we use GPU to copy the data, rendering would choose filter. But we need add shrink in border to ensure the sampler not reach border like what GUI does." am: 06e16941d5 am: 44bfae1759 am: b0838b910c am: ab55cd0ae8 am: 9a38d4f4d4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1801770
Change-Id: I598a9da169a6157bf6bb69a546a445cd9f6de626
|
|
fail when video is cropped. When we use GPU to copy the data, rendering would choose filter. But we need add shrink in border to ensure the sampler not reach border like what GUI does." am: 06e16941d5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1801770
Change-Id: I1e34d4b25af83a4761e7a2fc81bf5b79d7b2aa08
|
|
video is cropped.
When we use GPU to copy the data, rendering would choose filter. But we need add shrink in border to ensure the sampler not reach border like what GUI does.
Change-Id: I2c59956f3d7a7052d8e4bee587360f252a6c5549
Signed-off-by: Chun Jiang <chun.jiang@mediatek.com>
Bug: 197180327
Test: CTS PixelCopyTests & DecodeAccuracyTest
|
|
BUG=152621633
Test: Verified manually and with
atest TextureViewCameraTest
atest TextureViewTest
atest TextureViewSnapshotTest
atest TextureViewStressTest
atest PixelCopyTest
atest BitmapTest
atest HardwareBitmapTests
Change-Id: Ie993a18fd3511576617a1eb859bf228c33d12f78
|
|
Revert "Adds out parameters for crop rectangle and transform"
Revert "Add test to crop TextureView and verify if outer edge ha..."
Revert submission 15339442-1texelcrop
Reason for revert: Bisection identified these CLs as the likely cause of Droidfood blocking bugs b/195620803 and b/195637414
Bug: 195637414
Bug: 195620803
Reverted Changes:
If1f448a94:Added crop rect to LayerDrawable to not crop Textu...
Iefde6bdf7:Add test to crop TextureView and verify if outer e...
Icf0ee20e8:Adds out parameters for crop rectangle and transfo...
Change-Id: I3448ebe193f25de79d186ae705911d99da2cef2b
|
|
Verified manually with ExoPlayer that TextureView isn't cropping.
Test: Did the manual test and
atest TextureViewCameraTest
atest TextureViewSnapshotTest
atest TextureViewStressTest
atest TextureViewTest
atest PixelCopyTest
atest BitmapTest
atest HardwareBitmapTests
and with HwAccelerationTest
Added crop test at ag/15430851
BUG=152621633
Change-Id: If1f448a94908cbf51272bc0d1bbbe1e113fd15f3
|
|
The region outside of the BQ crop rect is potentially
garbage. Avoid sampling from it.
Fixes: 189656466
Bug: 193378020
Test: CTS PixelCopyTests & DecodeAccuracyTest
Change-Id: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
Merged-In: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
|
|
The region outside of the BQ crop rect is potentially
garbage. Avoid sampling from it.
Fixes: 189656466
Test: CTS PixelCopyTests & DecodeAccuracyTest
Change-Id: I2910d93471f08aaf807ac9f87fdf84cf29cf4143
|
|
* Fixes hardware bitmap capture
* Fixes mutable bitmap capture (no flickering)
* Adds basic single-frame LRU cache to avoid
repeated readbacks of GPU resources
* Does up-front readback of GPU resources
* Moves serialization off RenderThread again thanks
to up-front readback avoiding needing GPU access
off-thread
* Reduces RAM usage & improves performance by serializing
directly to output stream instead of first copying to
a byte[]
Bug: 174223722
Test: PictureCaptureDemo mirrors the content
Change-Id: If7ec208b61d5b917e82087cc312880fc5a38c943
|
|
Change Surface to return the original crop rect + transform int instead
of a matrix in GL's bottom-left origin in 0..1 space. This avoids doing
an extreme amount of matrix pulling apart to try and guess at the inputs
and map rects around to make it maybe work sometimes along with avoiding
the need to convert that matrix into skia's top-left non-unit space.
This also opens the door to avoiding the 1 texel crop problem if
ASurfaceTexture is similarly adjusted to return the crop+transform
instead of a float[16] matrix as we are using a proper srcRect to
sample from instead of purely done via matrix manipulation. This CL
continues to pass kFast_SrcRectConstraint so we don't actually
benefit but it at least COULD.
Fixes: 183553027
Test: atest android.view.cts.PixelCopyTest (+new testBufferQueueCrop)
Change-Id: I5f638153baed7f67dc43fe9ecb4587f579222b5d
Merged-In: I5f638153baed7f67dc43fe9ecb4587f579222b5d
|
|
Test: It makes
Bug: 183120308
Change-Id: I331262dd2da59817031f0c708f4c102041dcb5e0
|
|
Change Surface to return the original crop rect + transform int instead
of a matrix in GL's bottom-left origin in 0..1 space. This avoids doing
an extreme amount of matrix pulling apart to try and guess at the inputs
and map rects around to make it maybe work sometimes along with avoiding
the need to convert that matrix into skia's top-left non-unit space.
This also opens the door to avoiding the 1 texel crop problem if
ASurfaceTexture is similarly adjusted to return the crop+transform
instead of a float[16] matrix as we are using a proper srcRect to
sample from instead of purely done via matrix manipulation. This CL
continues to pass kFast_SrcRectConstraint so we don't actually
benefit but it at least COULD.
Fixes: 183553027
Test: atest android.view.cts.PixelCopyTest (+new testBufferQueueCrop)
Change-Id: I5f638153baed7f67dc43fe9ecb4587f579222b5d
|
|
Bug: 183203135
Test: CtsUiRenderingTestCases w/ SwiftShader
Change-Id: Ib61902d0e6cea691367bf1d9a4a0877ca0e60a91
|
|
This is part of an effort to distinguish between different types of
contexts in GPU Skia. When using a DeferredDisplayList (DDL)
recorder, the context you get is not a direct context and cannot
be used for operations like uploading or reading textures.
Since Android does not use DDLs, it is not directly affected by this
change but other APIs, such as SkImage::MakeFromTexture are
being migrated to require a GrDirectContext to increase sanity.
Change-Id: I9afbdf3c026a9f9cb6ad2aad904915e189e584d6
|
|
rvc-dev am: ee45de3115 am: 59f97c80a7 am: 2aca970fe9 am: ae8a59f7fc
Change-Id: I90e1f657ef52870299f57005a0165b488a71be6f
|
|
The check used in Readback.cpp did not take the transformation
matrix into account for judging whether the copy was scaling.
libs/hwui/pipeline/skia/LayerDrawable.cpp already incorporates
the logic to detect non-scaling copy, so we can just let it
check the condition. This version regards 90-degree rotation
without size change as non-scaling and disables filters.
Bug: 151126720
Bug: 150839078
Test: atest android.view.cts.PixelCopyTest
Change-Id: I69e987e6a2e48299c5e579f8c218c42a724dc606
|
|
Bug: 136263238
Test: builds
Test: interact with device
Change-Id: I18540f78a4ee5ffcc30c96ff7862480e1d8fe50a
|
|
Bug: 137012798
Test: builds
Change-Id: Ic33a21a73b0579726f47c53cc102fb91b5ead0d6
|
|
Test: traced opening recents
Change-Id: I51675f1c49f27f1bfa5b18e3d3dd7162e58b1cb8
|
|
|
|
Replace it with a newer, fancier, WorkQueue-inspired
one that's just a global common thread pool.
Test: hwuiunit passes
Change-Id: Ib5d03104a08bbac9a4ec67a1bfc0db2b35d6700f
|
|
Change-Id: Ib4be68d9ab491fbb4eefc6103096823f9f72a7aa
Test: Just deleting unused include. Code still builds.
|
|
This CL allows for more than one VulkanManager to exist.
VulkanManager ctor are public allowing for classes other
than RenderThread to instantiate it.
Secondary VulkanManager can be used to render on a thread
other than RT.
Test: Ran HWUI unit tests and several apps
Change-Id: Ibfd76c86ff67e01617a500902bba7431b928f5c0
|
|
When attempting to read back a buffer from the GPU, Skia will perform a
y-flip of the buffer in CPU memory if the buffer does not have a
top-left origin.
Test: CtsUiRenderingTestCases
Bug: 119366261
Change-Id: I93ec93cc31209cbdd9b886b0d1020fda3aac646e
|
|
Also for a canvas wrapping a bitmap the colorspace of the bitmap
will be used to correctly blend content.
Test: CtsUiRenderingTestCases
Bug: 111436479
Change-Id: I63ad7a30605a7f725cc0ef4716d42ea978fb03e3
|
|
Implement readback from Surface, TextureView and HW Bitmap
for Vulkan pipeline by wrapping the graphics buffer in an SkImage.
Refactor both Vulkan and GL readback to use common code.
TextureView readback is moved from IRenderPipeline interface to
Readback class. Refactor all 3 readback flows to use common
implementation.
Test: Passed all view, uirendering and graphics CTS tests with GL
Test: Passed many CTS test with Vulkan, that require readback
Bug: 113673613
Change-Id: Ifbfd8170a5401f87a709b4b1b9fa058e8e11768d
|
|
Test: CTS TextureViewTests and UIRendering
Change-Id: I2969c8f5a975bfd9aebcbb585c64d1fcbb2487c2
|
|
Test: refactoring cl.
bug:32413624
Change-Id: I94b1c31cd4e0712dfcfd7777a0012424c1bf0dca
|
|
NOTE: Linear blending is currently disabled in this CL as the
feature is still a work in progress
Android currently performs all blending (any kind of linear math
on colors really) on gamma-encoded colors. Since Android assumes
that the default color space is sRGB, all bitmaps and colors
are encoded with the sRGB Opto-Electronic Conversion Function
(OECF, which can be approximated with a power function). Since
the power curve is not linear, our linear math is incorrect.
The result is that we generate colors that tend to be too dark;
this affects blending but also anti-aliasing, gradients, blurs,
etc.
The solution is to convert gamma-encoded colors back to linear
space before doing any math on them, using the sRGB Electo-Optical
Conversion Function (EOCF). This is achieved in different
ways in different parts of the pipeline:
- Using hardware conversions when sampling from OpenGL textures
or writing into OpenGL frame buffers
- Using software conversion functions, to translate app-supplied
colors to and from sRGB
- Using Skia's color spaces
Any type of processing on colors must roughly ollow these steps:
[sRGB input]->EOCF->[linear data]->[processing]->OECF->[sRGB output]
For the sRGB color space, the conversion functions are defined as
follows:
OECF(linear) :=
linear <= 0.0031308 ? linear * 12.92 : (pow(linear, 1/2.4) * 1.055) - 0.055
EOCF(srgb) :=
srgb <= 0.04045 ? srgb / 12.92 : pow((srgb + 0.055) / 1.055, 2.4)
The EOCF is simply the reciprocal of the OECF.
While it is highly recommended to use the exact sRGB conversion
functions everywhere possible, it is sometimes useful or beneficial
to rely on approximations:
- pow(x,2.2) and pow(x,1/2.2)
- x^2 and sqrt(x)
The latter is particularly useful in fragment shaders (for instance
to apply dithering in sRGB space), especially if the sqrt() can be
replaced with an inversesqrt().
Here is a fairly exhaustive list of modifications implemented
in this CL:
- Set TARGET_ENABLE_LINEAR_BLENDING := false in BoardConfig.mk
to disable linear blending. This is only for GLES 2.0 GPUs
with no hardware sRGB support. This flag is currently assumed
to be false (see note above)
- sRGB writes are disabled when entering a functor (WebView).
This will need to be fixed at some point
- Skia bitmaps are created with the sRGB color space
- Bitmaps using a 565 config are expanded to 888
- Linear blending is disabled when entering a functor
- External textures are not properly sampled (see below)
- Gradients are interpolated in linear space
- Texture-based dithering was replaced with analytical dithering
- Dithering is done in the quantization color space, which is
why we must do EOCF(OECF(color)+dither)
- Text is now gamma corrected differently depending on the luminance
of the source pixel. The asumption is that a bright pixel will be
blended on a dark background and the other way around. The source
alpha is gamma corrected to thicken dark on bright and thin
bright on dark to match the intended design of fonts. This also
matches the behavior of popular design/drawing applications
- Removed the asset atlas. It did not contain anything useful and
could not be sampled in sRGB without a yet-to-be-defined GL
extension
- The last column of color matrices is converted to linear space
because its value are added to linear colors
Missing features:
- Resource qualifier?
- Regeneration of goldeng images for automated tests
- Handle alpha8/grey8 properly
- Disable sRGB write for layers with external textures
Test: Manual testing while work in progress
Bug: 29940137
Change-Id: I6a07b15ab49b554377cd33a36b6d9971a15e9a0b
|
|
Change-Id: I9bb5209010db6665be4b6f8db81a6fc1b7debc45
|
|
bug: 31247709
Change-Id: Ifb3087a6e76d0d1304f55d13e468bafbd78418da
|
|
Removes last usage of old rendering pipeline.
Change-Id: Ia920dec9cd726ca221e11e888562c7df39a9761e
|
|
Bug: 28428955
Change-Id: I23e2fc9b96a67c7cfda42d9d7319e478194a7fa7
|
|
Bug: 27708453
Change-Id: I81667ce42f9ca1c1a13e1e61299927900845fc84
|
|
Bug: 27708453
Fixes some issues with camera sources. Previously
it was using GL_TEXTURE_2D target which doesn't
work properly if the source is YUV. It is critical
to ensure GL_TEXTURE_EXTERNAL_OES is used throughout
so the right sampler is used.
Change-Id: I0dcd8941ba08331f24809467b0e828663a38e93b
|
|
Bug: 27708453
Change-Id: Ie6fd7eca522d3e6549d8af587c975fd7e6053649
|