Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
3a5dd866
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,发现更多精彩内容 >>
提交
3a5dd866
编写于
3月 29, 2016
作者:
C
Chinmay Garde
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add static assert to check that all Dart wrappable instances are thread-safe reference-countable.
上级
6a5533ca
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
38 addition
and
25 deletion
+38
-25
sky/engine/core/compositing/Scene.h
sky/engine/core/compositing/Scene.h
+2
-2
sky/engine/core/compositing/SceneBuilder.h
sky/engine/core/compositing/SceneBuilder.h
+2
-2
sky/engine/core/painting/Canvas.h
sky/engine/core/painting/Canvas.h
+2
-2
sky/engine/core/painting/CanvasImage.h
sky/engine/core/painting/CanvasImage.h
+2
-2
sky/engine/core/painting/CanvasPath.h
sky/engine/core/painting/CanvasPath.h
+2
-2
sky/engine/core/painting/ColorFilter.h
sky/engine/core/painting/ColorFilter.h
+2
-2
sky/engine/core/painting/MaskFilter.h
sky/engine/core/painting/MaskFilter.h
+2
-2
sky/engine/core/painting/Picture.h
sky/engine/core/painting/Picture.h
+2
-2
sky/engine/core/painting/PictureRecorder.h
sky/engine/core/painting/PictureRecorder.h
+2
-2
sky/engine/core/painting/Shader.h
sky/engine/core/painting/Shader.h
+2
-2
sky/engine/core/text/Paragraph.cpp
sky/engine/core/text/Paragraph.cpp
+4
-0
sky/engine/core/text/Paragraph.h
sky/engine/core/text/Paragraph.h
+2
-2
sky/engine/core/text/ParagraphBuilder.cpp
sky/engine/core/text/ParagraphBuilder.cpp
+4
-0
sky/engine/core/text/ParagraphBuilder.h
sky/engine/core/text/ParagraphBuilder.h
+2
-2
sky/engine/tonic/dart_wrappable.h
sky/engine/tonic/dart_wrappable.h
+6
-1
未找到文件。
sky/engine/core/compositing/Scene.h
浏览文件 @
3a5dd866
...
...
@@ -11,13 +11,13 @@
#include "flow/layers/layer_tree.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace
blink
{
class
DartLibraryNatives
;
class
Scene
:
public
RefCounted
<
Scene
>
,
public
DartWrappable
{
class
Scene
:
public
ThreadSafe
RefCounted
<
Scene
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
...
...
sky/engine/core/compositing/SceneBuilder.h
浏览文件 @
3a5dd866
...
...
@@ -21,11 +21,11 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/tonic/float64_list.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
namespace
blink
{
class
SceneBuilder
:
public
RefCounted
<
SceneBuilder
>
,
public
DartWrappable
{
class
SceneBuilder
:
public
ThreadSafe
RefCounted
<
SceneBuilder
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
static
PassRefPtr
<
SceneBuilder
>
create
()
{
...
...
sky/engine/core/painting/Canvas.h
浏览文件 @
3a5dd866
...
...
@@ -18,7 +18,7 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/tonic/float64_list.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkCanvas.h"
namespace
blink
{
...
...
@@ -29,7 +29,7 @@ class Paragraph;
template
<
>
struct
DartConverter
<
SkCanvas
::
VertexMode
>
:
public
DartConverterInteger
<
SkCanvas
::
VertexMode
>
{};
class
Canvas
:
public
RefCounted
<
Canvas
>
,
public
DartWrappable
{
class
Canvas
:
public
ThreadSafe
RefCounted
<
Canvas
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
static
PassRefPtr
<
Canvas
>
create
(
PictureRecorder
*
recorder
,
Rect
&
bounds
);
...
...
sky/engine/core/painting/CanvasImage.h
浏览文件 @
3a5dd866
...
...
@@ -7,13 +7,13 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkImage.h"
namespace
blink
{
class
DartLibraryNatives
;
class
CanvasImage
final
:
public
RefCounted
<
CanvasImage
>
,
class
CanvasImage
final
:
public
ThreadSafe
RefCounted
<
CanvasImage
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
...
...
sky/engine/core/painting/CanvasPath.h
浏览文件 @
3a5dd866
...
...
@@ -12,7 +12,7 @@
#include "sky/engine/core/painting/RRect.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkPath.h"
// Note: There's a very similar class in ../../platform/graphics/Path.h
...
...
@@ -22,7 +22,7 @@
namespace
blink
{
class
DartLibraryNatives
;
class
CanvasPath
:
public
RefCounted
<
CanvasPath
>
,
public
DartWrappable
{
class
CanvasPath
:
public
ThreadSafe
RefCounted
<
CanvasPath
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
~
CanvasPath
()
override
;
...
...
sky/engine/core/painting/ColorFilter.h
浏览文件 @
3a5dd866
...
...
@@ -9,13 +9,13 @@
#include "sky/engine/core/painting/TransferMode.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkColorFilter.h"
namespace
blink
{
class
DartLibraryNatives
;
class
ColorFilter
:
public
RefCounted
<
ColorFilter
>
,
public
DartWrappable
{
class
ColorFilter
:
public
ThreadSafe
RefCounted
<
ColorFilter
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
~
ColorFilter
()
override
;
...
...
sky/engine/core/painting/MaskFilter.h
浏览文件 @
3a5dd866
...
...
@@ -7,14 +7,14 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
class
SkMaskFilter
;
namespace
blink
{
class
DartLibraryNatives
;
class
MaskFilter
:
public
RefCounted
<
MaskFilter
>
,
public
DartWrappable
{
class
MaskFilter
:
public
ThreadSafe
RefCounted
<
MaskFilter
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
~
MaskFilter
()
override
;
...
...
sky/engine/core/painting/Picture.h
浏览文件 @
3a5dd866
...
...
@@ -7,14 +7,14 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkPicture.h"
namespace
blink
{
class
Canvas
;
class
DartLibraryNatives
;
class
Picture
:
public
RefCounted
<
Picture
>
,
public
DartWrappable
{
class
Picture
:
public
ThreadSafe
RefCounted
<
Picture
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
~
Picture
()
override
;
...
...
sky/engine/core/painting/PictureRecorder.h
浏览文件 @
3a5dd866
...
...
@@ -8,7 +8,7 @@
#include "sky/engine/core/painting/Rect.h"
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkPictureRecorder.h"
namespace
blink
{
...
...
@@ -16,7 +16,7 @@ class Canvas;
class
DartLibraryNatives
;
class
Picture
;
class
PictureRecorder
:
public
RefCounted
<
PictureRecorder
>
,
class
PictureRecorder
:
public
ThreadSafe
RefCounted
<
PictureRecorder
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
...
...
sky/engine/core/painting/Shader.h
浏览文件 @
3a5dd866
...
...
@@ -7,12 +7,12 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "third_party/skia/include/core/SkShader.h"
namespace
blink
{
class
Shader
:
public
RefCounted
<
Shader
>
,
public
DartWrappable
{
class
Shader
:
public
ThreadSafe
RefCounted
<
Shader
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
~
Shader
()
override
;
...
...
sky/engine/core/text/Paragraph.cpp
浏览文件 @
3a5dd866
...
...
@@ -4,12 +4,14 @@
#include "sky/engine/core/text/ParagraphBuilder.h"
#include "base/location.h"
#include "sky/engine/core/painting/Rect.h"
#include "sky/engine/core/rendering/PaintInfo.h"
#include "sky/engine/core/rendering/RenderText.h"
#include "sky/engine/core/rendering/style/RenderStyle.h"
#include "sky/engine/platform/fonts/FontCache.h"
#include "sky/engine/platform/graphics/GraphicsContext.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/tonic/dart_args.h"
#include "sky/engine/tonic/dart_binding_macros.h"
#include "sky/engine/tonic/dart_converter.h"
...
...
@@ -47,6 +49,8 @@ Paragraph::Paragraph(PassOwnPtr<RenderView> renderView)
Paragraph
::~
Paragraph
()
{
base
::
SingleThreadTaskRunner
*
runner
=
Platform
::
current
()
->
GetUITaskRunner
();
runner
->
DeleteSoon
(
FROM_HERE
,
m_renderView
.
leakPtr
());
}
double
Paragraph
::
width
()
...
...
sky/engine/core/text/Paragraph.h
浏览文件 @
3a5dd866
...
...
@@ -7,7 +7,7 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
#include "sky/engine/core/painting/Canvas.h"
#include "sky/engine/core/painting/Offset.h"
#include "sky/engine/core/rendering/RenderView.h"
...
...
@@ -16,7 +16,7 @@
namespace
blink
{
class
DartLibraryNatives
;
class
Paragraph
:
public
RefCounted
<
Paragraph
>
,
public
DartWrappable
{
class
Paragraph
:
public
ThreadSafe
RefCounted
<
Paragraph
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
static
PassRefPtr
<
Paragraph
>
create
(
PassOwnPtr
<
RenderView
>
renderView
)
{
...
...
sky/engine/core/text/ParagraphBuilder.cpp
浏览文件 @
3a5dd866
...
...
@@ -4,12 +4,14 @@
#include "sky/engine/core/text/ParagraphBuilder.h"
#include "base/location.h"
#include "sky/engine/core/rendering/RenderInline.h"
#include "sky/engine/core/rendering/RenderParagraph.h"
#include "sky/engine/core/rendering/RenderText.h"
#include "sky/engine/core/rendering/style/RenderStyle.h"
#include "sky/engine/core/script/ui_dart_state.h"
#include "sky/engine/platform/text/LocaleToScriptMapping.h"
#include "sky/engine/public/platform/Platform.h"
#include "sky/engine/tonic/dart_args.h"
#include "sky/engine/tonic/dart_binding_macros.h"
#include "sky/engine/tonic/dart_converter.h"
...
...
@@ -135,6 +137,8 @@ ParagraphBuilder::ParagraphBuilder()
ParagraphBuilder
::~
ParagraphBuilder
()
{
base
::
SingleThreadTaskRunner
*
runner
=
Platform
::
current
()
->
GetUITaskRunner
();
runner
->
DeleteSoon
(
FROM_HERE
,
m_renderView
.
leakPtr
());
}
void
ParagraphBuilder
::
pushStyle
(
Int32List
&
encoded
,
const
std
::
string
&
fontFamily
,
double
fontSize
,
double
letterSpacing
,
double
wordSpacing
,
double
lineHeight
)
...
...
sky/engine/core/text/ParagraphBuilder.h
浏览文件 @
3a5dd866
...
...
@@ -9,12 +9,12 @@
#include "sky/engine/tonic/dart_wrappable.h"
#include "sky/engine/tonic/int32_list.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefCounted.h"
#include "sky/engine/wtf/
ThreadSafe
RefCounted.h"
namespace
blink
{
class
DartLibraryNatives
;
class
ParagraphBuilder
:
public
RefCounted
<
ParagraphBuilder
>
,
public
DartWrappable
{
class
ParagraphBuilder
:
public
ThreadSafe
RefCounted
<
ParagraphBuilder
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
static
PassRefPtr
<
ParagraphBuilder
>
create
()
{
...
...
sky/engine/tonic/dart_wrappable.h
浏览文件 @
3a5dd866
...
...
@@ -14,6 +14,9 @@
#include "sky/engine/tonic/dart_wrapper_info.h"
#include "sky/engine/wtf/PassRefPtr.h"
#include "sky/engine/wtf/RefPtr.h"
#include "sky/engine/wtf/ThreadSafeRefCounted.h"
#include <type_traits>
namespace
blink
{
class
DartGCVisitor
;
...
...
@@ -82,7 +85,9 @@ static const DartWrapperInfo kDartWrapperInfo_##LibraryName_##ClassName = { \
&DerefObject_##LibraryName_##ClassName, \
}; \
const DartWrapperInfo& ClassName::dart_wrapper_info_ = \
kDartWrapperInfo_##LibraryName_##ClassName;
kDartWrapperInfo_##LibraryName_##ClassName; \
static_assert(std::is_base_of<WTF::ThreadSafeRefCountedBase, ClassName>::value,\
#ClassName " must be thread-safe reference-countable.");
struct
DartConverterWrappable
{
static
DartWrappable
*
FromDart
(
Dart_Handle
handle
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录