Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
c0f1e3b4
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,发现更多精彩内容 >>
提交
c0f1e3b4
编写于
4月 27, 2017
作者:
J
Jason Simmons
提交者:
GitHub
4月 27, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Change the shadow elevation parameter to floating point (#3637)
上级
8d6ded45
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
12 addition
and
12 deletion
+12
-12
flow/layers/physical_model_layer.cc
flow/layers/physical_model_layer.cc
+1
-1
flow/layers/physical_model_layer.h
flow/layers/physical_model_layer.h
+3
-3
lib/ui/compositing.dart
lib/ui/compositing.dart
+2
-2
lib/ui/compositing/scene_builder.cc
lib/ui/compositing/scene_builder.cc
+1
-1
lib/ui/compositing/scene_builder.h
lib/ui/compositing/scene_builder.h
+1
-1
lib/ui/painting.dart
lib/ui/painting.dart
+2
-2
lib/ui/painting/canvas.cc
lib/ui/painting/canvas.cc
+1
-1
lib/ui/painting/canvas.h
lib/ui/painting/canvas.h
+1
-1
未找到文件。
flow/layers/physical_model_layer.cc
浏览文件 @
c0f1e3b4
...
...
@@ -72,7 +72,7 @@ void PhysicalModelLayer::Paint(PaintContext& context) {
}
void
PhysicalModelLayer
::
DrawShadow
(
SkCanvas
*
canvas
,
const
SkPath
&
path
,
SkColor
color
,
int
elevation
,
SkColor
color
,
double
elevation
,
bool
transparentOccluder
)
{
SkShadowFlags
flags
=
transparentOccluder
?
SkShadowFlags
::
kTransparentOccluder_ShadowFlag
:
...
...
flow/layers/physical_model_layer.h
浏览文件 @
c0f1e3b4
...
...
@@ -15,11 +15,11 @@ class PhysicalModelLayer : public ContainerLayer {
~
PhysicalModelLayer
()
override
;
void
set_rrect
(
const
SkRRect
&
rrect
)
{
rrect_
=
rrect
;
}
void
set_elevation
(
int
elevation
)
{
elevation_
=
elevation
;
}
void
set_elevation
(
double
elevation
)
{
elevation_
=
elevation
;
}
void
set_color
(
SkColor
color
)
{
color_
=
color
;
}
static
void
DrawShadow
(
SkCanvas
*
canvas
,
const
SkPath
&
path
,
SkColor
color
,
int
elevation
,
bool
transparentOccluder
);
SkColor
color
,
double
elevation
,
bool
transparentOccluder
);
protected:
void
Preroll
(
PrerollContext
*
context
,
const
SkMatrix
&
matrix
)
override
;
...
...
@@ -32,7 +32,7 @@ class PhysicalModelLayer : public ContainerLayer {
private:
SkRRect
rrect_
;
int
elevation_
;
double
elevation_
;
SkColor
color_
;
};
...
...
lib/ui/compositing.dart
浏览文件 @
c0f1e3b4
...
...
@@ -132,11 +132,11 @@ class SceneBuilder extends NativeFieldWrapperClass2 {
/// Rasterization will be clipped to the given shape.
///
/// See [pop] for details about the operation stack.
void
pushPhysicalModel
({
RRect
rrect
,
int
elevation
,
Color
color
})
{
void
pushPhysicalModel
({
RRect
rrect
,
double
elevation
,
Color
color
})
{
_pushPhysicalModel
(
rrect
.
_value
,
elevation
,
color
.
value
);
}
void
_pushPhysicalModel
(
Float32List
rrect
,
int
elevation
,
double
elevation
,
int
color
)
native
"SceneBuilder_pushPhysicalModel"
;
/// Ends the effect of the most recently pushed operation.
...
...
lib/ui/compositing/scene_builder.cc
浏览文件 @
c0f1e3b4
...
...
@@ -155,7 +155,7 @@ void SceneBuilder::pushShaderMask(Shader* shader,
}
void
SceneBuilder
::
pushPhysicalModel
(
const
RRect
&
rrect
,
int
elevation
,
double
elevation
,
int
color
)
{
SkRect
cullRect
;
if
(
!
cullRect
.
intersect
(
rrect
.
sk_rrect
.
rect
(),
m_cullRects
.
top
()))
...
...
lib/ui/compositing/scene_builder.h
浏览文件 @
c0f1e3b4
...
...
@@ -46,7 +46,7 @@ class SceneBuilder : public ftl::RefCountedThreadSafe<SceneBuilder>,
double
maskRectTop
,
double
maskRectBottom
,
int
blendMode
);
void
pushPhysicalModel
(
const
RRect
&
rrect
,
int
elevation
,
int
color
);
void
pushPhysicalModel
(
const
RRect
&
rrect
,
double
elevation
,
int
color
);
void
pop
();
...
...
lib/ui/painting.dart
浏览文件 @
c0f1e3b4
...
...
@@ -1608,13 +1608,13 @@ class Canvas extends NativeFieldWrapperClass2 {
/// Draws a shadow for a [Path] representing the given material elevation.
///
/// transparentOccluder should be true if the occluding object is not opaque.
void
drawShadow
(
Path
path
,
Color
color
,
int
elevation
,
bool
transparentOccluder
)
{
void
drawShadow
(
Path
path
,
Color
color
,
double
elevation
,
bool
transparentOccluder
)
{
_drawShadow
(
path
,
color
.
value
,
elevation
,
transparentOccluder
);
}
void
_drawShadow
(
Path
path
,
int
color
,
int
elevation
,
double
elevation
,
bool
transparentOccluder
)
native
"Canvas_drawShadow"
;
}
...
...
lib/ui/painting/canvas.cc
浏览文件 @
c0f1e3b4
...
...
@@ -380,7 +380,7 @@ void Canvas::drawAtlas(const Paint& paint,
void
Canvas
::
drawShadow
(
const
CanvasPath
*
path
,
SkColor
color
,
int
elevation
,
double
elevation
,
bool
transparentOccluder
)
{
flow
::
PhysicalModelLayer
::
DrawShadow
(
canvas_
,
path
->
path
(),
...
...
lib/ui/painting/canvas.h
浏览文件 @
c0f1e3b4
...
...
@@ -159,7 +159,7 @@ class Canvas : public ftl::RefCountedThreadSafe<Canvas>,
void
drawShadow
(
const
CanvasPath
*
path
,
SkColor
color
,
int
elevation
,
double
elevation
,
bool
transparentOccluder
);
SkCanvas
*
canvas
()
const
{
return
canvas_
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录