diff options
author | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 13:13:23 +0000 |
---|---|---|
committer | kbr@chromium.org <kbr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-01 13:13:23 +0000 |
commit | a4e454984bd0f758bab24c5c8bd4eef68eb19f6f (patch) | |
tree | f81e39b6e9939f00a47aab5c1640bb902365aeed /cc/layers/picture_layer_impl.cc | |
parent | 3cf8fe52af3d6266fe041a70a7c079391cd8b8af (diff) | |
download | chromium_src-a4e454984bd0f758bab24c5c8bd4eef68eb19f6f.zip chromium_src-a4e454984bd0f758bab24c5c8bd4eef68eb19f6f.tar.gz chromium_src-a4e454984bd0f758bab24c5c8bd4eef68eb19f6f.tar.bz2 |
Revert of cc: Change required_for_activation bookkeeping. (https://codereview.chromium.org/257773009/)
Reason for revert:
Caused context_lost tests to hang on Win and Mac GPU bots. See original CL for links to failing builds.
Original issue's description:
> cc: Change required_for_activation bookkeeping.
>
> This patch changes the bookkeeping of whether required for activation
> tiles all received memory during AssignGpuMemory. The new approach
> doesn't rely on the fact that we process every tile in that loop, thus
> allowing us to early out or use another approach at getting tiles that
> does not guarantee that every tile will be visited.
>
> The end goal is to evaluate if we can activate when the rasterizer
> notifies us that all tasks given to it that are required for
> activation are finished rather than trying to figure this out
> when we schedule tasks.
>
> R=reveman, enne
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=267400
TBR=enne@chromium.org,reveman@chromium.org,vmpstr@chromium.org
NOTREECHECKS=true
NOTRY=true
Review URL: https://codereview.chromium.org/269633006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267521 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/layers/picture_layer_impl.cc')
-rw-r--r-- | cc/layers/picture_layer_impl.cc | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index 5d3fb86..1475232 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc @@ -56,9 +56,7 @@ PictureLayerImpl::PictureLayerImpl(LayerTreeImpl* tree_impl, int id) should_update_tile_priorities_(false), should_use_low_res_tiling_(tree_impl->settings().create_low_res_tiling), use_gpu_rasterization_(false), - layer_needs_to_register_itself_(true), - uninitialized_tiles_required_for_activation_count_(0) { -} + layer_needs_to_register_itself_(true) {} PictureLayerImpl::~PictureLayerImpl() { if (!layer_needs_to_register_itself_) @@ -407,7 +405,6 @@ void PictureLayerImpl::UpdateTilePriorities() { contents_scale_x(), current_frame_time_in_seconds); - uninitialized_tiles_required_for_activation_count_ = 0; if (layer_tree_impl()->IsPendingTree()) MarkVisibleResourcesAsRequired(); @@ -420,13 +417,6 @@ void PictureLayerImpl::NotifyTileInitialized(const Tile* tile) { gfx::RectF layer_damage_rect = gfx::ScaleRect(tile->content_rect(), 1.f / tile->contents_scale()); AddDamageRect(layer_damage_rect); - - DCHECK_EQ(0, uninitialized_tiles_required_for_activation_count_); - } else if (layer_tree_impl()->IsPendingTree()) { - if (tile->required_for_activation()) { - DCHECK_GT(uninitialized_tiles_required_for_activation_count_, 0); - --uninitialized_tiles_required_for_activation_count_; - } } } @@ -745,7 +735,7 @@ ResourceProvider::ResourceId PictureLayerImpl::ContentsResourceId() const { return tile_version.get_resource_id(); } -void PictureLayerImpl::MarkVisibleResourcesAsRequired() { +void PictureLayerImpl::MarkVisibleResourcesAsRequired() const { DCHECK(layer_tree_impl()->IsPendingTree()); DCHECK(!layer_tree_impl()->needs_update_draw_properties()); DCHECK(ideal_contents_scale_); @@ -853,7 +843,7 @@ bool PictureLayerImpl::MarkVisibleTilesAsRequired( const PictureLayerTiling* optional_twin_tiling, float contents_scale, const gfx::Rect& rect, - const Region& missing_region) { + const Region& missing_region) const { bool twin_had_missing_tile = false; for (PictureLayerTiling::CoverageIterator iter(tiling, contents_scale, @@ -880,10 +870,8 @@ bool PictureLayerImpl::MarkVisibleTilesAsRequired( continue; } } - DCHECK(!tile->required_for_activation()); + tile->MarkRequiredForActivation(); - if (!tile->IsReadyToDraw()) - ++uninitialized_tiles_required_for_activation_count_; } return twin_had_missing_tile; } |