Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_43355755
engine
提交
65a4c997
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,发现更多精彩内容 >>
提交
65a4c997
编写于
8月 05, 2016
作者:
C
Chinmay Garde
提交者:
GitHub
8月 05, 2016
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove unused checkerboard.cc (#2865)
上级
5556355d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
0 addition
and
71 deletion
+0
-71
flow/BUILD.gn
flow/BUILD.gn
+0
-2
flow/checkerboard.cc
flow/checkerboard.cc
+0
-47
flow/checkerboard.h
flow/checkerboard.h
+0
-16
flow/layers/picture_layer.cc
flow/layers/picture_layer.cc
+0
-6
未找到文件。
flow/BUILD.gn
浏览文件 @
65a4c997
...
...
@@ -4,8 +4,6 @@
source_set("flow") {
sources = [
"checkerboard.cc",
"checkerboard.h",
"compositor_context.cc",
"compositor_context.h",
"instrumentation.cc",
...
...
flow/checkerboard.cc
已删除
100644 → 0
浏览文件 @
5556355d
// 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 "flow/checkerboard.h"
#include "third_party/skia/include/core/SkShader.h"
namespace
flow
{
static
sk_sp
<
SkShader
>
CreateCheckerboardShader
(
SkColor
c1
,
SkColor
c2
,
int
size
)
{
SkBitmap
bm
;
bm
.
allocN32Pixels
(
2
*
size
,
2
*
size
);
bm
.
eraseColor
(
c1
);
bm
.
eraseArea
(
SkIRect
::
MakeLTRB
(
0
,
0
,
size
,
size
),
c2
);
bm
.
eraseArea
(
SkIRect
::
MakeLTRB
(
size
,
size
,
2
*
size
,
2
*
size
),
c2
);
return
SkShader
::
MakeBitmapShader
(
bm
,
SkShader
::
kRepeat_TileMode
,
SkShader
::
kRepeat_TileMode
);
}
static
void
DrawCheckerboard
(
SkCanvas
*
canvas
,
SkColor
c1
,
SkColor
c2
,
int
size
)
{
SkPaint
paint
;
paint
.
setShader
(
CreateCheckerboardShader
(
c1
,
c2
,
size
));
canvas
->
drawPaint
(
paint
);
}
void
DrawCheckerboard
(
SkCanvas
*
canvas
,
const
SkRect
&
rect
)
{
// Draw a checkerboard
canvas
->
save
();
canvas
->
clipRect
(
rect
);
DrawCheckerboard
(
canvas
,
0x4400FF00
,
0x00000000
,
12
);
canvas
->
restore
();
// Stroke the drawn area
SkPaint
debugPaint
;
debugPaint
.
setStrokeWidth
(
3
);
debugPaint
.
setColor
(
SK_ColorRED
);
debugPaint
.
setStyle
(
SkPaint
::
kStroke_Style
);
canvas
->
drawRect
(
rect
,
debugPaint
);
}
}
// namespace flow
flow/checkerboard.h
已删除
100644 → 0
浏览文件 @
5556355d
// 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 FLOW_CHECKERBOARD_H_
#define FLOW_CHECKERBOARD_H_
#include "third_party/skia/include/core/SkCanvas.h"
namespace
flow
{
void
DrawCheckerboard
(
SkCanvas
*
canvas
,
const
SkRect
&
rect
);
}
// namespace flow
#endif // FLOW_CHECKERBOARD_H_
flow/layers/picture_layer.cc
浏览文件 @
65a4c997
...
...
@@ -4,15 +4,11 @@
#include "flow/layers/picture_layer.h"
#include "flow/checkerboard.h"
#include "flow/raster_cache.h"
#include "lib/ftl/logging.h"
namespace
flow
{
// TODO(abarth): Make this configurable by developers.
const
bool
kDebugCheckerboardRasterizedLayers
=
false
;
PictureLayer
::
PictureLayer
()
{}
PictureLayer
::~
PictureLayer
()
{}
...
...
@@ -32,8 +28,6 @@ void PictureLayer::Paint(PaintContext& context) {
SkRect
rect
=
picture_
->
cullRect
().
makeOffset
(
offset_
.
x
(),
offset_
.
y
());
context
.
canvas
.
drawImageRect
(
image_
.
get
(),
rect
,
nullptr
,
SkCanvas
::
kFast_SrcRectConstraint
);
if
(
kDebugCheckerboardRasterizedLayers
)
DrawCheckerboard
(
&
context
.
canvas
,
rect
);
}
else
{
TRACE_EVENT1
(
"flutter"
,
"PictureLayer::Paint"
,
"image"
,
"normal"
);
SkAutoCanvasRestore
save
(
&
context
.
canvas
,
true
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录