Implement PushLayer/PopLayer APIs in Moz2D

RESOLVED FIXED in Firefox 46

Status

()

Core
Graphics
RESOLVED FIXED
2 years ago
a year ago

People

(Reporter: bas, Assigned: bas)

Tracking

unspecified
mozilla46
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox46 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(8 attachments, 1 obsolete attachment)

58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
58 bytes, text/x-review-board-request
jrmuizel
: review+
Details | Review
(Assignee)

Description

2 years ago
We want to implement Push and PopLayer as first class citizens in Moz2D. This will allow for better performance by allowing DrawTargets to use internal optimizations for these calls rather than forcing the creation of temporary DrawTargets.
(Assignee)

Comment 1

2 years ago
Created attachment 8681934 [details] [diff] [review]
Part 1: Add PushLayer/PopLayer API to DrawTarget baseclass.
Attachment #8681934 - Flags: review?(jmuizelaar)
Attachment #8681934 - Flags: review?(jmuizelaar) → review+
(Assignee)

Comment 2

2 years ago
Created attachment 8703664 [details]
MozReview Request: Bug 1220629 - Part 1: Add PushLayer/PopLayer API to DrawTarget baseclass. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29427/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29427/
Attachment #8703664 - Flags: review?(jmuizelaar)
(Assignee)

Comment 3

2 years ago
Created attachment 8703665 [details]
MozReview Request: Bug 1220629 - Part 2: Prepare DrawTargetD2D1 for the possibilities of layers existing inside it. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29429/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29429/
Attachment #8703665 - Flags: review?(jmuizelaar)
(Assignee)

Comment 4

2 years ago
Created attachment 8703666 [details]
MozReview Request: Bug 1220629 - Part 3: Implement PushLayer/PopLayer API in cairo. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29431/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29431/
Attachment #8703666 - Flags: review?(jmuizelaar)
(Assignee)

Comment 5

2 years ago
Created attachment 8703667 [details]
MozReview Request: Bug 1220629 - Part 4: Allow gfxContext to use the native pushlayer implementations based on a pref. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29433/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29433/
Attachment #8703667 - Flags: review?(jmuizelaar)
(Assignee)

Comment 6

2 years ago
Created attachment 8703668 [details]
MozReview Request: Bug 1220629 - Part 5: Implement PushLayer/PopLayer API for Direct2D 1.1. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29435/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29435/
Attachment #8703668 - Flags: review?(jmuizelaar)
(Assignee)

Comment 7

2 years ago
Created attachment 8703669 [details]
MozReview Request: Bug 1220629 - Part 6: Implement PushLayer/PopLayer API in several wrapper DT types. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29437/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29437/
Attachment #8703669 - Flags: review?(jmuizelaar)
(Assignee)

Comment 8

2 years ago
Created attachment 8703670 [details]
MozReview Request: Bug 1220629 - Part 7: Mark several reftests fuzzy. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29439/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29439/
Attachment #8703670 - Flags: review?(jmuizelaar)
(Assignee)

Comment 9

2 years ago
Created attachment 8703678 [details]
MozReview Request: Bug 1220629 - Part 8: Enable native PushLayer/PopLayer by default on Windows and Linux. r=jrmuizel

Review commit: https://reviewboard.mozilla.org/r/29441/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/29441/
Attachment #8703678 - Flags: review?(jmuizelaar)
(Assignee)

Updated

2 years ago
Attachment #8681934 - Attachment is obsolete: true
Comment on attachment 8703665 [details]
MozReview Request: Bug 1220629 - Part 2: Prepare DrawTargetD2D1 for the possibilities of layers existing inside it. r=jrmuizel

https://reviewboard.mozilla.org/r/29429/#review26227
Attachment #8703665 - Flags: review?(jmuizelaar) → review+
(Assignee)

Comment 11

2 years ago
Comment on attachment 8703666 [details]
MozReview Request: Bug 1220629 - Part 3: Implement PushLayer/PopLayer API in cairo. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29431/diff/1-2/
(Assignee)

Comment 12

2 years ago
Comment on attachment 8703667 [details]
MozReview Request: Bug 1220629 - Part 4: Allow gfxContext to use the native pushlayer implementations based on a pref. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29433/diff/1-2/
(Assignee)

