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

Commit 712572a

Browse files
author
Kaushik Iska
committed
Revert "Wire up Opacity on Fuchsia, round 2 (#14024)"
This reverts commit d117ac9.
1 parent 07429c1 commit 712572a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+488
-674
lines changed

ci/licenses_golden/licenses_flutter

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ FILE: ../../../flutter/flow/layers/color_filter_layer_unittests.cc
4848
FILE: ../../../flutter/flow/layers/container_layer.cc
4949
FILE: ../../../flutter/flow/layers/container_layer.h
5050
FILE: ../../../flutter/flow/layers/container_layer_unittests.cc
51-
FILE: ../../../flutter/flow/layers/elevated_container_layer.cc
52-
FILE: ../../../flutter/flow/layers/elevated_container_layer.h
53-
FILE: ../../../flutter/flow/layers/fuchsia_system_composited_layer.cc
54-
FILE: ../../../flutter/flow/layers/fuchsia_system_composited_layer.h
5551
FILE: ../../../flutter/flow/layers/layer.cc
5652
FILE: ../../../flutter/flow/layers/layer.h
5753
FILE: ../../../flutter/flow/layers/layer_tree.cc

flow/BUILD.gn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ source_set("flow") {
2828
"layers/color_filter_layer.h",
2929
"layers/container_layer.cc",
3030
"layers/container_layer.h",
31-
"layers/elevated_container_layer.cc",
32-
"layers/elevated_container_layer.h",
3331
"layers/layer.cc",
3432
"layers/layer.h",
3533
"layers/layer_tree.cc",
@@ -78,8 +76,6 @@ source_set("flow") {
7876
sources += [
7977
"layers/child_scene_layer.cc",
8078
"layers/child_scene_layer.h",
81-
"layers/fuchsia_system_composited_layer.cc",
82-
"layers/fuchsia_system_composited_layer.h",
8379
"scene_update_context.cc",
8480
"scene_update_context.h",
8581
"view_holder.cc",

flow/layers/child_scene_layer.cc

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,25 +20,10 @@ ChildSceneLayer::ChildSceneLayer(zx_koid_t layer_id,
2020
void ChildSceneLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {
2121
TRACE_EVENT0("flutter", "ChildSceneLayer::Preroll");
2222
set_needs_system_composite(true);
23-
24-
// An alpha "hole punch" is required if the frame behind us is not opaque.
25-
if (!context->is_opaque) {
26-
set_paint_bounds(
27-
SkRect::MakeXYWH(offset_.fX, offset_.fY, size_.fWidth, size_.fHeight));
28-
}
2923
}
3024

3125
void ChildSceneLayer::Paint(PaintContext& context) const {
32-
TRACE_EVENT0("flutter", "ChildSceneLayer::Paint");
33-
FML_DCHECK(needs_painting());
34-
35-
// If we are being rendered into our own frame using the system compositor,
36-
// then it is neccesary to "punch a hole" in the canvas/frame behind us so
37-
// that group opacity looks correct.
38-
SkPaint paint;
39-
paint.setColor(SK_ColorTRANSPARENT);
40-
paint.setBlendMode(SkBlendMode::kSrc);
41-
context.leaf_nodes_canvas->drawRect(paint_bounds(), paint);
26+
FML_NOTREACHED() << "This layer never needs painting.";
4227
}
4328

4429
void ChildSceneLayer::UpdateScene(SceneUpdateContext& context) {

flow/layers/container_layer.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ namespace flutter {
99
ContainerLayer::ContainerLayer() {}
1010

1111
void ContainerLayer::Add(std::shared_ptr<Layer> layer) {
12-
layers_.emplace_back(std::move(layer));
12+
layer->set_parent(this);
13+
layers_.push_back(std::move(layer));
1314
}
1415

1516
void ContainerLayer::Preroll(PrerollContext* context, const SkMatrix& matrix) {

flow/layers/container_layer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class ContainerLayer : public Layer {
1414
public:
1515
ContainerLayer();
1616

17-
virtual void Add(std::shared_ptr<Layer> layer);
17+
void Add(std::shared_ptr<Layer> layer);
1818

1919
void Preroll(PrerollContext* context, const SkMatrix& matrix) override;
2020
void Paint(PaintContext& context) const override;

flow/layers/elevated_container_layer.cc

Lines changed: 0 additions & 49 deletions
This file was deleted.

flow/layers/elevated_container_layer.h

Lines changed: 0 additions & 34 deletions
This file was deleted.

flow/layers/fuchsia_system_composited_layer.cc

Lines changed: 0 additions & 55 deletions
This file was deleted.

flow/layers/fuchsia_system_composited_layer.h

Lines changed: 0 additions & 37 deletions
This file was deleted.

flow/layers/layer.cc

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
namespace flutter {
1111

1212
Layer::Layer()
13-
: paint_bounds_(SkRect::MakeEmpty()),
14-
unique_id_(NextUniqueID()),
15-
needs_system_composite_(false) {}
13+
: parent_(nullptr),
14+
needs_system_composite_(false),
15+
paint_bounds_(SkRect::MakeEmpty()),
16+
unique_id_(NextUniqueID()) {}
1617

1718
Layer::~Layer() = default;
1819

0 commit comments

Comments
 (0)