Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Issue 268683002: Revert of cc: Change required_for_activation bookkeeping. (Closed)

Created:
6 years, 7 months ago by pfeldman
Modified:
6 years, 7 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, Ken Russell (switch to Gerrit), bajones, Zhenyao Mo, alokp
Visibility:
Public.

Description

Revert of cc: Change required_for_activation bookkeeping. (https://codereview.chromium.org/257773009/) Reason for revert: Breaks DevTools rendering badly. See crbug.com/369086. 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,kbr@chromium.org,vmpstr@chromium.org NOTREECHECKS=true NOTRY=true

Patch Set 1 #

Patch Set 2 : Rebaselined #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -54 lines) Patch
M cc/layers/picture_layer_impl.h View 1 3 chunks +2 lines, -12 lines 0 comments Download
M cc/layers/picture_layer_impl.cc View 1 6 chunks +4 lines, -16 lines 0 comments Download
M cc/resources/tile_manager.cc View 1 5 chunks +4 lines, -24 lines 0 comments Download
M cc/test/fake_tile_manager_client.h View 1 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
pfeldman
Created Revert of cc: Change required_for_activation bookkeeping.
6 years, 7 months ago (2014-05-01 13:30:50 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pfeldman@chromium.org/268683002/1
6 years, 7 months ago (2014-05-01 13:31:07 UTC) #2
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-01 13:31:11 UTC) #3
commit-bot: I haz the power
Failed to apply patch for cc/layers/picture_layer_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 7 months ago (2014-05-01 13:31:12 UTC) #4
pfeldman
The CQ bit was checked by pfeldman@chromium.org
6 years, 7 months ago (2014-05-01 13:35:46 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pfeldman@chromium.org/268683002/100001
6 years, 7 months ago (2014-05-01 13:35:56 UTC) #6
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-01 13:36:01 UTC) #7
commit-bot: I haz the power
Failed to apply patch for cc/layers/picture_layer_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years, 7 months ago (2014-05-01 13:36:02 UTC) #8
reveman
6 years, 7 months ago (2014-05-01 13:39:21 UTC) #9
On 2014/05/01 13:36:02, I haz the power (commit-bot) wrote:
> Failed to apply patch for cc/layers/picture_layer_impl.cc:
> While running patch -p1 --forward --force --no-backup-if-mismatch;
>   patching file cc/layers/picture_layer_impl.cc
>   Hunk #1 FAILED at 56.
>   Hunk #2 FAILED at 407.
>   Hunk #3 FAILED at 420.
>   Hunk #4 FAILED at 745.
>   Hunk #5 FAILED at 853.
>   Hunk #6 FAILED at 880.
>   6 out of 6 hunks FAILED -- saving rejects to file
> cc/layers/picture_layer_impl.cc.rej
> 
> Patch:       cc/layers/picture_layer_impl.cc
> Index: cc/layers/picture_layer_impl.cc
> diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
> index
>
5d3fb863f6a6ee13380d1c9525d9d05f2e4bdb70..1475232d3e418393a44fd750831025b18bd2985b
> 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;
>  }

FYI, this change has already been reverted.

Powered by Google App Engine
This is Rietveld 408576698