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

Unified Diff: content/browser/android/edge_effect_l.cc

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 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
Index: content/browser/android/edge_effect_l.cc
diff --git a/content/browser/android/edge_effect_l.cc b/content/browser/android/edge_effect_l.cc
index e963b222bbae558ad5bce82de6e6878e66709d33..8545b9fb48e4eb73fc7b1a1b5d614454970d7596 100644
--- a/content/browser/android/edge_effect_l.cc
+++ b/content/browser/android/edge_effect_l.cc
@@ -9,6 +9,7 @@
#include "content/public/browser/android/compositor.h"
#include "ui/android/resources/resource_manager.h"
#include "ui/android/resources/system_ui_resource_type.h"
+#include "ui/gfx/geometry/rect_f.h"
#include "ui/gfx/geometry/size_conversions.h"
namespace content {
@@ -248,7 +249,7 @@ void EdgeEffectL::ApplyToLayers(Edge edge,
const float displacement = Clamp(displacement_, 0.f, 1.f) - 0.5f;
const float displacement_offset_x = bounds_.width() * displacement * 0.5f;
const float image_offset_x = (bounds_.width() - image_bounds.width()) * 0.5f;
- gfx::RectF image_rect(image_bounds);
+ gfx::RectF image_rect = gfx::RectF(gfx::SizeF(image_bounds));
image_rect.Offset(image_offset_x - displacement_offset_x, -std::abs(offset));
// Clip the image rect against the viewport. If either rect is empty there's
« no previous file with comments | « content/browser/android/content_view_core_impl.cc ('k') | content/browser/devtools/protocol/page_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698