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

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: 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
Index: cc/layer_tree_host_impl.cc
diff --git a/cc/layer_tree_host_impl.cc b/cc/layer_tree_host_impl.cc
index 32366d3157efe2dd6c73d2d3a8e3dcb3bcbe4ce6..6ed270f3524f0bab80459973d9ac3253d7bf6bc1 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"
@@ -998,7 +997,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).BottomRight() - gfx::RectF(viewBounds).BottomRight();
maxScroll.Scale(1 / m_deviceScaleFactor);
// The viewport may be larger than the contents in some cases, such as
@@ -1291,7 +1290,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).BottomRight() - gfx::Rect(m_deviceViewportSize).BottomRight());
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') | ui/gfx/rect_base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698