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

Unified Diff: cc/layers/tiled_layer.cc

Issue 567743003: Fix bad scaling in TiledLayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « no previous file | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/tiled_layer.cc
diff --git a/cc/layers/tiled_layer.cc b/cc/layers/tiled_layer.cc
index 4a960a84f5261e2b4ff0fb4db8c079fb9f181dfa..0af1aa68f4eaad91ff27d63017ece600f450bf57 100644
--- a/cc/layers/tiled_layer.cc
+++ b/cc/layers/tiled_layer.cc
@@ -463,12 +463,8 @@ void TiledLayer::UpdateTileTextures(const gfx::Rect& update_rect,
const OcclusionTracker<Layer>* occlusion) {
// The update_rect should be in layer space. So we have to convert the
// paint_rect from content space to layer space.
- float width_scale =
- paint_properties().bounds.width() /
- static_cast<float>(content_bounds().width());
- float height_scale =
- paint_properties().bounds.height() /
- static_cast<float>(content_bounds().height());
+ float width_scale = 1 / draw_properties().contents_scale_x;
danakj 2014/09/13 13:04:50 Ok ya, this would be correct, but you need to fill
+ float height_scale = 1 / draw_properties().contents_scale_y;
update_rect_ = gfx::ScaleRect(update_rect, width_scale, height_scale);
// Calling PrepareToUpdate() calls into WebKit to paint, which may have the
« no previous file with comments | « no previous file | cc/layers/tiled_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698