Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
34f81b18
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,发现更多精彩内容 >>
提交
34f81b18
编写于
3月 04, 2016
作者:
A
Adam Barth
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2458 from abarth/rm_draw_looper
Remove DrawLooper
上级
545f9000
c266534d
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
0 addition
and
297 deletion
+0
-297
sky/engine/bindings/dart_ui.cc
sky/engine/bindings/dart_ui.cc
+0
-4
sky/engine/bindings/dart_vm_entry_points.txt
sky/engine/bindings/dart_vm_entry_points.txt
+0
-3
sky/engine/core/core.gni
sky/engine/core/core.gni
+0
-6
sky/engine/core/dart/painting.dart
sky/engine/core/dart/painting.dart
+0
-39
sky/engine/core/painting/DrawLooper.cpp
sky/engine/core/painting/DrawLooper.cpp
+0
-18
sky/engine/core/painting/DrawLooper.h
sky/engine/core/painting/DrawLooper.h
+0
-33
sky/engine/core/painting/DrawLooperLayerInfo.cpp
sky/engine/core/painting/DrawLooperLayerInfo.cpp
+0
-41
sky/engine/core/painting/DrawLooperLayerInfo.h
sky/engine/core/painting/DrawLooperLayerInfo.h
+0
-46
sky/engine/core/painting/LayerDrawLooperBuilder.cpp
sky/engine/core/painting/LayerDrawLooperBuilder.cpp
+0
-55
sky/engine/core/painting/LayerDrawLooperBuilder.h
sky/engine/core/painting/LayerDrawLooperBuilder.h
+0
-41
sky/engine/core/painting/Paint.cpp
sky/engine/core/painting/Paint.cpp
+0
-4
sky/engine/core/painting/Paint.dart
sky/engine/core/painting/Paint.dart
+0
-6
sky/engine/core/painting/Paint.h
sky/engine/core/painting/Paint.h
+0
-1
未找到文件。
sky/engine/bindings/dart_ui.cc
浏览文件 @
34f81b18
...
...
@@ -13,9 +13,7 @@
#include "sky/engine/core/painting/CanvasImage.h"
#include "sky/engine/core/painting/CanvasPath.h"
#include "sky/engine/core/painting/ColorFilter.h"
#include "sky/engine/core/painting/DrawLooperLayerInfo.h"
#include "sky/engine/core/painting/ImageShader.h"
#include "sky/engine/core/painting/LayerDrawLooperBuilder.h"
#include "sky/engine/core/painting/MaskFilter.h"
#include "sky/engine/core/painting/painting.h"
#include "sky/engine/core/painting/Picture.h"
...
...
@@ -52,9 +50,7 @@ void DartUI::InitForGlobal() {
CanvasPath
::
RegisterNatives
(
g_natives
);
ColorFilter
::
RegisterNatives
(
g_natives
);
DartRuntimeHooks
::
RegisterNatives
(
g_natives
);
DrawLooperLayerInfo
::
RegisterNatives
(
g_natives
);
ImageShader
::
RegisterNatives
(
g_natives
);
LayerDrawLooperBuilder
::
RegisterNatives
(
g_natives
);
MaskFilter
::
RegisterNatives
(
g_natives
);
MojoServices
::
RegisterNatives
(
g_natives
);
Painting
::
RegisterNatives
(
g_natives
);
...
...
sky/engine/bindings/dart_vm_entry_points.txt
浏览文件 @
34f81b18
...
...
@@ -19,11 +19,8 @@ dart:ui,::,takeServicesProvidedByEmbedder
dart:ui,::,takeServicesProvidedToEmbedder
dart:ui,::,takeShellProxyHandle
dart:ui,Canvas,Canvas.
dart:ui,DrawLooper,DrawLooper.
dart:ui,DrawLooperLayerInfo,DrawLooperLayerInfo.
dart:ui,Image,Image.
dart:ui,ImageShader,ImageShader.
dart:ui,LayerDrawLooperBuilder,LayerDrawLooperBuilder.
dart:ui,Paragraph,Paragraph.
dart:ui,ParagraphBuilder,ParagraphBuilder.
dart:ui,Path,Path.
...
...
sky/engine/core/core.gni
浏览文件 @
34f81b18
...
...
@@ -28,15 +28,9 @@ sky_core_files = [
"painting/CanvasPath.h",
"painting/ColorFilter.cpp",
"painting/ColorFilter.h",
"painting/DrawLooper.cpp",
"painting/DrawLooper.h",
"painting/DrawLooperLayerInfo.cpp",
"painting/DrawLooperLayerInfo.h",
"painting/FilterQuality.h",
"painting/ImageShader.cpp",
"painting/ImageShader.h",
"painting/LayerDrawLooperBuilder.cpp",
"painting/LayerDrawLooperBuilder.h",
"painting/MaskFilter.cpp",
"painting/MaskFilter.h",
"painting/Matrix.cpp",
...
...
sky/engine/core/dart/painting.dart
浏览文件 @
34f81b18
...
...
@@ -60,45 +60,6 @@ class Path extends NativeFieldWrapperClass2 {
Path
shift
(
Offset
offset
)
native
"Path_shift"
;
}
abstract
class
DrawLooper
extends
NativeFieldWrapperClass2
{
}
/// Paint masks for DrawLooperLayerInfo.setPaintBits. These specify which
/// aspects of the layer's paint should replace the corresponding aspects on
/// the draw's paint.
///
/// PaintBits.all means use the layer's paint completely.
/// 0 means ignore the layer's paint... except for colorMode, which is
/// always applied.
class
PaintBits
{
static
const
int
style
=
0x1
;
static
const
int
testSkewx
=
0x2
;
static
const
int
pathEffect
=
0x4
;
static
const
int
maskFilter
=
0x8
;
static
const
int
shader
=
0x10
;
static
const
int
colorFilter
=
0x20
;
static
const
int
xfermode
=
0x40
;
static
const
int
all
=
0xFFFFFFFF
;
}
class
DrawLooperLayerInfo
extends
NativeFieldWrapperClass2
{
void
_constructor
()
native
"DrawLooperLayerInfo_constructor"
;
DrawLooperLayerInfo
()
{
_constructor
();
}
void
setPaintBits
(
int
bits
)
native
"DrawLooperLayerInfo_setPaintBits"
;
void
setColorMode
(
TransferMode
mode
)
native
"DrawLooperLayerInfo_setColorMode"
;
void
setOffset
(
Offset
offset
)
native
"DrawLooperLayerInfo_setOffset"
;
void
setPostTranslate
(
bool
postTranslate
)
native
"DrawLooperLayerInfo_setPostTranslate"
;
}
class
LayerDrawLooperBuilder
extends
NativeFieldWrapperClass2
{
void
_constructor
()
native
"LayerDrawLooperBuilder_constructor"
;
LayerDrawLooperBuilder
()
{
_constructor
();
}
DrawLooper
build
()
native
"LayerDrawLooperBuilder_build"
;
void
addLayerOnTop
(
DrawLooperLayerInfo
info
,
Paint
paint
)
native
"LayerDrawLooperBuilder_addLayerOnTop"
;
}
/// Blur styles. These mirror SkBlurStyle and must be kept in sync.
enum
BlurStyle
{
/// Fuzzy inside and outside.
...
...
sky/engine/core/painting/DrawLooper.cpp
已删除
100644 → 0
浏览文件 @
545f9000
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/engine/core/painting/DrawLooper.h"
namespace
blink
{
IMPLEMENT_WRAPPERTYPEINFO
(
ui
,
DrawLooper
);
DrawLooper
::
DrawLooper
(
PassRefPtr
<
SkDrawLooper
>
looper
)
:
looper_
(
looper
)
{
}
DrawLooper
::~
DrawLooper
()
{
}
}
// namespace blink
sky/engine/core/painting/DrawLooper.h
已删除
100644 → 0
浏览文件 @
545f9000
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_CORE_PAINTING_DRAWLOOPER_H_
#define SKY_ENGINE_CORE_PAINTING_DRAWLOOPER_H_
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "third_party/skia/include/core/SkDrawLooper.h"
namespace
blink
{
class
DrawLooper
:
public
RefCounted
<
DrawLooper
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
~
DrawLooper
()
override
;
static
PassRefPtr
<
DrawLooper
>
create
(
PassRefPtr
<
SkDrawLooper
>
looper
)
{
return
adoptRef
(
new
DrawLooper
(
looper
));
}
SkDrawLooper
*
looper
()
{
return
looper_
.
get
();
}
private:
DrawLooper
(
PassRefPtr
<
SkDrawLooper
>
looper
);
RefPtr
<
SkDrawLooper
>
looper_
;
};
}
// namespace blink
#endif // SKY_ENGINE_CORE_PAINTING_DRAWLOOPER_H_
sky/engine/core/painting/DrawLooperLayerInfo.cpp
已删除
100644 → 0
浏览文件 @
545f9000
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/engine/core/painting/DrawLooperLayerInfo.h"
#include "sky/engine/tonic/dart_args.h"
#include "sky/engine/tonic/dart_binding_macros.h"
#include "sky/engine/tonic/dart_converter.h"
#include "sky/engine/tonic/dart_library_natives.h"
namespace
blink
{
static
void
DrawLooperLayerInfo_constructor
(
Dart_NativeArguments
args
)
{
DartCallConstructor
(
&
DrawLooperLayerInfo
::
create
,
args
);
}
IMPLEMENT_WRAPPERTYPEINFO
(
ui
,
DrawLooperLayerInfo
);
#define FOR_EACH_BINDING(V) \
V(DrawLooperLayerInfo, setPaintBits) \
V(DrawLooperLayerInfo, setColorMode) \
V(DrawLooperLayerInfo, setOffset) \
V(DrawLooperLayerInfo, setPostTranslate)
FOR_EACH_BINDING
(
DART_NATIVE_CALLBACK
)
void
DrawLooperLayerInfo
::
RegisterNatives
(
DartLibraryNatives
*
natives
)
{
natives
->
Register
({
{
"DrawLooperLayerInfo_constructor"
,
DrawLooperLayerInfo_constructor
,
1
,
true
},
FOR_EACH_BINDING
(
DART_REGISTER_NATIVE
)
});
}
DrawLooperLayerInfo
::
DrawLooperLayerInfo
()
{
}
DrawLooperLayerInfo
::~
DrawLooperLayerInfo
()
{
}
}
// namespace blink
sky/engine/core/painting/DrawLooperLayerInfo.h
已删除
100644 → 0
浏览文件 @
545f9000
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
#define SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
#include "dart/runtime/include/dart_api.h"
#include "sky/engine/core/painting/Offset.h"
#include "sky/engine/core/painting/TransferMode.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/RefCounted.h"
#include "third_party/skia/include/core/SkPoint.h"
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
namespace
blink
{
class
DartLibraryNatives
;
class
DrawLooperLayerInfo
:
public
RefCounted
<
DrawLooperLayerInfo
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
static
PassRefPtr
<
DrawLooperLayerInfo
>
create
()
{
return
adoptRef
(
new
DrawLooperLayerInfo
);
}
~
DrawLooperLayerInfo
()
override
;
void
setPaintBits
(
unsigned
bits
)
{
layer_info_
.
fPaintBits
=
bits
;
}
void
setColorMode
(
TransferMode
mode
)
{
layer_info_
.
fColorMode
=
mode
;
}
void
setOffset
(
Offset
offset
)
{
layer_info_
.
fOffset
=
SkPoint
::
Make
(
offset
.
sk_size
.
width
(),
offset
.
sk_size
.
height
());
}
void
setPostTranslate
(
bool
val
)
{
layer_info_
.
fPostTranslate
=
val
;
}
const
SkLayerDrawLooper
::
LayerInfo
&
layer_info
()
const
{
return
layer_info_
;
}
static
void
RegisterNatives
(
DartLibraryNatives
*
natives
);
private:
DrawLooperLayerInfo
();
SkLayerDrawLooper
::
LayerInfo
layer_info_
;
};
}
// namespace blink
#endif // SKY_ENGINE_CORE_PAINTING_DRAWLOOPERLAYERINFO_H_
sky/engine/core/painting/LayerDrawLooperBuilder.cpp
已删除
100644 → 0
浏览文件 @
545f9000
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "sky/engine/core/painting/LayerDrawLooperBuilder.h"
#include "sky/engine/core/painting/DrawLooper.h"
#include "sky/engine/core/painting/DrawLooperLayerInfo.h"
#include "sky/engine/core/painting/Paint.h"
#include "sky/engine/tonic/dart_args.h"
#include "sky/engine/tonic/dart_binding_macros.h"
#include "sky/engine/tonic/dart_converter.h"
#include "sky/engine/tonic/dart_library_natives.h"
#include "third_party/skia/include/core/SkColorFilter.h"
namespace
blink
{
static
void
LayerDrawLooperBuilder_constructor
(
Dart_NativeArguments
args
)
{
DartCallConstructor
(
&
LayerDrawLooperBuilder
::
create
,
args
);
}
IMPLEMENT_WRAPPERTYPEINFO
(
ui
,
LayerDrawLooperBuilder
);
#define FOR_EACH_BINDING(V) \
V(LayerDrawLooperBuilder, build) \
V(LayerDrawLooperBuilder, addLayerOnTop)
FOR_EACH_BINDING
(
DART_NATIVE_CALLBACK
)
void
LayerDrawLooperBuilder
::
RegisterNatives
(
DartLibraryNatives
*
natives
)
{
natives
->
Register
({
{
"LayerDrawLooperBuilder_constructor"
,
LayerDrawLooperBuilder_constructor
,
1
,
true
},
FOR_EACH_BINDING
(
DART_REGISTER_NATIVE
)
});
}
LayerDrawLooperBuilder
::
LayerDrawLooperBuilder
()
{
}
LayerDrawLooperBuilder
::~
LayerDrawLooperBuilder
()
{
}
PassRefPtr
<
DrawLooper
>
LayerDrawLooperBuilder
::
build
()
{
return
DrawLooper
::
create
(
adoptRef
(
draw_looper_builder_
.
detachLooper
()));
}
void
LayerDrawLooperBuilder
::
addLayerOnTop
(
DrawLooperLayerInfo
*
layer_info
,
const
Paint
&
paint
)
{
SkPaint
*
sk_paint
=
draw_looper_builder_
.
addLayerOnTop
(
layer_info
->
layer_info
());
if
(
!
paint
.
is_null
)
*
sk_paint
=
paint
.
sk_paint
;
}
}
// namespace blink
sky/engine/core/painting/LayerDrawLooperBuilder.h
已删除
100644 → 0
浏览文件 @
545f9000
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef SKY_ENGINE_CORE_PAINTING_LAYERDRAWLOOPERBUILDER_H_
#define SKY_ENGINE_CORE_PAINTING_LAYERDRAWLOOPERBUILDER_H_
#include "sky/engine/core/painting/Paint.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
namespace
blink
{
class
DartLibraryNatives
;
class
DrawLooper
;
class
DrawLooperLayerInfo
;
class
LayerDrawLooperBuilder
:
public
RefCounted
<
LayerDrawLooperBuilder
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
~
LayerDrawLooperBuilder
()
override
;
static
PassRefPtr
<
LayerDrawLooperBuilder
>
create
()
{
return
adoptRef
(
new
LayerDrawLooperBuilder
);
}
PassRefPtr
<
DrawLooper
>
build
();
void
addLayerOnTop
(
DrawLooperLayerInfo
*
layer_info
,
const
Paint
&
paint
);
static
void
RegisterNatives
(
DartLibraryNatives
*
natives
);
private:
LayerDrawLooperBuilder
();
SkLayerDrawLooper
::
Builder
draw_looper_builder_
;
};
}
// namespace blink
#endif // SKY_ENGINE_CORE_PAINTING_LAYERDRAWLOOPERBUILDER_H_
sky/engine/core/painting/Paint.cpp
浏览文件 @
34f81b18
...
...
@@ -6,7 +6,6 @@
#include "sky/engine/core/painting/CanvasColor.h"
#include "sky/engine/core/painting/ColorFilter.h"
#include "sky/engine/core/painting/DrawLooper.h"
#include "sky/engine/core/painting/FilterQuality.h"
#include "sky/engine/core/painting/MaskFilter.h"
#include "sky/engine/core/painting/PaintingStyle.h"
...
...
@@ -28,7 +27,6 @@ enum PaintFields {
kIsAntiAlias
,
kColor
,
kColorFilter
,
kDrawLooper
,
kFilterQuality
,
kMaskFilter
,
kShader
,
...
...
@@ -83,8 +81,6 @@ Paint DartConverter<Paint>::FromDart(Dart_Handle dart_paint) {
paint
.
setColor
(
DartConverter
<
CanvasColor
>::
FromDart
(
values
[
kColor
]));
if
(
!
Dart_IsNull
(
values
[
kColorFilter
]))
paint
.
setColorFilter
(
DartConverter
<
ColorFilter
*>::
FromDart
(
values
[
kColorFilter
])
->
filter
());
if
(
!
Dart_IsNull
(
values
[
kDrawLooper
]))
paint
.
setLooper
(
DartConverter
<
DrawLooper
*>::
FromDart
(
values
[
kDrawLooper
])
->
looper
());
if
(
!
Dart_IsNull
(
values
[
kFilterQuality
]))
paint
.
setFilterQuality
(
DartConverter
<
FilterQuality
>::
FromDart
(
values
[
kFilterQuality
]));
if
(
!
Dart_IsNull
(
values
[
kMaskFilter
]))
...
...
sky/engine/core/painting/Paint.dart
浏览文件 @
34f81b18
...
...
@@ -20,7 +20,6 @@ class Paint {
bool
isAntiAlias
=
true
;
Color
color
=
const
Color
(
0xFF000000
);
ColorFilter
colorFilter
;
DrawLooper
drawLooper
;
FilterQuality
filterQuality
;
MaskFilter
maskFilter
;
Shader
shader
;
...
...
@@ -37,7 +36,6 @@ class Paint {
strokeWidth
==
null
&&
isAntiAlias
&&
colorFilter
==
null
&&
drawLooper
==
null
&&
filterQuality
==
null
&&
maskFilter
==
null
&&
shader
==
null
&&
...
...
@@ -52,7 +50,6 @@ class Paint {
isAntiAlias
,
color
,
colorFilter
,
drawLooper
,
filterQuality
,
maskFilter
,
shader
,
...
...
@@ -70,9 +67,6 @@ class Paint {
result
+=
', colorFilter:
$colorFilter
'
;
if
(
maskFilter
!=
null
)
result
+=
', maskFilter:
$maskFilter
'
;
// TODO(mpcomplete): Figure out how to show a drawLooper.
if
(
drawLooper
!=
null
)
result
+=
', drawLooper:true'
;
result
+=
')'
;
return
result
;
}
...
...
sky/engine/core/painting/Paint.h
浏览文件 @
34f81b18
...
...
@@ -17,7 +17,6 @@
namespace
blink
{
class
DrawLooper
;
class
ColorFilter
;
class
MaskFilter
;
class
Shader
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录