This repository was archived by the owner on Feb 25, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6k
Display list multiplexer #35421
Merged
Merged
Display list multiplexer #35421
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
5e7197f
add DisplayListBuilderMultiplexer to mimic SkNWayCanvas
flar 5f0e882
formatting
flar 06ef065
fix test failures
flar 83bf820
fix Fuchsia build problem
flar abc3b79
implement new methods in GfxExternalViewEmbedder
flar 7e693fd
fix return values in Fuchsia code
flar 237f664
switch to auto* declarations and add comment for new method
flar 7b0055d
auto* instead of auto
flar b609fa9
fix Fuchsia mock embedder
flar bcf398e
more Mock embedder implementations and test iOS builders
flar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| #include "flutter/display_list/display_list_builder_multiplexer.h" | ||
|
|
||
| namespace flutter { | ||
|
|
||
| void DisplayListBuilderMultiplexer::addBuilder(DisplayListBuilder* builder) { | ||
| builders_.push_back(builder); | ||
| } | ||
|
|
||
| void DisplayListBuilderMultiplexer::saveLayer( | ||
| const SkRect* bounds, | ||
| const DlPaint* paint, | ||
| const DlImageFilter* backdrop_filter) { | ||
| for (auto* builder : builders_) { | ||
| builder->saveLayer(bounds, paint, backdrop_filter); | ||
| } | ||
| } | ||
|
|
||
| void DisplayListBuilderMultiplexer::restore() { | ||
| for (auto* builder : builders_) { | ||
| builder->restore(); | ||
| } | ||
| } | ||
|
|
||
| } // namespace flutter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| // Copyright 2013 The Flutter Authors. All rights reserved. | ||
| // Use of this source code is governed by a BSD-style license that can be | ||
| // found in the LICENSE file. | ||
|
|
||
| #ifndef FLUTTER_DISPLAY_LIST_DISPLAY_LIST_BUILDER_MULTIPLEXER_H_ | ||
| #define FLUTTER_DISPLAY_LIST_DISPLAY_LIST_BUILDER_MULTIPLEXER_H_ | ||
|
|
||
| #include "flutter/display_list/display_list_builder.h" | ||
| #include "flutter/display_list/display_list_image_filter.h" | ||
| #include "flutter/display_list/display_list_paint.h" | ||
| #include "flutter/fml/macros.h" | ||
|
|
||
| namespace flutter { | ||
|
|
||
| /// A class that mutiplexes some of the DisplayListBuilder calls to multiple | ||
| /// other builders. For now it only implements saveLayer and restore as those | ||
| /// are needed to create a replacement for PaintContext::internal_nodes_canvas. | ||
| class DisplayListBuilderMultiplexer { | ||
| public: | ||
| DisplayListBuilderMultiplexer() = default; | ||
|
|
||
| void addBuilder(DisplayListBuilder* builder); | ||
|
|
||
| void saveLayer(const SkRect* bounds, | ||
| const DlPaint* paint, | ||
| const DlImageFilter* backdrop_filter = nullptr); | ||
|
|
||
| void restore(); | ||
|
|
||
| private: | ||
| std::vector<DisplayListBuilder*> builders_; | ||
| }; | ||
|
|
||
| } // namespace flutter | ||
|
|
||
| #endif // FLUTTER_DISPLAY_LIST_DISPLAY_LIST_BUILDER_MULTIPLEXER_H_ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,6 +66,7 @@ class MockExternalViewEmbedder : public ExternalViewEmbedder { | |
| PostPrerollResult( | ||
| fml::RefPtr<fml::RasterThreadMerger> raster_thread_merger)); | ||
| MOCK_METHOD0(GetCurrentCanvases, std::vector<SkCanvas*>()); | ||
| MOCK_METHOD0(GetCurrentBuilders, std::vector<DisplayListBuilder*>()); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Test failed in here: |
||
| MOCK_METHOD1(CompositeEmbeddedView, EmbedderPaintContext(int view_id)); | ||
| MOCK_METHOD2(SubmitFrame, | ||
| void(GrDirectContext* context, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.