Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
halo
external_chromium_org
Commits
4fb386fa
Commit
4fb386fa
authored
10 years ago
by
Ben Murdoch
Committed by
Android (Google) Code Review
10 years ago
Browse files
Options
Download
Plain Diff
Merge "Cherry-pick: cc: Report only on active tiles in tracing." into lmp-dev
parents
d57e7f95
b86c3127
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
54 additions
and
10 deletions
+54
-10
cc/layers/layer_impl.cc
cc/layers/layer_impl.cc
+3
-0
cc/layers/layer_impl.h
cc/layers/layer_impl.h
+1
-0
cc/layers/picture_layer_impl.cc
cc/layers/picture_layer_impl.cc
+10
-0
cc/layers/picture_layer_impl.h
cc/layers/picture_layer_impl.h
+3
-0
cc/resources/picture_layer_tiling.cc
cc/resources/picture_layer_tiling.cc
+7
-0
cc/resources/picture_layer_tiling.h
cc/resources/picture_layer_tiling.h
+2
-0
cc/resources/tile_manager.cc
cc/resources/tile_manager.cc
+0
-8
cc/resources/tile_manager.h
cc/resources/tile_manager.h
+0
-1
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_impl.cc
+12
-1
cc/trees/layer_tree_impl.cc
cc/trees/layer_tree_impl.cc
+14
-0
cc/trees/layer_tree_impl.h
cc/trees/layer_tree_impl.h
+2
-0
No files found.
cc/layers/layer_impl.cc
View file @
4fb386fa
...
...
@@ -1389,6 +1389,9 @@ void LayerImpl::RemoveDependentNeedsPushProperties() {
parent_
->
RemoveDependentNeedsPushProperties
();
}
void
LayerImpl
::
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
{
}
void
LayerImpl
::
AsValueInto
(
base
::
DictionaryValue
*
state
)
const
{
TracedValue
::
MakeDictIntoImplicitSnapshotWithCategory
(
TRACE_DISABLED_BY_DEFAULT
(
"cc.debug"
),
...
...
This diff is collapsed.
Click to expand it.
cc/layers/layer_impl.h
View file @
4fb386fa
...
...
@@ -508,6 +508,7 @@ class CC_EXPORT LayerImpl : public LayerAnimationValueObserver,
virtual
scoped_ptr
<
LayerImpl
>
CreateLayerImpl
(
LayerTreeImpl
*
tree_impl
);
virtual
void
PushPropertiesTo
(
LayerImpl
*
layer
);
virtual
void
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
;
scoped_ptr
<
base
::
Value
>
AsValue
()
const
;
virtual
size_t
GPUMemoryUsageInBytes
()
const
;
...
...
This diff is collapsed.
Click to expand it.
cc/layers/picture_layer_impl.cc
View file @
4fb386fa
...
...
@@ -6,6 +6,7 @@
#include <algorithm>
#include <limits>
#include <set>
#include "base/time/time.h"
#include "cc/base/math_util.h"
...
...
@@ -1357,6 +1358,15 @@ void PictureLayerImpl::GetDebugBorderProperties(
*
width
=
DebugColors
::
TiledContentLayerBorderWidth
(
layer_tree_impl
());
}
void
PictureLayerImpl
::
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
{
if
(
!
tilings_
)
return
;
for
(
size_t
i
=
0
;
i
<
tilings_
->
num_tilings
();
++
i
)
tilings_
->
tiling_at
(
i
)
->
GetAllTilesForTracing
(
tiles
);
}
void
PictureLayerImpl
::
AsValueInto
(
base
::
DictionaryValue
*
state
)
const
{
const_cast
<
PictureLayerImpl
*>
(
this
)
->
DoPostCommitInitializationIfNeeded
();
LayerImpl
::
AsValueInto
(
state
);
...
...
This diff is collapsed.
Click to expand it.
cc/layers/picture_layer_impl.h
View file @
4fb386fa
...
...
@@ -5,6 +5,7 @@
#ifndef CC_LAYERS_PICTURE_LAYER_IMPL_H_
#define CC_LAYERS_PICTURE_LAYER_IMPL_H_
#include <set>
#include <string>
#include <vector>
...
...
@@ -171,6 +172,8 @@ class CC_EXPORT PictureLayerImpl
virtual
void
GetDebugBorderProperties
(
SkColor
*
color
,
float
*
width
)
const
OVERRIDE
;
virtual
void
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
OVERRIDE
;
virtual
void
AsValueInto
(
base
::
DictionaryValue
*
dict
)
const
OVERRIDE
;
virtual
void
UpdateIdealScales
();
...
...
This diff is collapsed.
Click to expand it.
cc/resources/picture_layer_tiling.cc
View file @
4fb386fa
...
...
@@ -7,6 +7,7 @@
#include <algorithm>
#include <cmath>
#include <limits>
#include <set>
#include "base/debug/trace_event.h"
#include "cc/base/math_util.h"
...
...
@@ -622,6 +623,12 @@ void PictureLayerTiling::UpdateTilesToCurrentPile() {
}
}
void
PictureLayerTiling
::
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
{
for
(
TileMap
::
const_iterator
it
=
tiles_
.
begin
();
it
!=
tiles_
.
end
();
++
it
)
tiles
->
insert
(
it
->
second
.
get
());
}
scoped_ptr
<
base
::
Value
>
PictureLayerTiling
::
AsValue
()
const
{
scoped_ptr
<
base
::
DictionaryValue
>
state
(
new
base
::
DictionaryValue
());
state
->
SetInteger
(
"num_tiles"
,
tiles_
.
size
());
...
...
This diff is collapsed.
Click to expand it.
cc/resources/picture_layer_tiling.h
View file @
4fb386fa
...
...
@@ -5,6 +5,7 @@
#ifndef CC_RESOURCES_PICTURE_LAYER_TILING_H_
#define CC_RESOURCES_PICTURE_LAYER_TILING_H_
#include <set>
#include <utility>
#include <vector>
...
...
@@ -235,6 +236,7 @@ class CC_EXPORT PictureLayerTiling {
return
frame_time_in_seconds
!=
last_impl_frame_time_in_seconds_
;
}
void
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
;
scoped_ptr
<
base
::
Value
>
AsValue
()
const
;
size_t
GPUMemoryUsageInBytes
()
const
;
...
...
This diff is collapsed.
Click to expand it.
cc/resources/tile_manager.cc
View file @
4fb386fa
...
...
@@ -701,14 +701,6 @@ scoped_ptr<base::Value> TileManager::BasicStateAsValue() const {
return
state
.
PassAs
<
base
::
Value
>
();
}
scoped_ptr
<
base
::
Value
>
TileManager
::
AllTilesAsValue
()
const
{
scoped_ptr
<
base
::
ListValue
>
state
(
new
base
::
ListValue
());
for
(
TileMap
::
const_iterator
it
=
tiles_
.
begin
();
it
!=
tiles_
.
end
();
++
it
)
state
->
Append
(
it
->
second
->
AsValue
().
release
());
return
state
.
PassAs
<
base
::
Value
>
();
}
void
TileManager
::
AssignGpuMemoryToTiles
(
PrioritizedTileSet
*
tiles
,
TileVector
*
tiles_that_need_to_be_rasterized
)
{
...
...
This diff is collapsed.
Click to expand it.
cc/resources/tile_manager.h
View file @
4fb386fa
...
...
@@ -186,7 +186,6 @@ class CC_EXPORT TileManager : public RasterizerClient,
int
flags
);
scoped_ptr
<
base
::
Value
>
BasicStateAsValue
()
const
;
scoped_ptr
<
base
::
Value
>
AllTilesAsValue
()
const
;
const
MemoryHistory
::
Entry
&
memory_stats_from_last_assign
()
const
{
return
memory_stats_from_last_assign_
;
}
...
...
This diff is collapsed.
Click to expand it.
cc/trees/layer_tree_host_impl.cc
View file @
4fb386fa
...
...
@@ -3027,8 +3027,19 @@ scoped_ptr<base::Value> LayerTreeHostImpl::AsValueWithFrame(
state
->
Set
(
"activation_state"
,
ActivationStateAsValue
().
release
());
state
->
Set
(
"device_viewport_size"
,
MathUtil
::
AsValue
(
device_viewport_size_
).
release
());
std
::
set
<
const
Tile
*>
tiles
;
active_tree_
->
GetAllTilesForTracing
(
&
tiles
);
if
(
pending_tree_
)
pending_tree_
->
GetAllTilesForTracing
(
&
tiles
);
scoped_ptr
<
base
::
ListValue
>
tile_state
(
new
base
::
ListValue
());
for
(
std
::
set
<
const
Tile
*>::
const_iterator
it
=
tiles
.
begin
();
it
!=
tiles
.
end
();
++
it
)
tile_state
->
Append
((
*
it
)
->
AsValue
().
release
());
state
->
Set
(
"active_tiles"
,
tile_state
.
release
());
if
(
tile_manager_
)
{
state
->
Set
(
"tiles"
,
tile_manager_
->
AllTilesAsValue
().
release
());
state
->
Set
(
"tile_manager_basic_state"
,
tile_manager_
->
BasicStateAsValue
().
release
());
}
state
->
Set
(
"active_tree"
,
active_tree_
->
AsValue
().
release
());
...
...
This diff is collapsed.
Click to expand it.
cc/trees/layer_tree_impl.cc
View file @
4fb386fa
...
...
@@ -790,6 +790,20 @@ AnimationRegistrar* LayerTreeImpl::animationRegistrar() const {
return
layer_tree_host_impl_
->
animation_registrar
();
}
void
LayerTreeImpl
::
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
{
typedef
LayerIterator
<
LayerImpl
>
LayerIteratorType
;
LayerIteratorType
end
=
LayerIteratorType
::
End
(
&
render_surface_layer_list_
);
for
(
LayerIteratorType
it
=
LayerIteratorType
::
Begin
(
&
render_surface_layer_list_
);
it
!=
end
;
++
it
)
{
if
(
!
it
.
represents_itself
())
continue
;
LayerImpl
*
layer_impl
=
*
it
;
layer_impl
->
GetAllTilesForTracing
(
tiles
);
}
}
scoped_ptr
<
base
::
Value
>
LayerTreeImpl
::
AsValue
()
const
{
scoped_ptr
<
base
::
DictionaryValue
>
state
(
new
base
::
DictionaryValue
());
TracedValue
::
MakeDictIntoImplicitSnapshot
(
...
...
This diff is collapsed.
Click to expand it.
cc/trees/layer_tree_impl.h
View file @
4fb386fa
...
...
@@ -6,6 +6,7 @@
#define CC_TREES_LAYER_TREE_IMPL_H_
#include <list>
#include <set>
#include <string>
#include <vector>
...
...
@@ -104,6 +105,7 @@ class CC_EXPORT LayerTreeImpl {
const
LayerTreeDebugState
&
debug_state
()
const
;
float
device_scale_factor
()
const
;
DebugRectHistory
*
debug_rect_history
()
const
;
void
GetAllTilesForTracing
(
std
::
set
<
const
Tile
*>*
tiles
)
const
;
scoped_ptr
<
base
::
Value
>
AsValue
()
const
;
// Other public methods
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment