Page MenuHomePhabricator

Bug 1607352 - Support DirectComposition virtual surface API.
ClosedPublic

Authored by gw on Jan 6 2020, 11:05 PM.

Details

Summary

Adds an #ifdef to the DCLayerTree implementation that allows
selecting whether to use the virtual surface API (enabled by
default) or the regular DC surface API.

For now, this is a compile-time switch. As a follow up to this,
we will support both options at runtime (for example, using the
regular surface API for surfaces that have holes or translucency).

Diff Detail

Repository
rMOZILLACENTRAL mozilla-central
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

gw created this revision.Jan 6 2020, 11:05 PM
Herald added a project: Restricted Project. · View Herald TranscriptJan 6 2020, 11:05 PM
phab-bot requested review of this revision.Jan 6 2020, 11:05 PM
phab-bot changed the visibility from "Custom Policy" to "Public (No Login Required)".
phab-bot changed the edit policy from "Custom Policy" to "Restricted Project (Project)".
phab-bot removed a project: Restricted Project.
sotaro accepted this revision.Jan 7 2020, 6:43 AM
sotaro added inline comments.
gfx/webrender_bindings/DCLayerTree.h
37

It might be helpful if there is a comment about VIRTUAL_OFFSET.

This revision is now accepted and ready to land.Jan 7 2020, 6:43 AM
mstange added inline comments.Jan 7 2020, 10:36 AM
gfx/webrender_bindings/DCLayerTree.h
37

I second this request. I don't understand what this is for.

gfx/wr/example-compositor/compositor-windows/src/lib.cpp
31

What's the purpose of this offset?

gw updated this revision to Diff 214519.Jan 7 2020, 7:20 PM
gw added a comment.Jan 7 2020, 7:22 PM

Rebased and added a comment to explain what VIRTUAL_OFFSET is for. I'll do a fresh try run with compositor enabled before landing this.

Code analysis found 28 defects in the diff 214519:

  • 28 defects found by clang-format

You can run this analysis locally with:

  • ./mach clang-format -s -p gfx/webrender_bindings/DCLayerTree.cpp gfx/webrender_bindings/DCLayerTree.h (C/C++)

For your convenience, here is a patch that fixes all the source-test-clang-format defects (use it in your repository with hg import or git apply -p0).

If you see a problem in this automated review, please report it here.

In our previous code coverage analysis run, we found some files which had no coverage and are being modified in this patch:

Should they have tests, or are they dead code ?

  • You can file a bug blocking Bug 1415824 for untested files that should be tested.
  • You can file a bug blocking Bug 1415819 for untested files that should be removed.

If you see a problem in this automated review, please report it here.

gw updated this revision to Diff 214575.Jan 7 2020, 8:25 PM
gw updated this revision to Diff 214576.Jan 7 2020, 8:26 PM

In our previous code coverage analysis run, we found some files which had no coverage and are being modified in this patch:

Should they have tests, or are they dead code ?

  • You can file a bug blocking Bug 1415824 for untested files that should be tested.
  • You can file a bug blocking Bug 1415819 for untested files that should be removed.

If you see a problem in this automated review, please report it here.

In our previous code coverage analysis run, we found some files which had no coverage and are being modified in this patch:

Should they have tests, or are they dead code ?

  • You can file a bug blocking Bug 1415824 for untested files that should be tested.
  • You can file a bug blocking Bug 1415819 for untested files that should be removed.

If you see a problem in this automated review, please report it here.