Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
dl_paint.cc
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#include "flutter/display_list/dl_paint.h"
6
7namespace flutter {
8
10 : blend_mode_(static_cast<unsigned>(DlBlendMode::kDefaultMode)),
11 draw_style_(static_cast<unsigned>(DlDrawStyle::kDefaultStyle)),
12 stroke_cap_(static_cast<unsigned>(DlStrokeCap::kDefaultCap)),
13 stroke_join_(static_cast<unsigned>(DlStrokeJoin::kDefaultJoin)),
14 is_anti_alias_(false),
15 is_invert_colors_(false),
16 color_(color),
17 stroke_width_(kDefaultWidth),
18 stroke_miter_(kDefaultMiter) {}
19
20bool DlPaint::operator==(DlPaint const& other) const {
21 return blend_mode_ == other.blend_mode_ && //
22 draw_style_ == other.draw_style_ && //
23 stroke_cap_ == other.stroke_cap_ && //
24 stroke_join_ == other.stroke_join_ && //
25 is_anti_alias_ == other.is_anti_alias_ && //
27 color_ == other.color_ && //
28 stroke_width_ == other.stroke_width_ && //
29 stroke_miter_ == other.stroke_miter_ && //
30 Equals(color_source_, other.color_source_) && //
31 Equals(color_filter_, other.color_filter_) && //
32 Equals(image_filter_, other.image_filter_) && //
33 Equals(mask_filter_, other.mask_filter_) && //
34 Equals(path_effect_, other.path_effect_);
35}
36
38
39} // namespace flutter
SkColor4f color
static int kDefaultWidth
Definition Request.cpp:23
bool operator==(DlPaint const &other) const
Definition dl_paint.cc:20
static const DlPaint kDefault
Definition dl_paint.h:53
unsigned is_anti_alias_
Definition dl_paint.h:218
unsigned stroke_cap_
Definition dl_paint.h:216
unsigned is_invert_colors_
Definition dl_paint.h:219
unsigned draw_style_
Definition dl_paint.h:215
unsigned blend_mode_
Definition dl_paint.h:214
unsigned stroke_join_
Definition dl_paint.h:217
DlStrokeJoin
Definition dl_paint.h:38
bool Equals(const T *a, const T *b)
DlStrokeCap
Definition dl_paint.h:29
DlDrawStyle
Definition dl_paint.h:20