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

Unified Diff: ui/compositor/layer.cc

Issue 11081007: Remove implicit flooring Scale() method from Point and Size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 2 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 | « 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 bbca75ab9628ca599cd35c36740f9d8af19a39bb..e71cbd594ff27677bf7f7e34fe790a97579f9b90 100644
--- a/ui/compositor/layer.cc
+++ b/ui/compositor/layer.cc
@@ -28,6 +28,7 @@
#include "ui/gfx/display.h"
#include "ui/gfx/interpolated_transform.h"
#include "ui/gfx/point3.h"
+#include "ui/gfx/size_conversions.h"
namespace {
@@ -754,8 +755,8 @@ void Layer::RecomputeDrawsContentAndUVRect() {
if (scale_content_) {
texture_size = texture_->size();
} else {
- texture_size =
- texture_->size().Scale(1.0f / texture_->device_scale_factor());
+ texture_size = gfx::ToFlooredSize(
+ texture_->size().Scale(1.0f / texture_->device_scale_factor()));
}
gfx::Size size(std::min(bounds().width(), texture_size.width()),
« 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