Comment 13

2 years ago
Comment on attachment 8703668 [details]
MozReview Request: Bug 1220629 - Part 5: Implement PushLayer/PopLayer API for Direct2D 1.1. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29435/diff/1-2/
(Assignee)

Comment 14

2 years ago
Comment on attachment 8703669 [details]
MozReview Request: Bug 1220629 - Part 6: Implement PushLayer/PopLayer API in several wrapper DT types. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29437/diff/1-2/
(Assignee)

Comment 15

2 years ago
Comment on attachment 8703670 [details]
MozReview Request: Bug 1220629 - Part 7: Mark several reftests fuzzy. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29439/diff/1-2/
(Assignee)

Comment 16

2 years ago
Comment on attachment 8703678 [details]
MozReview Request: Bug 1220629 - Part 8: Enable native PushLayer/PopLayer by default on Windows and Linux. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29441/diff/1-2/
(Assignee)

Comment 17

2 years ago
Comment on attachment 8703666 [details]
MozReview Request: Bug 1220629 - Part 3: Implement PushLayer/PopLayer API in cairo. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29431/diff/2-3/
(Assignee)

Comment 18

2 years ago
Comment on attachment 8703667 [details]
MozReview Request: Bug 1220629 - Part 4: Allow gfxContext to use the native pushlayer implementations based on a pref. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29433/diff/2-3/
(Assignee)

Comment 19

2 years ago
Comment on attachment 8703668 [details]
MozReview Request: Bug 1220629 - Part 5: Implement PushLayer/PopLayer API for Direct2D 1.1. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29435/diff/2-3/
(Assignee)

Comment 20

2 years ago
Comment on attachment 8703669 [details]
MozReview Request: Bug 1220629 - Part 6: Implement PushLayer/PopLayer API in several wrapper DT types. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29437/diff/2-3/
(Assignee)

Comment 21

2 years ago
Comment on attachment 8703670 [details]
MozReview Request: Bug 1220629 - Part 7: Mark several reftests fuzzy. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29439/diff/2-3/
(Assignee)

Comment 22

2 years ago
Comment on attachment 8703678 [details]
MozReview Request: Bug 1220629 - Part 8: Enable native PushLayer/PopLayer by default on Windows and Linux. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29441/diff/2-3/
Comment on attachment 8703664 [details]
MozReview Request: Bug 1220629 - Part 1: Add PushLayer/PopLayer API to DrawTarget baseclass. r=jrmuizel

https://reviewboard.mozilla.org/r/29427/#review26387
Attachment #8703664 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8703666 [details]
MozReview Request: Bug 1220629 - Part 3: Implement PushLayer/PopLayer API in cairo. r=jrmuizel

https://reviewboard.mozilla.org/r/29431/#review26173

::: gfx/2d/DrawTargetCairo.cpp:1543
(Diff revision 1)
> +  }

Lifting this if condition inside the one above makes it easier for me to understand what's going on.


  } else {
    if (layer.mOpacity != Float(1.0)) {
        cairo_push_group_with_content(mContext, CAIRO_CONTENT_COLOR_ALPHA);

        // Now draw the content using the desired operator
        cairo_paint_with_alpha(mContext, layer.mOpacity);

        cairo_pop_group_to_source(mContext);
    }
    cairo_mask(mContext, layer.mMaskPattern);
  }
Attachment #8703666 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8703667 [details]
MozReview Request: Bug 1220629 - Part 4: Allow gfxContext to use the native pushlayer implementations based on a pref. r=jrmuizel

https://reviewboard.mozilla.org/r/29433/#review26399
Attachment #8703667 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8703669 [details]
MozReview Request: Bug 1220629 - Part 6: Implement PushLayer/PopLayer API in several wrapper DT types. r=jrmuizel

https://reviewboard.mozilla.org/r/29437/#review26401
Attachment #8703669 - Flags: review?(jmuizelaar) → review+
Attachment #8703670 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8703670 [details]
MozReview Request: Bug 1220629 - Part 7: Mark several reftests fuzzy. r=jrmuizel

