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

Unified Diff: cc/layer_tree_host_impl.cc

Issue 11358240: ui: Add methods to Rect classes to get points at each of the rect's corners. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update cc 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/layer_impl.cc ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 8ea79c2975c1f8ae9477094c60f31672fbd7e5d6..b558568b008981c4a7a897bf10ff5bd45b55708f 100644
--- a/cc/layer_tree_host_impl.cc
+++ b/cc/layer_tree_host_impl.cc
@@ -14,7 +14,6 @@
#include "cc/delay_based_time_source.h"
#include "cc/font_atlas.h"
#include "cc/frame_rate_counter.h"
-#include "cc/geometry.h"
#include "cc/gl_renderer.h"
#include "cc/heads_up_display_layer_impl.h"
#include "cc/layer_iterator.h"
@@ -1016,7 +1015,7 @@ void LayerTreeHostImpl::updateMaxScrollOffset()
viewBounds.Scale(1 / m_pinchZoomViewport.pageScaleDelta());
}
- gfx::Vector2dF maxScroll = BottomRight(gfx::Rect(contentBounds)) - BottomRight(gfx::RectF(viewBounds));
+ gfx::Vector2dF maxScroll = gfx::Rect(contentBounds).bottom_right() - gfx::RectF(viewBounds).bottom_right();
maxScroll.Scale(1 / m_deviceScaleFactor);
// The viewport may be larger than the contents in some cases, such as
@@ -1309,7 +1308,7 @@ void LayerTreeHostImpl::computePinchZoomDeltas(ScrollAndScaleSet* scrollInfo)
gfx::Vector2dF scrollEnd = scrollBegin + anchorOffset;
scrollEnd.Scale(m_pinchZoomViewport.minPageScaleFactor() / scaleBegin);
scrollEnd -= anchorOffset;
- scrollEnd.ClampToMax(BottomRight(gfx::RectF(scaledContentsSize)) - BottomRight(gfx::Rect(m_deviceViewportSize)));
+ scrollEnd.ClampToMax(gfx::RectF(scaledContentsSize).bottom_right() - gfx::Rect(m_deviceViewportSize).bottom_right());
scrollEnd.ClampToMin(gfx::Vector2d());
scrollEnd.Scale(1 / pageScaleDeltaToSend);
scrollEnd.Scale(m_deviceScaleFactor);
« no previous file with comments | « cc/layer_impl.cc ('k') | cc/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698