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

Unified Diff: cc/layers/picture_layer_impl.cc

Issue 2629233002: cc: Remove separate x/y raster scales. (Closed)
Patch Set: Created 3 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/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 8f30a83b9c39cb0d1034d60aa141dd51a0544636..4c82e7310c2eeba5d2815e484ca6c08fc2b32063 100644
--- a/cc/layers/picture_layer_impl.cc
+++ b/cc/layers/picture_layer_impl.cc
@@ -273,7 +273,7 @@ void PictureLayerImpl::AppendQuads(RenderPass* render_pass,
} else if (iter.resolution() == LOW_RESOLUTION) {
color = DebugColors::LowResTileBorderColor();
width = DebugColors::LowResTileBorderWidth(layer_tree_impl());
- } else if (iter->contents_scale_key() > max_contents_scale) {
+ } else if (iter->contents_scale() > max_contents_scale) {
color = DebugColors::ExtraHighResTileBorderColor();
width = DebugColors::ExtraHighResTileBorderWidth(layer_tree_impl());
} else {
@@ -341,8 +341,8 @@ void PictureLayerImpl::AppendQuads(RenderPass* render_pass,
// complete. But if a tile is ideal scale, we don't want to consider
// it incomplete and trying to replace it with a tile at a worse
// scale.
- if (iter->contents_scale_key() != raster_contents_scale_ &&
- iter->contents_scale_key() != ideal_contents_scale_ &&
+ if (iter->contents_scale() != raster_contents_scale_ &&
+ iter->contents_scale() != ideal_contents_scale_ &&
geometry_rect.Intersects(scaled_viewport_for_tile_priority)) {
append_quads_data->num_incomplete_tiles++;
}
@@ -646,13 +646,12 @@ bool PictureLayerImpl::RasterSourceUsesLCDText() const {
void PictureLayerImpl::NotifyTileStateChanged(const Tile* tile) {
if (layer_tree_impl()->IsActiveTree()) {
gfx::Rect layer_damage_rect = gfx::ScaleToEnclosingRect(
- tile->content_rect(), 1.f / tile->raster_scales().width(),
- 1.f / tile->raster_scales().height());
+ tile->content_rect(), 1.f / tile->contents_scale());
AddDamageRect(layer_damage_rect);
}
if (tile->draw_info().NeedsRaster()) {
PictureLayerTiling* tiling =
- tilings_->FindTilingWithScaleKey(tile->contents_scale_key());
+ tilings_->FindTilingWithScaleKey(tile->contents_scale());
if (tiling)
tiling->set_all_tiles_done(false);
}
@@ -723,8 +722,7 @@ const PictureLayerTiling* PictureLayerImpl::GetPendingOrActiveTwinTiling(
PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer();
if (!twin_layer)
return nullptr;
- return twin_layer->tilings_->FindTilingWithScaleKey(
- tiling->contents_scale_key());
+ return twin_layer->tilings_->FindTilingWithScaleKey(tiling->contents_scale());
}
bool PictureLayerImpl::RequiresHighResToDraw() 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