Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Delete base_quals, check array equal first
  • Loading branch information
JsouLiang committed May 9, 2022
commit 42710b39abf1eab1d650dac5e8100f46dd15004f
13 changes: 4 additions & 9 deletions display_list/display_list_path_effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#ifndef FLUTTER_DISPLAY_LIST_DISPLAY_LIST_PATH_EFFECT_H_
#define FLUTTER_DISPLAY_LIST_DISPLAY_LIST_PATH_EFFECT_H_

#include <cstring>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this used?

#include "flutter/display_list/display_list_attributes.h"
#include "flutter/display_list/types.h"
#include "flutter/fml/logging.h"
Expand Down Expand Up @@ -95,8 +96,8 @@ class DlDashPathEffect final : public DlPathEffect {
bool equals_(DlPathEffect const& other) const override {
FML_DCHECK(other.type() == DlPathEffectType::kDash);
auto that = static_cast<DlDashPathEffect const*>(&other);
return count_ == that->count_ && base_equals_(that) &&
phase_ == that->phase_;
return memcmp(pods(), that->pods(), count_) == 0 &&
count_ == that->count_ && phase_ == that->phase_;
}

private:
Expand All @@ -106,13 +107,7 @@ class DlDashPathEffect final : public DlPathEffect {

bool base_equals_(DlDashPathEffect const* other) const {
// intervals not nullptr, that has value
if (other != nullptr) {
for (int i = 0; i < count_; i++) {
if (pods()[i] != other->pods()[i]) {
return false;
}
}
}

return true;
}

Expand Down