Flutter Engine
Loading...
Searching...
No Matches
dl_sweep_gradient_color_source.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/effects/color_sources/dl_sweep_gradient_color_source.h
"
6
7
namespace
flutter
{
8
9
DlSweepGradientColorSource::DlSweepGradientColorSource(
10
const
DlSweepGradientColorSource* source)
11
: DlGradientColorSourceBase(source->stop_count(),
12
source->tile_mode(),
13
source->matrix_ptr()),
14
center_(source->
center
()),
15
start_(source->
start
()),
16
end_(source->
end
()) {
17
store_color_stops(
this
+ 1, source->colors(), source->stops());
18
}
19
20
std::shared_ptr<DlColorSource> DlSweepGradientColorSource::shared()
const
{
21
return
MakeSweep(center_, start_, end_, stop_count(), colors(), stops(),
22
tile_mode(), matrix_ptr());
23
}
24
25
bool
DlSweepGradientColorSource::equals_(
DlColorSource
const
& other)
const
{
26
FML_DCHECK
(other.
type
() == DlColorSourceType::kSweepGradient);
27
auto
that =
static_cast<
DlSweepGradientColorSource
const*
>
(&other);
28
return
(center_ == that->center_ && start_ == that->start_ &&
29
end_ == that->end_ && base_equals_(that));
30
}
31
32
}
// namespace flutter
flutter::DlAttribute::type
virtual T type() const =0
flutter::DlColorSource
Definition
dl_color_source.h:44
flutter::DlSweepGradientColorSource
Definition
dl_sweep_gradient_color_source.h:12
dl_sweep_gradient_color_source.h
FML_DCHECK
#define FML_DCHECK(condition)
Definition
logging.h:122
flutter
Definition
asset_manager.cc:10
txt::TextAlign::center
@ center
start
const size_t start
Definition
tessellator_libtess.cc:62
end
const size_t end
Definition
tessellator_libtess.cc:63
display_list
effects
color_sources
dl_sweep_gradient_color_source.cc
Generated on Thu Nov 6 2025 16:11:21 for Flutter Engine by
1.9.8