Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
dl_op_flags.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_op_flags.h"
6#include "flutter/display_list/effects/dl_path_effect.h"
7
8namespace flutter {
9
11 const DlPathEffect* effect,
12 bool is_stroked) const {
13 if (is_geometric() && effect) {
14 switch (effect->type()) {
16 // Dashing has no effect on filled geometry.
17 if (is_stroked) {
18 // A dash effect has a very simple impact. It cannot introduce any
19 // miter joins that weren't already present in the original path
20 // and it does not grow the bounds of the path, but it can add
21 // end caps to areas that might not have had them before so all
22 // we need to do is to indicate the potential for diagonal
23 // end caps and move on.
24 return special_flags_.with(kMayHaveCaps | kMayHaveDiagonalCaps);
25 }
26 }
27 }
28 }
29 return special_flags_;
30}
31
32} // namespace flutter
constexpr bool is_stroked(DlDrawStyle style=DlDrawStyle::kStroke) const
constexpr bool is_geometric() const
const DisplayListSpecialGeometryFlags WithPathEffect(const DlPathEffect *effect, bool is_stroked) const
static constexpr int kMayHaveDiagonalCaps
Definition dl_op_flags.h:65
static constexpr int kMayHaveCaps
Definition dl_op_flags.h:53
virtual T type() const =0