Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
liujiuri
engine
提交
8b911be0
E
engine
项目概览
liujiuri
/
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,发现更多精彩内容 >>
提交
8b911be0
编写于
10月 12, 2016
作者:
A
Adam Barth
提交者:
GitHub
10月 12, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use antialiased clips (#3124)
The Skia team tells us that these go faster.
上级
e6631a69
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
15 addition
and
17 deletion
+15
-17
flow/layers/clip_path_layer.cc
flow/layers/clip_path_layer.cc
+1
-1
flow/layers/clip_rrect_layer.cc
flow/layers/clip_rrect_layer.cc
+1
-1
lib/ui/painting/canvas.cc
lib/ui/painting/canvas.cc
+13
-15
未找到文件。
flow/layers/clip_path_layer.cc
浏览文件 @
8b911be0
...
...
@@ -21,7 +21,7 @@ void ClipPathLayer::Paint(PaintContext& context) {
TRACE_EVENT0
(
"flutter"
,
"ClipPathLayer::Paint"
);
SkAutoCanvasRestore
save
(
&
context
.
canvas
,
false
);
context
.
canvas
.
saveLayer
(
&
paint_bounds
(),
nullptr
);
context
.
canvas
.
clipPath
(
clip_path_
);
context
.
canvas
.
clipPath
(
clip_path_
,
true
);
PaintChildren
(
context
);
}
...
...
flow/layers/clip_rrect_layer.cc
浏览文件 @
8b911be0
...
...
@@ -21,7 +21,7 @@ void ClipRRectLayer::Paint(PaintContext& context) {
TRACE_EVENT0
(
"flutter"
,
"ClipRRectLayer::Paint"
);
SkAutoCanvasRestore
save
(
&
context
.
canvas
,
false
);
context
.
canvas
.
saveLayer
(
&
paint_bounds
(),
nullptr
);
context
.
canvas
.
clipRRect
(
clip_rrect_
,
kIntersect_SkClipOp
,
true
);
context
.
canvas
.
clipRRect
(
clip_rrect_
,
true
);
PaintChildren
(
context
);
}
...
...
lib/ui/painting/canvas.cc
浏览文件 @
8b911be0
...
...
@@ -8,9 +8,9 @@
#include "flutter/lib/ui/painting/image.h"
#include "flutter/lib/ui/painting/matrix.h"
#include "lib/tonic/converter/dart_converter.h"
#include "lib/tonic/dart_args.h"
#include "lib/tonic/dart_binding_macros.h"
#include "lib/tonic/converter/dart_converter.h"
#include "lib/tonic/dart_library_natives.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "third_party/skia/include/core/SkCanvas.h"
...
...
@@ -162,13 +162,13 @@ void Canvas::clipRect(double left, double top, double right, double bottom) {
void
Canvas
::
clipRRect
(
const
RRect
&
rrect
)
{
if
(
!
canvas_
)
return
;
canvas_
->
clipRRect
(
rrect
.
sk_rrect
,
SkRegion
::
kIntersect_Op
);
canvas_
->
clipRRect
(
rrect
.
sk_rrect
,
true
);
}
void
Canvas
::
clipPath
(
const
CanvasPath
*
path
)
{
if
(
!
canvas_
)
return
;
canvas_
->
clipPath
(
path
->
path
(),
SkRegion
::
kIntersect_Op
);
canvas_
->
clipPath
(
path
->
path
(),
true
);
}
void
Canvas
::
drawColor
(
SkColor
color
,
SkXfermode
::
Mode
transfer_mode
)
{
...
...
@@ -244,21 +244,19 @@ void Canvas::drawCircle(double x,
}
void
Canvas
::
drawArc
(
double
left
,
double
top
,
double
right
,
double
bottom
,
double
startAngle
,
double
sweepAngle
,
bool
useCenter
,
const
Paint
&
paint
,
const
PaintData
&
paint_data
)
{
double
top
,
double
right
,
double
bottom
,
double
startAngle
,
double
sweepAngle
,
bool
useCenter
,
const
Paint
&
paint
,
const
PaintData
&
paint_data
)
{
if
(
!
canvas_
)
return
;
canvas_
->
drawArc
(
SkRect
::
MakeLTRB
(
left
,
top
,
right
,
bottom
),
startAngle
*
180.0
/
M_PI
,
sweepAngle
*
180.0
/
M_PI
,
useCenter
,
*
paint
.
paint
());
startAngle
*
180.0
/
M_PI
,
sweepAngle
*
180.0
/
M_PI
,
useCenter
,
*
paint
.
paint
());
}
void
Canvas
::
drawPath
(
const
CanvasPath
*
path
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录