Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Jul 2, 2019

Move the mutator stack handling to tree preroll. And the platform view is going to decide if it should composite or not, and set a flag.
In paint (Composite), based on the flag, we composite with the cached embedded view params.

@cyanglaz cyanglaz requested review from amirh and iskakaushik July 2, 2019 21:49
@cyanglaz cyanglaz changed the title Move the mutator stack handling to preroll Move the mutators stack handling to preroll Jul 2, 2019
Copy link
Contributor

@iskakaushik iskakaushik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some minor changes. looks good overall.

return;
}
current_composition_params_[view_id] = EmbeddedViewParams(*params.get());
views_need_recomposite.insert(view_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: better name would be view_needs_recomposition_

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, kept is as views_need_recomposition_ since it is a set.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe views_to_recomposite_?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

std::vector<int64_t> active_composition_order_;

// Only compoiste platform views in this set.
std::unordered_set<int64_t> views_need_recomposite;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

private variable, end with underscore.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return;
}
context->view_embedder->PrerollCompositeEmbeddedView(view_id_);
std::unique_ptr<EmbeddedViewParams> params =
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't need to be a unique_ptr. Just make this a stack variable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a refactoring just landed in a previous PR. #9640

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

got it.

Copy link
Contributor Author

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with @iskakaushik's comment

std::vector<int64_t> active_composition_order_;

// Only compoiste platform views in this set.
std::unordered_set<int64_t> views_need_recomposite;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return;
}
context->view_embedder->PrerollCompositeEmbeddedView(view_id_);
std::unique_ptr<EmbeddedViewParams> params =
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a refactoring just landed in a previous PR. #9640

return;
}
current_composition_params_[view_id] = EmbeddedViewParams(*params.get());
views_need_recomposite.insert(view_id);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done, kept is as views_need_recomposition_ since it is a set.

@iskakaushik
Copy link
Contributor

LGTM

Copy link
Contributor

@amirh amirh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM modulo nits

void ClipPathLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
SkRect previous_cull_rect = context->cull_rect;
SkRect clip_path_bounds = clip_path_.getBounds();
context->mutators_stack.pushClipPath(clip_path_);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: move these inside the condition (if the clip is empty we're not painting the subtree), it's going to have the same effect only that the intention is more explicit.

Same for the other clip layers.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return;
}
current_composition_params_[view_id] = EmbeddedViewParams(*params.get());
views_need_recomposite.insert(view_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe views_to_recomposite_?

Copy link
Contributor Author

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated with @amirh's comment

void ClipPathLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
SkRect previous_cull_rect = context->cull_rect;
SkRect clip_path_bounds = clip_path_.getBounds();
context->mutators_stack.pushClipPath(clip_path_);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

return;
}
current_composition_params_[view_id] = EmbeddedViewParams(*params.get());
views_need_recomposite.insert(view_id);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@iskakaushik iskakaushik merged commit 8306ee6 into flutter:master Jul 2, 2019
@cyanglaz cyanglaz deleted the mutator_stack_to_preroll branch July 3, 2019 00:25
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 3, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 4, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 4, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 4, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 4, 2019
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 4, 2019
engine-flutter-autoroll added a commit to flutter/flutter that referenced this pull request Jul 4, 2019
flutter/engine@7d3e722...3c51a7b

