Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
sxychenjing
engine
提交
2c8d6ac3
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,发现更多精彩内容 >>
提交
2c8d6ac3
编写于
12月 28, 2015
作者:
A
Adam Barth
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2197 from abarth/rm_drawable
Remove Drawable interface
上级
c86fb833
cd018264
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
0 addition
and
103 deletion
+0
-103
sky/engine/core/core.gni
sky/engine/core/core.gni
+0
-3
sky/engine/core/painting/Canvas.cpp
sky/engine/core/painting/Canvas.cpp
+0
-8
sky/engine/core/painting/Canvas.h
sky/engine/core/painting/Canvas.h
+0
-2
sky/engine/core/painting/Canvas.idl
sky/engine/core/painting/Canvas.idl
+0
-1
sky/engine/core/painting/Drawable.cpp
sky/engine/core/painting/Drawable.cpp
+0
-33
sky/engine/core/painting/Drawable.h
sky/engine/core/painting/Drawable.h
+0
-32
sky/engine/core/painting/Drawable.idl
sky/engine/core/painting/Drawable.idl
+0
-6
sky/engine/core/painting/PictureRecorder.cpp
sky/engine/core/painting/PictureRecorder.cpp
+0
-14
sky/engine/core/painting/PictureRecorder.h
sky/engine/core/painting/PictureRecorder.h
+0
-3
sky/engine/core/painting/PictureRecorder.idl
sky/engine/core/painting/PictureRecorder.idl
+0
-1
未找到文件。
sky/engine/core/core.gni
浏览文件 @
2c8d6ac3
...
...
@@ -39,8 +39,6 @@ sky_core_files = [
"painting/CanvasPath.h",
"painting/ColorFilter.cpp",
"painting/ColorFilter.h",
"painting/Drawable.cpp",
"painting/Drawable.h",
"painting/DrawLooper.cpp",
"painting/DrawLooper.h",
"painting/DrawLooperLayerInfo.cpp",
...
...
@@ -238,7 +236,6 @@ sky_core_files = [
core_idl_files = get_path_info([
"painting/Canvas.idl",
"painting/ColorFilter.idl",
"painting/Drawable.idl",
"painting/DrawLooper.idl",
"painting/DrawLooperLayerInfo.idl",
"painting/Gradient.idl",
...
...
sky/engine/core/painting/Canvas.cpp
浏览文件 @
2c8d6ac3
...
...
@@ -227,14 +227,6 @@ void Canvas::drawPicture(Picture* picture)
m_canvas
->
drawPicture
(
picture
->
toSkia
());
}
void
Canvas
::
drawDrawable
(
Drawable
*
drawable
)
{
if
(
!
m_canvas
)
return
;
ASSERT
(
drawable
);
m_canvas
->
drawDrawable
(
drawable
->
toSkia
());
}
void
Canvas
::
drawVertices
(
SkCanvas
::
VertexMode
vertexMode
,
const
Vector
<
Point
>&
vertices
,
const
Vector
<
Point
>&
textureCoordinates
,
...
...
sky/engine/core/painting/Canvas.h
浏览文件 @
2c8d6ac3
...
...
@@ -7,7 +7,6 @@
#include "sky/engine/bindings/exception_state.h"
#include "sky/engine/core/painting/CanvasPath.h"
#include "sky/engine/core/painting/Drawable.h"
#include "sky/engine/core/painting/Offset.h"
#include "sky/engine/core/painting/Paint.h"
#include "sky/engine/core/painting/Picture.h"
...
...
@@ -90,7 +89,6 @@ public:
void
drawImageRect
(
const
CanvasImage
*
image
,
Rect
&
src
,
Rect
&
dst
,
const
Paint
&
paint
);
void
drawImageNine
(
const
CanvasImage
*
image
,
Rect
&
center
,
Rect
&
dst
,
const
Paint
&
paint
);
void
drawPicture
(
Picture
*
picture
);
void
drawDrawable
(
Drawable
*
drawable
);
void
drawVertices
(
SkCanvas
::
VertexMode
vertexMode
,
const
Vector
<
Point
>&
vertices
,
...
...
sky/engine/core/painting/Canvas.idl
浏览文件 @
2c8d6ac3
...
...
@@ -39,7 +39,6 @@
void
drawImageRect
(
Image
image
,
Rect
src
,
Rect
dst
,
Paint
paint
)
;
void
drawImageNine
(
Image
image
,
Rect
center
,
Rect
dst
,
Paint
paint
)
;
void
drawPicture
(
Picture
picture
)
;
void
drawDrawable
(
Drawable
drawable
)
;
[
RaisesException
]
void
drawVertices
(
VertexMode
vertexMode
,
sequence
<
Point
>
vertices
,
sequence
<
Point
>
textureCoordinates
,
sequence
<
Color
>
colors
,
TransferMode
transferMode
,
sequence
<
long
>
indicies
,
Paint
paint
)
;
//
TODO
(
eseidel
):
Paint
should
be
optional
,
but
optional
doesn
't work.
...
...
sky/engine/core/painting/Drawable.cpp
已删除
100644 → 0
浏览文件 @
c86fb833
// 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/Drawable.h"
#include "sky/engine/core/painting/Picture.h"
namespace
blink
{
PassRefPtr
<
Drawable
>
Drawable
::
create
(
PassRefPtr
<
SkDrawable
>
skDrawable
)
{
ASSERT
(
skDrawable
);
return
adoptRef
(
new
Drawable
(
skDrawable
));
}
Drawable
::
Drawable
(
PassRefPtr
<
SkDrawable
>
skDrawable
)
:
m_drawable
(
skDrawable
)
{
}
PassRefPtr
<
Picture
>
Drawable
::
newPictureSnapshot
()
{
if
(
!
m_drawable
)
return
nullptr
;
return
Picture
::
create
(
adoptRef
(
m_drawable
->
newPictureSnapshot
()));
}
Drawable
::~
Drawable
()
{
}
}
// namespace blink
sky/engine/core/painting/Drawable.h
已删除
100644 → 0
浏览文件 @
c86fb833
// 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_DRAWABLE_H_
#define SKY_ENGINE_CORE_PAINTING_DRAWABLE_H_
#include "sky/engine/core/painting/Picture.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/SkDrawable.h"
namespace
blink
{
class
Drawable
:
public
RefCounted
<
Drawable
>
,
public
DartWrappable
{
DEFINE_WRAPPERTYPEINFO
();
public:
static
PassRefPtr
<
Drawable
>
create
(
PassRefPtr
<
SkDrawable
>
skDrawable
);
~
Drawable
()
override
;
PassRefPtr
<
Picture
>
newPictureSnapshot
();
SkDrawable
*
toSkia
()
const
{
return
m_drawable
.
get
();
}
private:
explicit
Drawable
(
PassRefPtr
<
SkDrawable
>
skDrawable
);
RefPtr
<
SkDrawable
>
m_drawable
;
};
}
// namespace blink
#endif // SKY_ENGINE_CORE_PAINTING_DRAWABLE_H_
sky/engine/core/painting/Drawable.idl
已删除
100644 → 0
浏览文件 @
c86fb833
//
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
Drawable
{
Picture
newPictureSnapshot
()
;
}
;
sky/engine/core/painting/PictureRecorder.cpp
浏览文件 @
2c8d6ac3
...
...
@@ -3,7 +3,6 @@
// found in the LICENSE file.
#include "sky/engine/core/painting/Canvas.h"
#include "sky/engine/core/painting/Drawable.h"
#include "sky/engine/core/painting/Picture.h"
#include "sky/engine/core/painting/PictureRecorder.h"
...
...
@@ -40,19 +39,6 @@ PassRefPtr<Picture> PictureRecorder::endRecording()
return
picture
.
release
();
}
PassRefPtr
<
Drawable
>
PictureRecorder
::
endRecordingAsDrawable
()
{
if
(
!
isRecording
())
return
nullptr
;
RefPtr
<
Drawable
>
drawable
=
Drawable
::
create
(
adoptRef
(
m_pictureRecorder
.
endRecordingAsDrawable
()));
m_canvas
->
clearSkCanvas
();
m_canvas
->
ClearDartWrapper
();
m_canvas
=
nullptr
;
ClearDartWrapper
();
return
drawable
.
release
();
}
void
PictureRecorder
::
set_canvas
(
PassRefPtr
<
Canvas
>
canvas
)
{
m_canvas
=
canvas
;
...
...
sky/engine/core/painting/PictureRecorder.h
浏览文件 @
2c8d6ac3
...
...
@@ -14,7 +14,6 @@
namespace
blink
{
class
Canvas
;
class
Drawable
;
class
Picture
;
class
PictureRecorder
:
public
RefCounted
<
PictureRecorder
>
,
...
...
@@ -28,10 +27,8 @@ public:
~
PictureRecorder
();
// PassRefPtr<Canvas> beginRecording(double width, double height);
SkCanvas
*
beginRecording
(
Rect
bounds
);
PassRefPtr
<
Picture
>
endRecording
();
PassRefPtr
<
Drawable
>
endRecordingAsDrawable
();
bool
isRecording
();
void
set_canvas
(
PassRefPtr
<
Canvas
>
canvas
);
...
...
sky/engine/core/painting/PictureRecorder.idl
浏览文件 @
2c8d6ac3
...
...
@@ -5,5 +5,4 @@
Constructor
()
]
interface
PictureRecorder
{
Picture
endRecording
()
;
Drawable
endRecordingAsDrawable
()
;
}
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录