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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 787803004: Update from https://crrev.com/307664 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Rebase. Created 6 years 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/debug/rasterize_and_record_benchmark_impl.cc ('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 6ec1f0a1b616f9694a366a247f4f56838291c09e..54cfac88b32ec722abac90809ad0c5c9486e7731 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -39,13 +39,6 @@ const float kMaxScaleRatioDuringPinch = 2.0f;
// tiling's scale if the desired scale is within this ratio.
const float kSnapToExistingTilingRatio = 1.2f;
-// Estimate skewport 60 frames ahead for pre-rasterization on the CPU.
-const float kCpuSkewportTargetTimeInFrames = 60.0f;
-
-// Don't pre-rasterize on the GPU (except for kBackflingGuardDistancePixels in
-// TileManager::BinFromTilePriority).
-const float kGpuSkewportTargetTimeInFrames = 0.0f;
-
// Even for really wide viewports, at some point GPU raster should use
// less than 4 tiles to fill the viewport. This is set to 256 as a
// sane minimum for now, but we might want to tune this for low-end.
@@ -630,12 +623,8 @@ scoped_refptr<Tile> PictureLayerImpl::CreateTile(PictureLayerTiling* tiling,
int flags = 0;
- // TODO(vmpstr): Revisit this. For now, enabling analysis means that we get as
- // much savings on memory as we can. However, for some cases like ganesh or
- // small layers, the amount of time we spend analyzing might not justify
- // memory savings that we can get. Note that we don't handle solid color
- // masks, so we shouldn't bother analyzing those.
- // Bugs: crbug.com/397198, crbug.com/396908
+ // We don't handle solid color masks, so we shouldn't bother analyzing those.
+ // Otherwise, always analyze to maximize memory savings.
if (!is_mask_)
flags = Tile::USE_PICTURE_ANALYSIS;
@@ -684,13 +673,9 @@ size_t PictureLayerImpl::GetMaxTilesForInterestArea() const {
}
float PictureLayerImpl::GetSkewportTargetTimeInSeconds() const {
- float skewport_target_time_in_frames =
- layer_tree_impl()->use_gpu_rasterization()
- ? kGpuSkewportTargetTimeInFrames
- : kCpuSkewportTargetTimeInFrames;
- return skewport_target_time_in_frames *
- layer_tree_impl()->begin_impl_frame_interval().InSecondsF() *
- layer_tree_impl()->settings().skewport_target_time_multiplier;
+ return layer_tree_impl()->use_gpu_rasterization()
+ ? 0.f
+ : layer_tree_impl()->settings().skewport_target_time_in_seconds;
}
int PictureLayerImpl::GetSkewportExtrapolationLimitInContentPixels() const {
« no previous file with comments | « cc/debug/rasterize_and_record_benchmark_impl.cc ('k') | cc/layers/picture_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698