Skip to content

Commit

Permalink
Revert "Split DisplayListBuilder into DlCanvas optimizer and DlOp rec…
Browse files Browse the repository at this point in the history
…order classes" (flutter#44968)

Reverts flutter#44718

A rendering issue was discovered in internal testing (b/296975714)
  • Loading branch information
flar authored Aug 22, 2023
1 parent 28b8bd5 commit dcb3fe0
Show file tree
Hide file tree
Showing 61 changed files with 3,556 additions and 3,726 deletions.
16 changes: 4 additions & 12 deletions ci/licenses_golden/licenses_flutter
Original file line number Diff line number Diff line change
Expand Up @@ -717,22 +717,18 @@ ORIGIN: ../../../flutter/display_list/benchmarking/dl_complexity_metal.h + ../..
ORIGIN: ../../../flutter/display_list/benchmarking/dl_region_benchmarks.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/display_list.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/display_list.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/display_list_builder.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/display_list_builder.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_attributes.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_blend_mode.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_blend_mode.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_builder.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_builder.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_canvas.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_canvas.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_canvas_to_receiver.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_canvas_to_receiver.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_color.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_flags.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_flags.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_receiver.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_receiver.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_recorder.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_recorder.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_records.cc + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_op_records.h + ../../../flutter/LICENSE
ORIGIN: ../../../flutter/display_list/dl_paint.cc + ../../../flutter/LICENSE
Expand Down Expand Up @@ -3444,22 +3440,18 @@ FILE: ../../../flutter/display_list/benchmarking/dl_complexity_metal.h
FILE: ../../../flutter/display_list/benchmarking/dl_region_benchmarks.cc
FILE: ../../../flutter/display_list/display_list.cc
FILE: ../../../flutter/display_list/display_list.h
FILE: ../../../flutter/display_list/display_list_builder.cc
FILE: ../../../flutter/display_list/display_list_builder.h
FILE: ../../../flutter/display_list/dl_attributes.h
FILE: ../../../flutter/display_list/dl_blend_mode.cc
FILE: ../../../flutter/display_list/dl_blend_mode.h
FILE: ../../../flutter/display_list/dl_builder.cc
FILE: ../../../flutter/display_list/dl_builder.h
FILE: ../../../flutter/display_list/dl_canvas.cc
FILE: ../../../flutter/display_list/dl_canvas.h
FILE: ../../../flutter/display_list/dl_canvas_to_receiver.cc
FILE: ../../../flutter/display_list/dl_canvas_to_receiver.h
FILE: ../../../flutter/display_list/dl_color.h
FILE: ../../../flutter/display_list/dl_op_flags.cc
FILE: ../../../flutter/display_list/dl_op_flags.h
FILE: ../../../flutter/display_list/dl_op_receiver.cc
FILE: ../../../flutter/display_list/dl_op_receiver.h
FILE: ../../../flutter/display_list/dl_op_recorder.cc
FILE: ../../../flutter/display_list/dl_op_recorder.h
FILE: ../../../flutter/display_list/dl_op_records.cc
FILE: ../../../flutter/display_list/dl_op_records.h
FILE: ../../../flutter/display_list/dl_paint.cc
Expand Down
8 changes: 2 additions & 6 deletions display_list/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -25,22 +25,18 @@ source_set("display_list") {
"benchmarking/dl_complexity_metal.h",
"display_list.cc",
"display_list.h",
"display_list_builder.cc",
"display_list_builder.h",
"dl_attributes.h",
"dl_blend_mode.cc",
"dl_blend_mode.h",
"dl_builder.cc",
"dl_builder.h",
"dl_canvas.cc",
"dl_canvas.h",
"dl_canvas_to_receiver.cc",
"dl_canvas_to_receiver.h",
"dl_color.h",
"dl_op_flags.cc",
"dl_op_flags.h",
"dl_op_receiver.cc",
"dl_op_receiver.h",
"dl_op_recorder.cc",
"dl_op_recorder.h",
"dl_op_records.cc",
"dl_op_records.h",
"dl_paint.cc",
Expand Down
2 changes: 1 addition & 1 deletion display_list/benchmarking/dl_benchmarks.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// found in the LICENSE file.

#include "flutter/display_list/benchmarking/dl_benchmarks.h"
#include "flutter/display_list/display_list_builder.h"
#include "flutter/display_list/dl_builder.h"
#include "flutter/display_list/dl_op_flags.h"
#include "flutter/display_list/skia/dl_sk_canvas.h"

Expand Down
8 changes: 4 additions & 4 deletions display_list/benchmarking/dl_complexity_gl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ void DisplayListGLComplexityCalculator::GLHelper::drawVertices(
}

void DisplayListGLComplexityCalculator::GLHelper::drawImage(
const sk_sp<DlImage>& image,
const sk_sp<DlImage> image,
const SkPoint point,
DlImageSampling sampling,
bool render_with_attributes) {
Expand Down Expand Up @@ -583,7 +583,7 @@ void DisplayListGLComplexityCalculator::GLHelper::ImageRect(
}

void DisplayListGLComplexityCalculator::GLHelper::drawImageNine(
const sk_sp<DlImage>& image,
const sk_sp<DlImage> image,
const SkIRect& center,
const SkRect& dst,
DlFilterMode filter,
Expand All @@ -608,7 +608,7 @@ void DisplayListGLComplexityCalculator::GLHelper::drawImageNine(
}

void DisplayListGLComplexityCalculator::GLHelper::drawDisplayList(
const sk_sp<DisplayList>& display_list,
const sk_sp<DisplayList> display_list,
SkScalar opacity) {
if (IsComplex()) {
return;
Expand All @@ -622,7 +622,7 @@ void DisplayListGLComplexityCalculator::GLHelper::drawDisplayList(
}

void DisplayListGLComplexityCalculator::GLHelper::drawTextBlob(
const sk_sp<SkTextBlob>& blob,
const sk_sp<SkTextBlob> blob,
SkScalar x,
SkScalar y) {
if (IsComplex()) {
Expand Down
8 changes: 4 additions & 4 deletions display_list/benchmarking/dl_complexity_gl.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ class DisplayListGLComplexityCalculator
uint32_t count,
const SkPoint points[]) override;
void drawVertices(const DlVertices* vertices, DlBlendMode mode) override;
void drawImage(const sk_sp<DlImage>& image,
void drawImage(const sk_sp<DlImage> image,
const SkPoint point,
DlImageSampling sampling,
bool render_with_attributes) override;
void drawImageNine(const sk_sp<DlImage>& image,
void drawImageNine(const sk_sp<DlImage> image,
const SkIRect& center,
const SkRect& dst,
DlFilterMode filter,
bool render_with_attributes) override;
void drawDisplayList(const sk_sp<DisplayList>& display_list,
void drawDisplayList(const sk_sp<DisplayList> display_list,
SkScalar opacity) override;
void drawTextBlob(const sk_sp<SkTextBlob>& blob,
void drawTextBlob(const sk_sp<SkTextBlob> blob,
SkScalar x,
SkScalar y) override;
void drawShadow(const SkPath& path,
Expand Down
4 changes: 2 additions & 2 deletions display_list/benchmarking/dl_complexity_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ class ComplexityCalculatorHelper
}

void drawImageRect(
const sk_sp<DlImage>& image,
const sk_sp<DlImage> image,
const SkRect& src,
const SkRect& dst,
DlImageSampling sampling,
Expand All @@ -159,7 +159,7 @@ class ComplexityCalculatorHelper
render_with_attributes, constraint == SrcRectConstraint::kStrict);
}

void drawAtlas(const sk_sp<DlImage>& atlas,
void drawAtlas(const sk_sp<DlImage> atlas,
const SkRSXform xform[],
const SkRect tex[],
const DlColor colors[],
Expand Down
8 changes: 4 additions & 4 deletions display_list/benchmarking/dl_complexity_metal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ void DisplayListMetalComplexityCalculator::MetalHelper::drawVertices(
}

void DisplayListMetalComplexityCalculator::MetalHelper::drawImage(
const sk_sp<DlImage>& image,
const sk_sp<DlImage> image,
const SkPoint point,
DlImageSampling sampling,
bool render_with_attributes) {
Expand Down Expand Up @@ -532,7 +532,7 @@ void DisplayListMetalComplexityCalculator::MetalHelper::ImageRect(
}

void DisplayListMetalComplexityCalculator::MetalHelper::drawImageNine(
const sk_sp<DlImage>& image,
const sk_sp<DlImage> image,
const SkIRect& center,
const SkRect& dst,
DlFilterMode filter,
Expand All @@ -552,7 +552,7 @@ void DisplayListMetalComplexityCalculator::MetalHelper::drawImageNine(
}

void DisplayListMetalComplexityCalculator::MetalHelper::drawDisplayList(
const sk_sp<DisplayList>& display_list,
const sk_sp<DisplayList> display_list,
SkScalar opacity) {
if (IsComplex()) {
return;
Expand All @@ -566,7 +566,7 @@ void DisplayListMetalComplexityCalculator::MetalHelper::drawDisplayList(
}

void DisplayListMetalComplexityCalculator::MetalHelper::drawTextBlob(
const sk_sp<SkTextBlob>& blob,
const sk_sp<SkTextBlob> blob,
SkScalar x,
SkScalar y) {
if (IsComplex()) {
Expand Down
8 changes: 4 additions & 4 deletions display_list/benchmarking/dl_complexity_metal.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,18 @@ class DisplayListMetalComplexityCalculator
uint32_t count,
const SkPoint points[]) override;
void drawVertices(const DlVertices* vertices, DlBlendMode mode) override;
void drawImage(const sk_sp<DlImage>& image,
void drawImage(const sk_sp<DlImage> image,
const SkPoint point,
DlImageSampling sampling,
bool render_with_attributes) override;
void drawImageNine(const sk_sp<DlImage>& image,
void drawImageNine(const sk_sp<DlImage> image,
const SkIRect& center,
const SkRect& dst,
DlFilterMode filter,
bool render_with_attributes) override;
void drawDisplayList(const sk_sp<DisplayList>& display_list,
void drawDisplayList(const sk_sp<DisplayList> display_list,
SkScalar opacity) override;
void drawTextBlob(const sk_sp<SkTextBlob>& blob,
void drawTextBlob(const sk_sp<SkTextBlob> blob,
SkScalar x,
SkScalar y) override;
void drawShadow(const SkPath& path,
Expand Down
4 changes: 2 additions & 2 deletions display_list/benchmarking/dl_complexity_unittests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "flutter/display_list/benchmarking/dl_complexity_gl.h"
#include "flutter/display_list/benchmarking/dl_complexity_metal.h"
#include "flutter/display_list/display_list.h"
#include "flutter/display_list/display_list_builder.h"
#include "flutter/display_list/dl_builder.h"
#include "flutter/display_list/dl_sampling_options.h"
#include "flutter/display_list/testing/dl_test_snippets.h"
#include "flutter/testing/testing.h"
Expand Down Expand Up @@ -102,7 +102,7 @@ TEST(DisplayListComplexity, StrokeWidth) {
auto display_list_stroke_0 = builder_stroke_0.Build();

DisplayListBuilder builder_stroke_1;
builder_stroke_1.DrawLine(SkPoint::Make(0, 0), SkPoint::Make(100, 100),
builder_stroke_0.DrawLine(SkPoint::Make(0, 0), SkPoint::Make(100, 100),
DlPaint().setStrokeWidth(1.0f));
auto display_list_stroke_1 = builder_stroke_1.Build();

Expand Down
Loading

0 comments on commit dcb3fe0

Please sign in to comment.