https://reviewboard.mozilla.org/r/29439/#review26403
Comment on attachment 8703678 [details]
MozReview Request: Bug 1220629 - Part 8: Enable native PushLayer/PopLayer by default on Windows and Linux. r=jrmuizel

https://reviewboard.mozilla.org/r/29441/#review26405
Attachment #8703678 - Flags: review?(jmuizelaar) → review+
Attachment #8703668 - Flags: review?(jmuizelaar) → review+
Comment on attachment 8703668 [details]
MozReview Request: Bug 1220629 - Part 5: Implement PushLayer/PopLayer API for Direct2D 1.1. r=jrmuizel

https://reviewboard.mozilla.org/r/29435/#review26407

::: gfx/2d/DrawTargetD2D.cpp:2724
(Diff revision 3)
> -  //options.debugLevel = D2D1_DEBUG_LEVEL_INFORMATION;
> +  options.debugLevel = D2D1_DEBUG_LEVEL_INFORMATION;

Was this change intentional?

::: gfx/2d/DrawTargetD2D1.cpp:762
(Diff revision 3)
> +      image->QueryInterface((ID2D1Bitmap**)getter_AddRefs(bitmap));

What if image is not a ID2D1Bitmap? Do we ever have non ID2D1Bitmaps in SourceSurfaces?

::: gfx/2d/DrawTargetD2D1.cpp:769
(Diff revision 3)
> +      clip->Open(getter_AddRefs(sink));

It'd be nice to have a helper that takes a rect and adds it to the path, instead of open coding this inline.

::: gfx/2d/HelpersD2D.h:840
(Diff revision 3)
> +    

There's a bunch of these trailing spaces.
(Assignee)

Comment 30

2 years ago
https://reviewboard.mozilla.org/r/29435/#review26407

> Was this change intentional?

Nope, you're absolutely right!

> What if image is not a ID2D1Bitmap? Do we ever have non ID2D1Bitmaps in SourceSurfaces?

No, we already have places which depend on this.
(Assignee)

Comment 31

2 years ago
Comment on attachment 8703664 [details]
MozReview Request: Bug 1220629 - Part 1: Add PushLayer/PopLayer API to DrawTarget baseclass. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29427/diff/1-2/
(Assignee)

Comment 32

2 years ago
Comment on attachment 8703665 [details]
MozReview Request: Bug 1220629 - Part 2: Prepare DrawTargetD2D1 for the possibilities of layers existing inside it. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29429/diff/1-2/
(Assignee)

Comment 33

2 years ago
Comment on attachment 8703666 [details]
MozReview Request: Bug 1220629 - Part 3: Implement PushLayer/PopLayer API in cairo. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29431/diff/3-4/
(Assignee)

Comment 34

2 years ago
Comment on attachment 8703667 [details]
MozReview Request: Bug 1220629 - Part 4: Allow gfxContext to use the native pushlayer implementations based on a pref. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29433/diff/3-4/
(Assignee)

Comment 35

2 years ago
Comment on attachment 8703668 [details]
MozReview Request: Bug 1220629 - Part 5: Implement PushLayer/PopLayer API for Direct2D 1.1. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29435/diff/3-4/
(Assignee)

Comment 36

2 years ago
Comment on attachment 8703669 [details]
MozReview Request: Bug 1220629 - Part 6: Implement PushLayer/PopLayer API in several wrapper DT types. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29437/diff/3-4/
(Assignee)

Comment 37

2 years ago
Comment on attachment 8703670 [details]
MozReview Request: Bug 1220629 - Part 7: Mark several reftests fuzzy. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29439/diff/3-4/
(Assignee)

Comment 38

2 years ago
Comment on attachment 8703678 [details]
MozReview Request: Bug 1220629 - Part 8: Enable native PushLayer/PopLayer by default on Windows and Linux. r=jrmuizel

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/29441/diff/3-4/

Updated

2 years ago
Depends on: 1238328
See Also: → bug 1239040
Depends on: 1239106

Updated

2 years ago
Depends on: 1240437

Updated

2 years ago
Depends on: 1241058

Updated

2 years ago
Depends on: 1262390

Updated

2 years ago
Depends on: 1272500

Updated

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