git log 7d3e722..3c51a7b --no-merges --oneline
3c51a7b Roll src/third_party/skia 11eb847a2080..857c9f955edb (2 commits) (flutter/engine#9676)
7f828dd Raster now returns an enum rather than boolean (flutter/engine#9661)
11b6afe  Roll src/third_party/dart 67ab3be10d...b5aeaa6796 (flutter/engine#9675)
3c4dbe2 Revert &#34; Roll src/third_party/dart 67ab3be10d...43891316ca (#9670)&#34; (flutter/engine#9673)
5e596f2  Roll src/third_party/dart 67ab3be10d...43891316ca (flutter/engine#9670)
46a2239 Roll src/third_party/skia 5b52c52141ac..11eb847a2080 (6 commits) (flutter/engine#9671)
b84f89b Allow embedders to add callbacks for responses to platform messages from the framework. (flutter/engine#9655)
8dac2e9 Begin separating macOS engine from view controller (flutter/engine#9654)
d3616c7 Roll src/third_party/skia 0e0113dcbd9a..5b52c52141ac (8 commits) (flutter/engine#9665)
cea2c36 Mutators Stack refactoring (flutter/engine#9663)
6a8782f Roll src/third_party/skia 93eeff578b08..0e0113dcbd9a (9 commits) (flutter/engine#9662)
791143f ExternalViewEmbedder can CancelFrame after pre-roll (flutter/engine#9660)
d637f29 External view embedder can tell if embedded views have mutated (flutter/engine#9653)
ceee3d7 Roll src/third_party/skia 38ae3f42fec1..93eeff578b08 (1 commits) (flutter/engine#9659)
d757290 Roll src/third_party/skia febc162c7898..38ae3f42fec1 (3 commits) (flutter/engine#9658)
58133ab Roll src/third_party/skia 3de5c6388142..febc162c7898 (2 commits) (flutter/engine#9657)
29342dd Roll src/third_party/skia 1e2cb444e0c1..3de5c6388142 (8 commits) (flutter/engine#9656)
b547356 Pipeline allows continuations that can produce to front (flutter/engine#9652)
8306ee6 Move the mutators stack handling to preroll (flutter/engine#9651)
511b9f2 Roll src/third_party/skia 215ff3325230..1e2cb444e0c1 (12 commits) (flutter/engine#9650)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff (jsimmons@google.com), and stop
the roller if necessary.
johnsonmh pushed a commit to johnsonmh/flutter that referenced this pull request Jul 30, 2019
flutter/engine@7d3e722...3c51a7b

git log 7d3e722..3c51a7b --no-merges --oneline
3c51a7b Roll src/third_party/skia 11eb847a2080..857c9f955edb (2 commits) (flutter/engine#9676)
7f828dd Raster now returns an enum rather than boolean (flutter/engine#9661)
11b6afe  Roll src/third_party/dart 67ab3be10d...b5aeaa6796 (flutter/engine#9675)
3c4dbe2 Revert &flutter#34; Roll src/third_party/dart 67ab3be10d...43891316ca (flutter#9670)&flutter#34; (flutter/engine#9673)
5e596f2  Roll src/third_party/dart 67ab3be10d...43891316ca (flutter/engine#9670)
46a2239 Roll src/third_party/skia 5b52c52141ac..11eb847a2080 (6 commits) (flutter/engine#9671)
b84f89b Allow embedders to add callbacks for responses to platform messages from the framework. (flutter/engine#9655)
8dac2e9 Begin separating macOS engine from view controller (flutter/engine#9654)
d3616c7 Roll src/third_party/skia 0e0113dcbd9a..5b52c52141ac (8 commits) (flutter/engine#9665)
cea2c36 Mutators Stack refactoring (flutter/engine#9663)
6a8782f Roll src/third_party/skia 93eeff578b08..0e0113dcbd9a (9 commits) (flutter/engine#9662)
791143f ExternalViewEmbedder can CancelFrame after pre-roll (flutter/engine#9660)
d637f29 External view embedder can tell if embedded views have mutated (flutter/engine#9653)
ceee3d7 Roll src/third_party/skia 38ae3f42fec1..93eeff578b08 (1 commits) (flutter/engine#9659)
d757290 Roll src/third_party/skia febc162c7898..38ae3f42fec1 (3 commits) (flutter/engine#9658)
58133ab Roll src/third_party/skia 3de5c6388142..febc162c7898 (2 commits) (flutter/engine#9657)
29342dd Roll src/third_party/skia 1e2cb444e0c1..3de5c6388142 (8 commits) (flutter/engine#9656)
b547356 Pipeline allows continuations that can produce to front (flutter/engine#9652)
8306ee6 Move the mutators stack handling to preroll (flutter/engine#9651)
511b9f2 Roll src/third_party/skia 215ff3325230..1e2cb444e0c1 (12 commits) (flutter/engine#9650)

The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+/master/autoroll/README.md

If the roll is causing failures, please contact the current sheriff (jsimmons@google.com), and stop
the roller if necessary.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants