Implement the function JPEGImageDecoder::GetGainmapInfoAndData. This
calls into Skia to extract an SkGainmapInfo and the SkData for the
underlying gainmap image. This has several inefficiencies that are
outlined in TODOs (required before this can ship).
As an incidental clean-up, factor NeedsToneMapping out of
GpuImageDecodeCache. This was suggested in a previous patch, and
indeed one of the redundant in-lines of NeedsToneMapping was buggy.
Do some incidental clean-up in cc::PaintImageBuilder's gainmap
handling (also suggested in previous patches).
Fix a bug where PaintImage::GetContentColorUsage would identify
sRGB images that have gainmaps as not being HDR.
Bug: 1404000
Change-Id: Iec7f4a080eedf3083506a04ef1b34d2af7d9bcfb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4430991
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Leon Scroggins <scroggo@google.com>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1132201}
Change ImageData to have two ImageInfos -- one for the main image and
one for the gainmap.
Change DecodedImageData to have two DecodedAuxImageInfos. Add setters
for this to SetLockedData method, and add an AuxImage parameter to do
the data, and image, and pixmaps methods.
Change GpuImageDecodeCache::DecodeImageIfNecessary to decode both
images, and change UploadImageIfNecessary_TransferCache_SoftwareDecode
to insert both images into the transfer cache. Use a default
SkGainmapInfo, because the plumbing for that hasn't been thought
through yet.
Bug: 1404000
Change-Id: I3eae60f5fcba10af8134546377f798fa1d2d0084
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4403965
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1131673}
- kPreferNonCompositedScrolling: This includes
- RuntimeEnabledFeature::PreferNonCompositedScrollingEnabled;
- The element is a scrollable select or input.
Previously main-thread scrolling reasons were not set on the scroll
node for this reason.
It doesn't affect user-visible functionality. It affects metrics
Renderer4.Renderer4.MainThread(Gesture|Wheel)ScrollReason2 by
reporting some scrolls with this reason instead of "No scrolling
layer".
- kBackgroundNeedsRepaintOnScroll: This reason will be actually used
in a followup CL to fix a bug of missing main-thread scrolling
for a composited scroller with background needing repaint on
scroll, causing delayed background refresh during composited
scrolling. It'll be set when
- A scrolling background is painted in the border-box space;
or
- A non-scrolling background is painted in the scrolling contents
space.
This reason sometimes overlaps with (but doesn't equal)
kCantPaintScrollingBackgroundAndLCDText when LCD-text is preferred.
Bug: 1414928
Change-Id: Ieb3b90f7af9feb64f410efe56dc4c8002381222b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4420444
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Philip Rogers <pdr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1130674}
This patch makes anchor-scroll skip main thread commits by:
- Making kAnchorScroll's change type composited-value only, so that
we can abort main thread commits
- Make GeometryMapper also consider anchor-scroll, so that it won't
incorrectly merge layers above and below the anchor-scroll element,
causing incorrect paint order (and hence incorrect overlap)
- Set `transform_changed` flag in cc TransformNode, so that its
damage rect is correctly tracked
Fixed: 1385948
Change-Id: Ic82ee09cc8da57342830aa9f6946eb00f7b9fd16
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4371260
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1130556}
crrev.com/c/4362538 ensured that nop scrolls on the layout viewport do not
trigger scrollend events on the document. It did not explicitly handle
nop scrolls on all scrollers because it assumed that an inner
scroller that can't consume the delta would bubble the scroll up to the
document but in the case of non-auto overscroll-behvior-{x,y} even if
the scroller can't consume the delta the scroll will not bubble up to the
document/its parent.
This patch also updates
scrollend-event-fired-to-element-with-overscroll-behavior.html not to
expect scrollend when there is no scroll but continues to ensure that we
do not bubble a scroll up to the document for non-auto overscroll
behavior.
This test expectedly failed on wpt.fyi and timed out on the trybots (the
timeout was locally reproducible). With this patch, I no longer see the
timeout so I am removing the TestExpectation entry.
The test file could probably use a better name now that it expects that
scrollend is *not* fired but I am not chaning it so it's easier to see
its pass/fail history.
Bug: 1430947
Change-Id: Ie528cd5a001ece6ed54d6163c536e5774b07c39f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4418186
Reviewed-by: Steve Kobes <skobes@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: David Awogbemila <awogbemila@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1130387}
Merge ImageData's size, SkImageInfo and SkYUVAPixmapInfo into a single
ImageInfo structure.
Add the function ImageData::GetDecodedSize to query the ImageInfo's
size (this will be changed to include the total size of all auxiliary
images soon).
Merge DecodedImageData's SkImages and DiscardableMemory into an
DecodedAuxImageData struct. Note that the SkImages in question are
created from SkPixmaps, and are often converted back to SkPixmaps.
Preserve the original SkPixmaps in DecodedAuxImageData to avoid this
round-tripping.
Bug: 1404000
Change-Id: I025bbc3a158ee60d5a0459f34b4113b07bf8001e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402267
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1130187}
This introduces new LayerContext and LayerContextClient abstractions in
cc as well as their corresponding mojom interfaces in Viz. These types
sit between a client-side LayerTreeHost and a corresponding
LayerTreeHostImpl which may reside in another process. They will be used
to experiment with GPU-side layer trees.
This CL only introduces minimal boilerplate and plumbing for a client to
construct a new client-side VizLayerContext over an established
CompositorFrameSink endpoint, to control a GPU-side LayerTreeHost owned
by that sink within Viz.
Test coverage and actual frame production from a LayerContext are done
in a follow-up CL.
Bug: 1431762
Change-Id: I86e9150aa034fe77300036816c8e2c5ae3999c55
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4418567
Reviewed-by: Alexander Cooper <alcooper@chromium.org>
Auto-Submit: Ken Rockot <rockot@google.com>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Will Harris <wfh@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1130132}
This class will be used in the GPU process as well as in Blink. Since it
was primarily intended for raster work, and since both Blink and GPU
already depend on //cc, //cc/raster should be a good home for this.
Details of what's changed beyond file and build target moves:
- Namespace change
- Relevant switch moved from Blink to //cc/base
- New Delegate interface to inject Blink-specific behavior
- Minor IWYU fixes
Bug: 1431506
Change-Id: If54561c14c6fa300ba90cb7616605f37e02e45a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4409316
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Avi Drissman <avi@chromium.org>
Code-Coverage: Findit <findit-for-me@appspot.gserviceaccount.com>
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Reviewed-by: David Bokan <bokan@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Cr-Commit-Position: refs/heads/main@{#1129966}
This reverts commit 448b49d42a.
The crash still happened after the revert.
Original change's description:
> Revert "[ScrollUnif.] Distinguish kFailedHitTest and kNonFastScrollableRegion"
>
> This reverts commit b47f4549d7.
>
> Reason for revert: Speculative revert for crbug.com/1428374.
>
> Original change's description:
> > [ScrollUnif.] Distinguish kFailedHitTest and kNonFastScrollableRegion
> >
> > Previously in ScrollUnification all main thread hit tests were
> > reported as kFailedHitTest, including hit tests on non-fast scrollable
> > region (reported as kNonFastScrollableRegion in legacy scroll) and
> > non-reliable compositor hit tests (reported as kFailedHitTest in
> > legacy scroll). We want to reduce non-reliable compositor hit tests
> > by letting blink provide more accurate hit test data. This CL makes
> > it possible to measure the result.
> >
> > Bug: 1413877
> > Change-Id: Iaf00021535d167a1fe8ce1d32df156c0d76c2d34
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4363371
> > Reviewed-by: Scott Violet <sky@chromium.org>
> > Reviewed-by: Steve Kobes <skobes@chromium.org>
> > Reviewed-by: Philip Rogers <pdr@chromium.org>
> > Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1121925}
>
> Bug: 1413877, 1428374
> Change-Id: If9c935bb98a6802312fe4ee901bb6e9ced164b8f
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4407898
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Owners-Override: Xianzhu Wang <wangxianzhu@chromium.org>
> Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org>
> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1127818}
Bug: 1413877, 1428374
Change-Id: Ia92b21fb643a6a51ba1c985cde0e17f7d4347ceb
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4420272
Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org>
Owners-Override: Xianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Cr-Commit-Position: refs/heads/main@{#1129563}
- Remove old reasons:
- kRoot: It was not used in paint properties or debug info. The only
purpose was to prefer compositing to lcd text for scrollers.
- k(Opacity|Mask|Filter|Blending)WithCompositedDescendants: They
were meaningful in pre-CompositeAfterPaint only, but were used
in cc::Layer debug info for composited layers that can't merge
into others because of transform compositing boundaries. Now
PaintArtifactCompositor::UpdateDebugInfo() checks transform
compositing boundaries for transforms, clip's transform spaces
and effect's transform spaces.
- Generate short names of compositing reasons automatically.
- The original static_assert checking consistency of
kCompositingReasonsStringMap and compositing reasons didn't work
due to an extra '\`. Fix and update the map (now containing
descriptions only).
- Add more compositing reasons for composited layers containing
special contents, for debugging.
Change-Id: Ie412567f32836d51fb4a7b5f482c2c60c1e3f997
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4416080
Reviewed-by: Philip Rogers <pdr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1129560}
This mostly moves from comments and runtime checks to static
annotations. Missing locks are added, in testing getters, and in
OnMemoryDump(), which is triggered in production code.
Change-Id: I2572b909954a2a9440597b71b0cef3835031efe4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4406045
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1129211}
Rename cc/viz pixel test enums from kSkiaDawn to kSkiaGraphite - note
that Graphite will run with Dawn by default in Chromium. Also remove
exceptions which were previously present for Ganesh Dawn since those
are likely not relevant any more since Graphite is completely different
from Ganesh and Dawn has also matured quite a bit since when the
exceptions were added. We'll add new exceptions for Graphite as needed.
Bug: 1429361
Change-Id: I6676aa681e5ada2275ced3bdcfd1e8e5fd72250c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4404857
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1128770}
For GpuImageDecodeCache, OnMemoryPressure() clears the cache, but this
only adds transfer cache IDs for deletion, without actually flushing the
queue. This CL fixes that, by unifying the code with ReduceCacheUsage()
which runs the enqueued operations when possible.
Bug: 1410541
Change-Id: I039234d965690e17dfc09a079884b0de22936a10
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4406049
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1128654}
1. Add build and feature flags for Graphite, both disabled by default.
2. Add skia_use_metal buildflag for guarding metal code. This flag is
only enabled with Graphite on developer builds.
3. Add SkiaGraphiteBackend to GpuPreferences, and parse its value from
feature and command line flags. Also add a kNone option for Ganesh
GrContextType for when Graphite is enabled.
4. Cleanup Chromium Skia BUILD.gn - more consistency between the config
and sources in how we use conditionals. Ensure dawn and metal code is
only built when Graphite is used, and other miscellaneous cleanup.
5. Remove Ganesh Dawn from Chromium including in blink over WebGPU
command buffer, so both Dawn and Metal are only used with Graphite.
This doesn't yet rename the cc/viz pixel test enums - that will be a
separate followup change since it would otherwise add a dozen or two
more changed files to this CL.
Bug: 1429361
Change-Id: Ibf129727e03c303bfac85b98c111b08d880f408f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4404275
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Kevin Lubick <kjlubick@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Matthew Denton <mpdenton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1128336}
It was noticed in https://chromium-review.googlesource.com/c/chromium/src/+/4401454
that there could be a null dereference (crash) if
SkImages::TextureFromYUVATextures returned false.
One way this can happen is if SkImages::GetBackendTextureFromImage
returns false (and thus the given yuv_texture is invalid).
This makes sure the three textures we get are valid (using CHECK
because they should always be gettable) and a nullness
check for yuva_image.
Bug: skia:13983
Change-Id: Ie5849a8bb56a9f4534cc511ad468e5eb0027b5a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4402159
Commit-Queue: Kevin Lubick <kjlubick@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1128162}
This reverts commit b47f4549d7.
Reason for revert: Speculative revert for crbug.com/1428374.
Original change's description:
> [ScrollUnif.] Distinguish kFailedHitTest and kNonFastScrollableRegion
>
> Previously in ScrollUnification all main thread hit tests were
> reported as kFailedHitTest, including hit tests on non-fast scrollable
> region (reported as kNonFastScrollableRegion in legacy scroll) and
> non-reliable compositor hit tests (reported as kFailedHitTest in
> legacy scroll). We want to reduce non-reliable compositor hit tests
> by letting blink provide more accurate hit test data. This CL makes
> it possible to measure the result.
>
> Bug: 1413877
> Change-Id: Iaf00021535d167a1fe8ce1d32df156c0d76c2d34
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4363371
> Reviewed-by: Scott Violet <sky@chromium.org>
> Reviewed-by: Steve Kobes <skobes@chromium.org>
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1121925}
Bug: 1413877, 1428374
Change-Id: If9c935bb98a6802312fe4ee901bb6e9ced164b8f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4407898
Reviewed-by: Philip Rogers <pdr@chromium.org>
Owners-Override: Xianzhu Wang <wangxianzhu@chromium.org>
Auto-Submit: Xianzhu Wang <wangxianzhu@chromium.org>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1127818}
For transfer cache images, we do not report anything in the GPU image
decode cache memory dump provider. This CL addresses that. Previously,
GPU image decode cache memory was not reported at all (locally) on
either macOS or Linux.
Bug: 1410541
Change-Id: Ia501ca319d8d91b44640f0c0149243b7057afbd2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4404136
Commit-Queue: Benoit Lize <lizeb@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1127061}
Change the helper function GetYUVADecodeInfo to return the scaled
SkYUVAPixmapInfo for the decoded result. Prior to this, it was changed
to be 4:4:4 when scaling was needed, but the size was left at the
original size.
This gets saved to GpuImageDecodeCache::ImageData::yuva_pixmap_info, which is then used by GpuImageDecodeCache::DecodeImageIfNecessary.
The GpuImageDecodeCache::DecodeImageIfNecessary has a non-paralle
structure between the RGB and YUV paths. The RGB path creates the
result SkPixmap and passes it to DrawAndScaleImageRGB, while the
YUV path relies on DrawAndScaleImageYUV to create the resulting
SkYUVAPixmaps. Now that we have the correct SkYUVAPixmapInfo in
GpuImageDecodeCache::ImageData::yuva_pixmap_info, make the YUV path
be like the RGB path.
In DrawAndScaleImageYUV, clean things up now that we have an explicit
SkYUVAPixmaps parameter. Use for-loops over the planes instead of
tracking Y,U,V planes separately.
Push the merged tracking of Y,U,V in a single array through to
GpuImageDecodeCache::DecodedImageData. This allows us to handle all
YUV formats in UploadImageIfNecessary_TransferCache_SoftwareDecode.
Put a note in UploadImageIfNecessary_GpuCpu_YUVA where we still
only support triplanar Y,U,V. Once we move to OOP-R, then the image
decode cache will support all YUV formats that Skia supports.
The motivation for doing this now is to prepare for adding gainmaps
to GpuImageDecodeCache::DecodedImageData. That will be easier now that
the RGB and YUV paths have been merged into a single images_ member.
Bug: 1404000
Change-Id: I42bfc9dfda258cabbf760311130617655f97ca82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4395996
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1127057}
Merge the UploadImageIfNecessary_TransferCache_SoftwareDecode_YUVA and
UploadImageIfNecessary_TransferCache_SoftwareDecode_RGBA functions.
This is needed because we will want to be able to handle the full
cross product of RGBA and YUVA for the default and the gainmap image.
Slightly restructure GpuImageDecodeCache::CreateImageData, so that
the size for the buffer for decoding is a separate step. This will
be helpful when we need to add the size for the default and gainmap
image.
Make ImageData take SkImageInfo as a parameter. Previously it was
re-computing this in GpuImageDecodeCache::DecodeImageIfNecessary
by calling CreateImageInfoForDrawImage.
Change CreateImageInfoForDrawImage to also compute mip level.
Bug: 1404000
Change-Id: I413ead5b48c4540dc5f2955f91ff775c2b06dbde
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4392682
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126827}
The notification to resume rendering is dispatched from the main to impl
thread immediately, as opposed to part of the state transferred during
a commit. This means that if there is a impl-side animation running on
the impl thread, it may draw a few frames without main thread updates
that accompany the notification to resume rendering. This is racy
depending on how long the commit + activation takes.
For ViewTransitions, which rely on this paused rendering state, this
means we can have a few frames of an animation from the old View update
before the compositor's content is replaced by pseudo-element animations
(which are part of the main thread updates pushed in the commit).
This change fixes that by ensuring that the impl-side scheduler waits
for at least 1 commit before resuming draws of the active tree. The wait
is until this newly committed tree goes all the way to activation.
R=vmpstr@chromium.org
Fixed: 1425508
Change-Id: I1a6f214d3abbe07657b5d2ab350bbdba2abc8b3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4401111
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Auto-Submit: Khushal Sagar <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126821}
This is a reland of commit e4a888661c
Two fixes:
* Null check WindowAndroid is straightforward
* Avoid reentrancy issues in DelayedScheduler. Previously in
BeginFrameAndResetArgs, calling `client_->DoBeginFrame` could
recurse back to DelayedScheduler to consume `unused_args_`, which
leads to sending `DidNotProduceFrame` with invalid args. Avoid this
by making a copy and resetting args before calling to client.
Original change's description:
> slim: Delayed scheduler
>
> Scheduler specifically optimized for the use case of android browser
> compositor moving the top/bottom browser controls as a result of
> renderer compositor updates.
>
> Bug: 1408128
> Change-Id: I2a82ddc8b2a9fb91e05baf6bba34dc7e60597b25
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4353951
> Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
> Reviewed-by: Jonathan Ross <jonross@chromium.org>
> Commit-Queue: Bo Liu <boliu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1124740}
Bug: 1408128
Change-Id: I8dc6450d2ab4dc2a73c96335492663ee75f26920
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4403837
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Bo Liu <boliu@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126769}
Since the owned reference in `renderer_` is destroyed during TearDown(),
the unowned reference in `software_renderer_` must be as well and can
not outlive it until test class destruction time.
Bug: 1401495
Change-Id: Ie080308ca748016f2a42fb1f8a7abae61b78ad3e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4401817
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126592}
* Event.Jank.ScrollUpdate.DroppedFrame.FrameAboveJankyThreshold
Which tracks the intenisty of irregular jumps when a frame is
dropped.
* Event.Jank.ScrollUpdate.NonDroppedFrame.FrameAboveJankyThreshold
Which tracks the intenisty of irregular jumps that happen when no
frames are dropped.
Frames deemed janky by this metric, usually caused by poor scrolling
predictor performance.
* Event.Latency.ScrollUpdate.JankyFramePercentage
Which tracks the number of janky frames per 50 frame sequence, a
frame is deemed janky when it's an intense jump in an irregular
sequence, whether a frame was dropped or not.
Three logic behind added metrics are described in detail in the
following document.
http://doc/1Y0u0Tq5eUZff75nYUzQVw6JxmbZAW9m64pJidmnGWsY.
Bug: b/274578776
Change-Id: Ibbfdd4ee3ed4ccff53ea6fe5b66852e39e96bedf
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4381615
Commit-Queue: Omar Elmekkawy <mekk@chromium.org>
Reviewed-by: Jonathan Ross <jonross@chromium.org>
Reviewed-by: Stephen Nusko <nuskos@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126477}
This reverts commit e4a888661c.
Reason for revert: crbug.com/1429894 and possibly crbug.com/1429963 Seems that both parts of `view_.GetWindowAndroid()->GetCompositor()` access `raw_ptr` leading to a crash
Original change's description:
> slim: Delayed scheduler
>
> Scheduler specifically optimized for the use case of android browser
> compositor moving the top/bottom browser controls as a result of
> renderer compositor updates.
>
> Bug: 1408128
> Change-Id: I2a82ddc8b2a9fb91e05baf6bba34dc7e60597b25
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4353951
> Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
> Reviewed-by: Jonathan Ross <jonross@chromium.org>
> Commit-Queue: Bo Liu <boliu@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1124740}
Bug: 1408128
Change-Id: Idf3869844bb6b748ed2594b91d41bbc58d3ecfd4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4401190
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126247}
This change updates RasterInterface::WritePixels() to take in a
plane_index. This plane index will later be used to write to the
appropriate SkSurface for a given plane for multiplanar formats through
Raster and Gles Passthrough Decoders.
Here, we pass plane_index as 0 so that the logic remains the same as
earlier.
Bug: 1414564
Change-Id: If6a2da932a441c82ab97938367c3cf97d5fc8ac2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4381473
Commit-Queue: Saifuddin Hitawala <hitawala@chromium.org>
Reviewed-by: Ian Vollick <vollick@chromium.org>
Reviewed-by: Kyle Charbonneau <kylechar@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: danakj <danakj@chromium.org>
Reviewed-by: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1126138}
I've broken these tests twice in the last 2 weeks and I think
this extra assertion would have made it easier to identify where
the issue was without having to detangle the pointer
equality assertion of image_with_mips == decoded_draw_image.image()
Change-Id: I765ffad202a781e1affe3e8b3233a4b73fe16e63
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4395168
Auto-Submit: Kevin Lubick <kjlubick@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1125988}
size_t values are serialized and deserialized as uint64_t, but areonly aligned to 4 bytes, which results in ubsan failures due to insufficient
alignment.
Fix these issues by serializing and deserializing two uint32_t values
instead of one uint64_t values.
Take this approach instead of adding padding to avoid the potential
for introducing regressions (e.g, if any of the functions that
serialize size_t values assume that only 8 bytes are written, but
padding would cause 12 bytes to be written).
Bug: 1429994, 1429789, 1429903
Change-Id: I4d94a48f43eb7d46bb0b4465a7fe17829ffa81de
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4393965
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1125851}
view_transition_content_surface corresponds to the render surface which produces content drawn by a ViewTransitionContentLayer. Ensure the damage of view_transition_content_surface propagate to the view transition layer's parent surface.
Bug: 1422575, 1427717
Change-Id: I1c3cfab4bac90fe31e8a331fdd551bf9921da569
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4355996
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Commit-Queue: Maggie Chen <magchen@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1125554}
Add a new PaintImageGenerator for the gainmap image to cc::PaintImage.
Add a AuxImage argument to cc::PaintImage's GetSupportedDecodeSize,
Decode, DecodeYuv, GetSkImageInfo, and IsYuv functions. This will
cause the underlying function to use either the default generator,
or the new gainmap image generator.
Add a new GetSize and GetSkISize function to cc::PaintImage. These
functions also take an AuxImage parameter.
Update GpuImageDecodeCache to specify the AuxImage parameter, and to
add the AuxImage parameter to the functions that will need it. Do not
yet update GpuImageDecodeCache to support gainmap decoding.
Bug: 1404000
Change-Id: I93081045391358c199deafb380669ad1d0acca22
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4386456
Commit-Queue: ccameron chromium <ccameron@chromium.org>
Auto-Submit: ccameron chromium <ccameron@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1125222}
These metrics ended up not having any useful/normalized data. They've
since expired, and we aren't planning to do further follow ups here. We
have been scrolling metrics now.
Remove them and the code that calculates them.
Bug: 1404506
Change-Id: I7bc08061d8a792f1ce954616f3baa5389e913505
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4384942
Reviewed-by: Ken Rockot <rockot@google.com>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1124965}
ClientImageTransferCacheEntry: Add constructor that takes an additional
Image and SkGainmapInfo. Serialize this data.
ServiceImageTransferCacheEntry: Deserialize the gainmap image and
SkGainmapInfo, if provided. Use ColorConversionSkFilterCache to apply
the gainmap in the same place where we apply HDR tone mapping.
PaintOpReader/PaintOpWriter: Add support for SkGainmapInfo.
Tests: Add tests that verify that when an image is serialized with
a gainmap and SkGainmapInfo, the result from deserialization is the
image with the gainmap applied.
This approach -- applying the gainmap (and more generally doing
HDR tone mapping) during deserialization -- is not a good idea, because
it requires re-decoding the image every time that the HDR rendering
parameters change. This will need to be changed eventually.
Bug: 1404000
Change-Id: Id4d5795cd70faad0a60397c3c6e1873b18486ad5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4373641
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Auto-Submit: ccameron chromium <ccameron@chromium.org>
Commit-Queue: Khushal Sagar <khushalsagar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1124784}