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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 2555363004: [6/6] git cl format (Closed)
Patch Set: Created 4 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/layers/picture_layer.cc ('k') | cc/playback/raster_source.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 023c0918c570a5dee41b49a14a837d44c4dfbc5f..d241e55922a3b65b4d5b32f12a13115b3ffebb56 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -728,9 +728,12 @@ const PictureLayerTiling* PictureLayerImpl::GetPendingOrActiveTwinTiling(
PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer();
if (!twin_layer)
return nullptr;
- const PictureLayerTiling* twin_tiling = twin_layer->tilings_->FindTilingWithScaleKey(tiling->contents_scale_key());
+ const PictureLayerTiling* twin_tiling =
+ twin_layer->tilings_->FindTilingWithScaleKey(
+ tiling->contents_scale_key());
DCHECK(tiling->raster_transform().translation() == gfx::Vector2dF());
- DCHECK(!twin_tiling || twin_tiling->raster_transform().translation() == gfx::Vector2dF());
+ DCHECK(!twin_tiling ||
+ twin_tiling->raster_transform().translation() == gfx::Vector2dF());
return twin_tiling;
}
@@ -887,7 +890,8 @@ void PictureLayerImpl::SetUseTransformedRasterization(bool use) {
NoteLayerPropertyChanged();
}
-PictureLayerTiling* PictureLayerImpl::AddTiling(const ScaleTranslate2d& contents_transform) {
+PictureLayerTiling* PictureLayerImpl::AddTiling(
+ const ScaleTranslate2d& contents_transform) {
DCHECK(CanHaveTilings());
DCHECK_GE(contents_transform.scale(), MinimumContentsScale());
DCHECK_LE(contents_transform.scale(), MaximumContentsScale());
@@ -908,14 +912,17 @@ void PictureLayerImpl::AddTilingsForRasterScale() {
PictureLayerTiling* high_res =
tilings_->FindTilingWithScaleKey(raster_contents_scale_);
- gfx::Vector2dF raster_translation = CalculateRasterTranslation(raster_contents_scale_);
- if (high_res && high_res->raster_transform().translation() != raster_translation) {
+ gfx::Vector2dF raster_translation =
+ CalculateRasterTranslation(raster_contents_scale_);
+ if (high_res &&
+ high_res->raster_transform().translation() != raster_translation) {
tilings_->Remove(high_res);
high_res = nullptr;
}
if (!high_res) {
// We always need a high res tiling, so create one if it doesn't exist.
- high_res = AddTiling(ScaleTranslate2d(raster_contents_scale_, raster_translation));
+ high_res =
+ AddTiling(ScaleTranslate2d(raster_contents_scale_, raster_translation));
} else if (high_res->may_contain_low_resolution_tiles()) {
// If the tiling we find here was LOW_RESOLUTION previously, it may not be
// fully rastered, so destroy the old tiles.
@@ -1012,7 +1019,8 @@ void PictureLayerImpl::AddLowResolutionTilingIfNeeded() {
bool is_animating = draw_properties().screen_space_transform_is_animating;
if (!is_pinching && !is_animating) {
if (!low_res)
- low_res = AddTiling(ScaleTranslate2d(low_res_raster_contents_scale_, gfx::Vector2dF()));
+ low_res = AddTiling(
+ ScaleTranslate2d(low_res_raster_contents_scale_, gfx::Vector2dF()));
low_res->set_resolution(LOW_RESOLUTION);
}
}
« no previous file with comments | « cc/layers/picture_layer.cc ('k') | cc/playback/raster_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698