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

Unified Diff: ui/compositor/layer.cc

Issue 11377068: ui: Make gfx::Size::Scale() mutate the class. Add gfx::ScaleSize() similar to Rect/Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseTOGO Created 8 years, 1 month 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 | « ui/compositor/dip_util.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer.cc
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc
index d3dc6ca60993417d74610759cfe3f4ccd165dbe5..2a88db500fe5b74141d8dddd174b02b8638ba6b6 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -767,8 +767,9 @@ void Layer::RecomputeDrawsContentAndUVRect() {
} else {
DCHECK(texture_);
+ float texture_scale_factor = 1.0f / texture_->device_scale_factor();
gfx::Size texture_size = gfx::ToFlooredSize(
- texture_->size().Scale(1.0f / texture_->device_scale_factor()));
+ gfx::ScaleSize(texture_->size(), texture_scale_factor));
gfx::Size size(std::min(bounds().width(), texture_size.width()),
std::min(bounds().height(), texture_size.height()));
« no previous file with comments | « ui/compositor/dip_util.cc ('k') | ui/gfx/canvas.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698