forked from flutter/engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay_list_paint.cc
37 lines (32 loc) · 1.52 KB
/
display_list_paint.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
// 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_paint.h"
namespace flutter {
DlPaint::DlPaint()
: blendMode_(static_cast<unsigned>(DlBlendMode::kDefaultMode)),
drawStyle_(static_cast<unsigned>(DlDrawStyle::kDefaultStyle)),
strokeCap_(static_cast<unsigned>(DlStrokeCap::kDefaultCap)),
strokeJoin_(static_cast<unsigned>(DlStrokeJoin::kDefaultJoin)),
isAntiAlias_(false),
isDither_(false),
isInvertColors_(false),
strokeWidth_(kDefaultWidth),
strokeMiter_(kDefaultMiter) {}
bool DlPaint::operator==(DlPaint const& other) const {
return blendMode_ == other.blendMode_ && //
drawStyle_ == other.drawStyle_ && //
strokeCap_ == other.strokeCap_ && //
strokeJoin_ == other.strokeJoin_ && //
isAntiAlias_ == other.isAntiAlias_ && //
isDither_ == other.isDither_ && //
isInvertColors_ == other.isInvertColors_ && //
color_ == other.color_ && //
strokeWidth_ == other.strokeWidth_ && //
strokeMiter_ == other.strokeMiter_ && //
Equals(colorSource_, other.colorSource_) && //
Equals(colorFilter_, other.colorFilter_) && //
Equals(imageFilter_, other.imageFilter_) && //
Equals(maskFilter_, other.maskFilter_);
}
} // namespace flutter