Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
5944867c
E
engine
项目概览
weixin_43355755
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
E
engine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
5944867c
编写于
4月 04, 2019
作者:
R
reed-at-google
提交者:
GitHub
4月 04, 2019
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update to use SkTileMode (#8439)
上级
ad9d2417
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
15 addition
and
15 deletion
+15
-15
flow/paint_utils.cc
flow/paint_utils.cc
+2
-2
lib/ui/painting/gradient.cc
lib/ui/painting/gradient.cc
+4
-4
lib/ui/painting/gradient.h
lib/ui/painting/gradient.h
+5
-5
lib/ui/painting/image_shader.cc
lib/ui/painting/image_shader.cc
+2
-2
lib/ui/painting/image_shader.h
lib/ui/painting/image_shader.h
+2
-2
未找到文件。
flow/paint_utils.cc
浏览文件 @
5944867c
...
...
@@ -20,8 +20,8 @@ sk_sp<SkShader> CreateCheckerboardShader(SkColor c1, SkColor c2, int size) {
bm
.
eraseColor
(
c1
);
bm
.
eraseArea
(
SkIRect
::
MakeLTRB
(
0
,
0
,
size
,
size
),
c2
);
bm
.
eraseArea
(
SkIRect
::
MakeLTRB
(
size
,
size
,
2
*
size
,
2
*
size
),
c2
);
return
SkShader
::
MakeBitmapShader
(
bm
,
Sk
Shader
::
kRepeat_TileMode
,
Sk
Shader
::
kRepeat_TileMode
);
return
SkShader
::
MakeBitmapShader
(
bm
,
Sk
TileMode
::
kRepeat
,
Sk
TileMode
::
kRepeat
);
}
}
// anonymous namespace
...
...
lib/ui/painting/gradient.cc
浏览文件 @
5944867c
...
...
@@ -42,7 +42,7 @@ fml::RefPtr<CanvasGradient> CanvasGradient::Create() {
void
CanvasGradient
::
initLinear
(
const
tonic
::
Float32List
&
end_points
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
)
{
SkTileMode
tile_mode
)
{
FML_DCHECK
(
end_points
.
num_elements
()
==
4
);
FML_DCHECK
(
colors
.
num_elements
()
==
color_stops
.
num_elements
()
||
color_stops
.
data
()
==
nullptr
);
...
...
@@ -63,7 +63,7 @@ void CanvasGradient::initRadial(double center_x,
double
radius
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
,
SkTileMode
tile_mode
,
const
tonic
::
Float64List
&
matrix4
)
{
FML_DCHECK
(
colors
.
num_elements
()
==
color_stops
.
num_elements
()
||
color_stops
.
data
()
==
nullptr
);
...
...
@@ -87,7 +87,7 @@ void CanvasGradient::initSweep(double center_x,
double
center_y
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
,
SkTileMode
tile_mode
,
double
start_angle
,
double
end_angle
,
const
tonic
::
Float64List
&
matrix4
)
{
...
...
@@ -118,7 +118,7 @@ void CanvasGradient::initTwoPointConical(double start_x,
double
end_radius
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
,
SkTileMode
tile_mode
,
const
tonic
::
Float64List
&
matrix4
)
{
FML_DCHECK
(
colors
.
num_elements
()
==
color_stops
.
num_elements
()
||
color_stops
.
data
()
==
nullptr
);
...
...
lib/ui/painting/gradient.h
浏览文件 @
5944867c
...
...
@@ -20,7 +20,7 @@ class DartLibraryNatives;
namespace
blink
{
// TODO: update this if/when Skia adds Decal mode skbug.com/7638
static_assert
(
SkShader
::
kTileModeCount
>=
3
,
"Need to update tile mode enum"
);
static_assert
(
kS
kTileModeCount
>=
3
,
"Need to update tile mode enum"
);
class
CanvasGradient
:
public
Shader
{
DEFINE_WRAPPERTYPEINFO
();
...
...
@@ -33,21 +33,21 @@ class CanvasGradient : public Shader {
void
initLinear
(
const
tonic
::
Float32List
&
end_points
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
);
SkTileMode
tile_mode
);
void
initRadial
(
double
center_x
,
double
center_y
,
double
radius
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
,
SkTileMode
tile_mode
,
const
tonic
::
Float64List
&
matrix4
);
void
initSweep
(
double
center_x
,
double
center_y
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
,
SkTileMode
tile_mode
,
double
start_angle
,
double
end_angle
,
const
tonic
::
Float64List
&
matrix4
);
...
...
@@ -60,7 +60,7 @@ class CanvasGradient : public Shader {
double
end_radius
,
const
tonic
::
Int32List
&
colors
,
const
tonic
::
Float32List
&
color_stops
,
Sk
Shader
::
TileMode
tile_mode
,
SkTileMode
tile_mode
,
const
tonic
::
Float64List
&
matrix4
);
static
void
RegisterNatives
(
tonic
::
DartLibraryNatives
*
natives
);
...
...
lib/ui/painting/image_shader.cc
浏览文件 @
5944867c
...
...
@@ -35,8 +35,8 @@ fml::RefPtr<ImageShader> ImageShader::Create() {
}
void
ImageShader
::
initWithImage
(
CanvasImage
*
image
,
Sk
Shader
::
TileMode
tmx
,
Sk
Shader
::
TileMode
tmy
,
SkTileMode
tmx
,
SkTileMode
tmy
,
const
tonic
::
Float64List
&
matrix4
)
{
if
(
!
image
)
{
Dart_ThrowException
(
...
...
lib/ui/painting/image_shader.h
浏览文件 @
5944867c
...
...
@@ -29,8 +29,8 @@ class ImageShader : public Shader {
static
fml
::
RefPtr
<
ImageShader
>
Create
();
void
initWithImage
(
CanvasImage
*
image
,
Sk
Shader
::
TileMode
tmx
,
Sk
Shader
::
TileMode
tmy
,
SkTileMode
tmx
,
SkTileMode
tmy
,
const
tonic
::
Float64List
&
matrix4
);
static
void
RegisterNatives
(
tonic
::
DartLibraryNatives
*
natives
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录