Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
32884990
E
engine
项目概览
sxychenjing
/
engine
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
32884990
编写于
12月 28, 2015
作者:
A
Adam Barth
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove IDL for DrawLooper-related interfaces
上级
2c8d6ac3
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
109 addition
and
66 deletion
+109
-66
sky/engine/bindings/dart_ui.cc
sky/engine/bindings/dart_ui.cc
+4
-0
sky/engine/core/core.gni
sky/engine/core/core.gni
+0
-4
sky/engine/core/dart/painting.dart
sky/engine/core/dart/painting.dart
+39
-0
sky/engine/core/painting/DrawLooper.cpp
sky/engine/core/painting/DrawLooper.cpp
+2
-0
sky/engine/core/painting/DrawLooper.idl
sky/engine/core/painting/DrawLooper.idl
+0
-6
sky/engine/core/painting/DrawLooperLayerInfo.cpp
sky/engine/core/painting/DrawLooperLayerInfo.cpp
+25
-0
sky/engine/core/painting/DrawLooperLayerInfo.dart
sky/engine/core/painting/DrawLooperLayerInfo.dart
+0
-23
sky/engine/core/painting/DrawLooperLayerInfo.h
sky/engine/core/painting/DrawLooperLayerInfo.h
+4
-1
sky/engine/core/painting/DrawLooperLayerInfo.idl
sky/engine/core/painting/DrawLooperLayerInfo.idl
+0
-15
sky/engine/core/painting/LayerDrawLooperBuilder.cpp
sky/engine/core/painting/LayerDrawLooperBuilder.cpp
+23
-0
sky/engine/core/painting/LayerDrawLooperBuilder.h
sky/engine/core/painting/LayerDrawLooperBuilder.h
+3
-1
sky/engine/core/painting/LayerDrawLooperBuilder.idl
sky/engine/core/painting/LayerDrawLooperBuilder.idl
+0
-12
sky/engine/core/painting/Paint.cpp
sky/engine/core/painting/Paint.cpp
+3
-3
sky/engine/core/painting/Paint.h
sky/engine/core/painting/Paint.h
+6
-1
未找到文件。
sky/engine/bindings/dart_ui.cc
浏览文件 @
32884990
...
...
@@ -8,6 +8,8 @@
#include "sky/engine/bindings/dart_runtime_hooks.h"
#include "sky/engine/core/compositing/Scene.h"
#include "sky/engine/core/compositing/SceneBuilder.h"
#include "sky/engine/core/painting/DrawLooperLayerInfo.h"
#include "sky/engine/core/painting/LayerDrawLooperBuilder.h"
#include "sky/engine/core/painting/painting.h"
#include "sky/engine/core/text/Paragraph.h"
#include "sky/engine/core/text/ParagraphBuilder.h"
...
...
@@ -42,6 +44,8 @@ void DartUI::InitForIsolate() {
if
(
!
g_natives
)
{
g_natives
=
new
DartLibraryNatives
();
DartRuntimeHooks
::
RegisterNatives
(
g_natives
);
DrawLooperLayerInfo
::
RegisterNatives
(
g_natives
);
LayerDrawLooperBuilder
::
RegisterNatives
(
g_natives
);
Painting
::
RegisterNatives
(
g_natives
);
Paragraph
::
RegisterNatives
(
g_natives
);
ParagraphBuilder
::
RegisterNatives
(
g_natives
);
...
...
sky/engine/core/core.gni
浏览文件 @
32884990
...
...
@@ -236,12 +236,9 @@ sky_core_files = [
core_idl_files = get_path_info([
"painting/Canvas.idl",
"painting/ColorFilter.idl",
"painting/DrawLooper.idl",
"painting/DrawLooperLayerInfo.idl",
"painting/Gradient.idl",
"painting/Image.idl",
"painting/ImageShader.idl",
"painting/LayerDrawLooperBuilder.idl",
"painting/MaskFilter.idl",
"painting/Path.idl",
"painting/Picture.idl",
...
...
@@ -261,7 +258,6 @@ core_dart_files = get_path_info([
"dart/window.dart",
"painting/Color.dart",
"painting/ColorFilter.dart",
"painting/DrawLooperLayerInfo.dart",
"painting/FilterQuality.dart",
"painting/Gradient.dart",
"painting/ImageShader.dart",
...
...
sky/engine/core/dart/painting.dart
浏览文件 @
32884990
...
...
@@ -11,3 +11,42 @@ void decodeImageFromDataPipe(int handle, _ImageDecoderCallback callback)
void
decodeImageFromList
(
Uint8List
list
,
_ImageDecoderCallback
callback
)
native
"decodeImageFromList"
;
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"
;
}
sky/engine/core/painting/DrawLooper.cpp
浏览文件 @
32884990
...
...
@@ -6,6 +6,8 @@
namespace
blink
{
IMPLEMENT_WRAPPERTYPEINFO
(
DrawLooper
);
DrawLooper
::
DrawLooper
(
PassRefPtr
<
SkDrawLooper
>
looper
)
:
looper_
(
looper
)
{
}
...
...
sky/engine/core/painting/DrawLooper.idl
已删除
100644 → 0
浏览文件 @
2c8d6ac3
//
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
.
interface
DrawLooper
{
}
;
sky/engine/core/painting/DrawLooperLayerInfo.cpp
浏览文件 @
32884990
...
...
@@ -3,9 +3,34 @@
// 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
(
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
()
{
}
...
...
sky/engine/core/painting/DrawLooperLayerInfo.dart
已删除
100644 → 0
浏览文件 @
2c8d6ac3
// 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.
part of
dart_ui
;
/// 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
;
}
sky/engine/core/painting/DrawLooperLayerInfo.h
浏览文件 @
32884990
...
...
@@ -13,6 +13,7 @@
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
namespace
blink
{
class
DartLibraryNatives
;
class
DrawLooperLayerInfo
:
public
RefCounted
<
DrawLooperLayerInfo
>
,
public
DartWrappable
{
...
...
@@ -25,12 +26,14 @@ class DrawLooperLayerInfo : public RefCounted<DrawLooperLayerInfo>,
~
DrawLooperLayerInfo
()
override
;
void
setPaintBits
(
unsigned
bits
)
{
layer_info_
.
fPaintBits
=
bits
;
}
void
setColorMode
(
SkXfermode
::
Mode
mode
)
{
layer_info_
.
fColorMode
=
mode
;
}
void
setColorMode
(
Transfer
Mode
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
();
...
...
sky/engine/core/painting/DrawLooperLayerInfo.idl
已删除
100644 → 0
浏览文件 @
2c8d6ac3
//
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
.
[
Constructor
(),
]
interface
DrawLooperLayerInfo
{
//
Specifies
which
aspects
of
the
layer
's paint should replace the
// corresponding aspects on the draw'
s
paint
.
Use
PaintBits
,
defined
in
//
DrawLooperLayerInfo
.
dart.
void
setPaintBits
(
unsigned
long
bits
)
;
void
setColorMode
(
TransferMode
mode
)
;
void
setOffset
(
Offset
offset
)
;
void
setPostTranslate
(
boolean
postTranslate
)
;
}
;
sky/engine/core/painting/LayerDrawLooperBuilder.cpp
浏览文件 @
32884990
...
...
@@ -7,10 +7,33 @@
#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
(
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
()
{
}
...
...
sky/engine/core/painting/LayerDrawLooperBuilder.h
浏览文件 @
32884990
...
...
@@ -12,7 +12,7 @@
#include "third_party/skia/include/effects/SkLayerDrawLooper.h"
namespace
blink
{
class
DartLibraryNatives
;
class
DrawLooper
;
class
DrawLooperLayerInfo
;
...
...
@@ -28,6 +28,8 @@ class LayerDrawLooperBuilder : public RefCounted<LayerDrawLooperBuilder>,
PassRefPtr
<
DrawLooper
>
build
();
void
addLayerOnTop
(
DrawLooperLayerInfo
*
layer_info
,
const
Paint
&
paint
);
static
void
RegisterNatives
(
DartLibraryNatives
*
natives
);
private:
LayerDrawLooperBuilder
();
...
...
sky/engine/core/painting/LayerDrawLooperBuilder.idl
已删除
100644 → 0
浏览文件 @
2c8d6ac3
//
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
.
[
Constructor
()
]
interface
LayerDrawLooperBuilder
{
//
Returns
a
DrawLooper
based
on
the
construction
operations
,
and
resets
the
//
builder
back
to
a
default
state
.
DrawLooper
build
()
;
void
addLayerOnTop
(
DrawLooperLayerInfo
info
,
Paint
paint
)
;
}
;
sky/engine/core/painting/Paint.cpp
浏览文件 @
32884990
...
...
@@ -102,9 +102,9 @@ Paint DartConverter<Paint>::FromDart(Dart_Handle dart_paint) {
return
result
;
}
Paint
DartConverter
<
Paint
>::
FromArguments
WithNullCheck
(
Dart_NativeArguments
args
,
int
index
,
Dart_Handle
&
exception
)
{
Paint
DartConverter
<
Paint
>::
FromArguments
(
Dart_NativeArguments
args
,
int
index
,
Dart_Handle
&
exception
)
{
Dart_Handle
dart_rect
=
Dart_GetNativeArgument
(
args
,
index
);
DCHECK
(
!
LogIfError
(
dart_rect
));
return
FromDart
(
dart_rect
);
...
...
sky/engine/core/painting/Paint.h
浏览文件 @
32884990
...
...
@@ -33,9 +33,14 @@ class Paint {
template
<
>
struct
DartConverter
<
Paint
>
{
static
Paint
FromDart
(
Dart_Handle
handle
);
static
Paint
FromArguments
(
Dart_NativeArguments
args
,
int
index
,
Dart_Handle
&
exception
);
static
Paint
FromArgumentsWithNullCheck
(
Dart_NativeArguments
args
,
int
index
,
Dart_Handle
&
exception
);
Dart_Handle
&
exception
)
{
return
FromArguments
(
args
,
index
,
exception
);
}
};
class
StrokeCap
{};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录