Flutter Engine Uber Docs
Docs for the entire Flutter Engine repo.
Loading...
Searching...
No Matches
dl_linear_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_linear_gradient_color_source.h
"
6
7
namespace
flutter
{
8
9
DlLinearGradientColorSource::DlLinearGradientColorSource(
10
const
DlLinearGradientColorSource* source)
11
: DlGradientColorSourceBase(source->stop_count(),
12
source->tile_mode(),
13
source->matrix_ptr()),
14
start_point_(source->start_point()),
15
end_point_(source->end_point()) {
16
store_color_stops(
this
+ 1, source->colors(), source->stops());
17
}
18
19
std::shared_ptr<DlColorSource> DlLinearGradientColorSource::shared()
const
{
20
return
MakeLinear(start_point_, end_point_, stop_count(), colors(), stops(),
21
tile_mode(), matrix_ptr());
22
}
23
24
bool
DlLinearGradientColorSource::equals_(
DlColorSource
const
& other)
const
{
25
FML_DCHECK
(other.
type
() == DlColorSourceType::kLinearGradient);
26
auto
that =
static_cast<
DlLinearGradientColorSource
const*
>
(&other);
27
return
(start_point_ == that->start_point_ &&
28
end_point_ == that->end_point_ && base_equals_(that));
29
}
30
31
}
// namespace flutter
flutter::DlAttribute::type
virtual T type() const =0
flutter::DlColorSource
Definition
dl_color_source.h:44
flutter::DlLinearGradientColorSource
Definition
dl_linear_gradient_color_source.h:12
dl_linear_gradient_color_source.h
FML_DCHECK
#define FML_DCHECK(condition)
Definition
logging.h:122
flutter
Definition
asset_manager.cc:10
display_list
effects
color_sources
dl_linear_gradient_color_source.cc
Generated on Tue Dec 2 2025 04:46:37 for Flutter Engine Uber Docs by
1.9.8