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

Unified Diff: cc/contents_scaling_layer.cc

Issue 11264056: cc: Use gfx:: Geometry types for positions, bounds, and related things. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ScaleAsVector 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 | « cc/contents_scaling_layer.h ('k') | cc/contents_scaling_layer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/contents_scaling_layer.cc
diff --git a/cc/contents_scaling_layer.cc b/cc/contents_scaling_layer.cc
index 2e041a1ee0b18c5e12ac8cec4b25134043e8969a..1b5443b0b652cc82e27aa15c2074bf7c163742e7 100644
--- a/cc/contents_scaling_layer.cc
+++ b/cc/contents_scaling_layer.cc
@@ -5,6 +5,7 @@
#include "config.h"
#include "cc/contents_scaling_layer.h"
+#include "ui/gfx/size_conversions.h"
namespace cc {
@@ -15,9 +16,8 @@ ContentsScalingLayer::ContentsScalingLayer()
ContentsScalingLayer::~ContentsScalingLayer() {
}
-IntSize ContentsScalingLayer::contentBounds() const {
- return IntSize(ceil(bounds().width() * contentsScaleX()),
- ceil(bounds().height() * contentsScaleY()));
+gfx::Size ContentsScalingLayer::contentBounds() const {
+ return gfx::ToCeiledSize(bounds().Scale(contentsScaleX(), contentsScaleY()));
}
float ContentsScalingLayer::contentsScaleX() const {
« no previous file with comments | « cc/contents_scaling_layer.h ('k') | cc/contents_scaling_layer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698