bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

Enable record and replay of ClientPaintedLayers on the main thread

RESOLVED FIXED in Firefox 56

Status

()

Core
Graphics
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: mchang, Assigned: mchang)

Tracking

(Blocks: 1 bug)

unspecified
mozilla56
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox56 fixed)

Details

(Whiteboard: gfx-noted)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

a year ago
Just as a starting point.

1) we record/replay on the main thread for a client painted layer. Right now, we're using DrawTargetRecording which copies everything and also paints everything while recording, so it's super slow. But it's a known working recorder for now.
2) Ship this to the paint thread!
3) Stop using DrawTargetRecording and make sure DrawTargetCapture works

This is just (1)
(Assignee)

Updated

a year ago
Assignee: nobody → mchang
Whiteboard: gfx-noted
(Assignee)

Comment 1

a year ago
Created attachment 8875464 [details] [diff] [review]
Record / Replay ClientPaintLayers

Essentially a import of [1] for record/replay of client painted layers. Lots of duplicated code to get content client correct. This is fixed up in part 2.

[1] http://searchfox.org/mozilla-central/source/gfx/layers/wr/WebRenderPaintedLayerBlob.cpp#28
Attachment #8875464 - Flags: review?(dvander)
(Assignee)

Comment 2

a year ago
Created attachment 8875465 [details] [diff] [review]
Refactor ClientPaintedLayers from duplicate code
Attachment #8875465 - Flags: review?(dvander)
Comment on attachment 8875465 [details] [diff] [review]
Refactor ClientPaintedLayers from duplicate code

Review of attachment 8875465 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/client/ClientPaintedLayer.cpp
@@ +305,3 @@
>      RefPtr<DrawEventRecorderMemory> recorder = RecordPaintedLayer();
>      if (recorder) {
> +      EnsureContentClient();

Do you need to check the return value here, and below too?
Attachment #8875465 - Flags: review?(dvander) → review+
Comment on attachment 8875464 [details] [diff] [review]
Record / Replay ClientPaintLayers

Review of attachment 8875464 [details] [diff] [review]:
-----------------------------------------------------------------

::: gfx/layers/client/ClientPaintedLayer.cpp
@@ +120,5 @@
>  
> +bool
> +ClientPaintedLayer::CanRecordLayer(ReadbackProcessor* aReadback)
> +{
> +  if (!gfxPrefs::OffMainThreadPainting()) {

Until bug 1369542 lands, could you make this:

>   if (!Preferences::GetBool("layers.omtp.enabled", false))

And drop the new entry in gfxPrefs?

@@ +125,5 @@
> +    return false;
> +  }
> +
> +  // Make life easier for debugging for now.
> +  if (!XRE_IsContentProcess()) {

(And after bug 1369549, testing for whether a paint thread exists can subsume both these checks.)
Attachment #8875464 - Flags: review?(dvander) → review+
(Assignee)

Comment 5

a year ago
Created attachment 8876915 [details] [diff] [review]
Rolled up patch

Carrying r+, updated with feedback from dvander. Also rebased on master + updated patches from dependent bugs.
Attachment #8875464 - Attachment is obsolete: true
Attachment #8875465 - Attachment is obsolete: true
Attachment #8876915 - Flags: review+
(Assignee)

Updated

a year ago
Blocks: 1372441
(Assignee)

Updated

a year ago
Blocks: 1372739

Comment 7

a year ago
Pushed by mchang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/03e899794f41
Support for record and replay of ClientPaintedLayers on the main thread. r=dvander
Sorry, this had to be backed out for a merge conflict with bug 1368386.

https://hg.mozilla.org/integration/mozilla-inbound/rev/942ba6197018f6702b5b48c3029019a70185c375
Flags: needinfo?(mchang)

Comment 9

a year ago
Backout by archaeopteryx@coole-files.de:
https://hg.mozilla.org/mozilla-central/rev/0ef3bfc9f4b8
Backed out changeset 03e899794f41 for merge conflict with bug 1368386. r=backout a=backout

Comment 10

a year ago
Backout by archaeopteryx@coole-files.de:
https://hg.mozilla.org/mozilla-central/rev/90436b206b3d
Backed out changeset 03e899794f41 for merge conflict with bug 1368386, v2. r=backout a=backout

Comment 11

a year ago
Pushed by mchang@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/77538e36a462
Support for record and replay of ClientPaintedLayers on the main thread. r=dvander
(Assignee)

Comment 12

a year ago
Try again after resolved merge conflict - https://treeherder.mozilla.org/#/jobs?repo=try&revision=4982ee803bad66e8fab494ff0148506ecad280dc
Flags: needinfo?(mchang)

Comment 13

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/77538e36a462
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox56: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
(Assignee)

Updated

a year ago
Blocks: 1379322
You need to log in before you can comment on or make changes to this bug.