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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 868803002: cc: Change the activation/ready for draw check from layer to queue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl.cc
diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc
index 25dee8c10f3df48f9db7f2b1533ce599beba624f..580ea86c536965b80066105b9c61f9a655e388e3 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -1227,68 +1227,4 @@ bool PictureLayerImpl::HasValidTilePriorities() const {
return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember();
}
-bool PictureLayerImpl::AllTilesRequiredAreReadyToDraw(
- TileRequirementCheck is_tile_required_callback) const {
- if (!HasValidTilePriorities())
- return true;
-
- if (!tilings_)
- return true;
-
- if (visible_rect_for_tile_priority_.IsEmpty())
- return true;
-
- gfx::Rect rect = viewport_rect_for_tile_priority_in_content_space_;
- rect.Intersect(visible_rect_for_tile_priority_);
-
- // The high resolution tiling is the only tiling that can mark tiles as
- // requiring either draw or activation. There is an explicit check in those
- // callbacks to return false if they are not high resolution tilings. This
- // check needs to remain since there are other callers of that function that
- // rely on it. However, for the purposes of this function, we don't have to
- // check other tilings.
- PictureLayerTiling* tiling =
- tilings_->FindTilingWithResolution(HIGH_RESOLUTION);
- if (!tiling)
- return true;
-
- for (PictureLayerTiling::CoverageIterator iter(tiling, 1.f, rect); iter;
- ++iter) {
- const Tile* tile = *iter;
- // A null tile (i.e. missing recording) can just be skipped.
- // TODO(vmpstr): Verify this is true if we create tiles in raster
- // iterators.
- if (!tile)
- continue;
-
- // We can't check tile->required_for_activation, because that value might
- // be out of date. It is updated in the raster/eviction iterators.
- // TODO(vmpstr): Remove the comment once you can't access this information
- // from the tile.
- if ((tiling->*is_tile_required_callback)(tile) && !tile->IsReadyToDraw()) {
- TRACE_EVENT_INSTANT0("cc", "Tile required, but not ready to draw.",
- TRACE_EVENT_SCOPE_THREAD);
- return false;
- }
- }
-
- return true;
-}
-
-bool PictureLayerImpl::AllTilesRequiredForActivationAreReadyToDraw() const {
- if (!layer_tree_impl()->IsPendingTree())
- return true;
-
- return AllTilesRequiredAreReadyToDraw(
- &PictureLayerTiling::IsTileRequiredForActivationIfVisible);
-}
-
-bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const {
- if (!layer_tree_impl()->IsActiveTree())
- return true;
-
- return AllTilesRequiredAreReadyToDraw(
- &PictureLayerTiling::IsTileRequiredForDrawIfVisible);
-}
-
} // namespace cc
« no previous file with comments | « cc/layers/picture_layer_impl.h ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698