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

Unified Diff: content/browser/renderer_host/render_widget_host_view_win.cc

Issue 11269022: Add Vector2d classes that represent offsets, instead of using Point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build 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
Index: content/browser/renderer_host/render_widget_host_view_win.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc
index 961010dc78651c0c71c39116adc4c3c6a9f4edfd..d7b8a51a6ff8382f256d5fc4a9f54f9dc6e98a6c 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -637,7 +637,7 @@ RenderWidgetHostViewWin::GetNativeViewAccessible() {
}
void RenderWidgetHostViewWin::MovePluginWindows(
- const gfx::Point& scroll_offset,
+ const gfx::Vector2d& scroll_offset,
const std::vector<webkit::npapi::WebPluginGeometry>& plugin_window_moves) {
MovePluginWindowsHelper(m_hWnd, plugin_window_moves);
}
@@ -1428,7 +1428,7 @@ void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect,
if (!background_.empty()) {
gfx::Rect dirty_area(dirty_rect);
gfx::Canvas canvas(dirty_area.size(), ui::SCALE_FACTOR_100P, true);
- canvas.Translate(gfx::Point().Subtract(dirty_area.origin()));
+ canvas.Translate(-dirty_area.DistanceFromOrigin());
gfx::Rect dc_rect(dc->m_ps.rcPaint);
// TODO(pkotwicz): Fix |background_| such that it is an ImageSkia.

Powered by Google App Engine
This is Rietveld 408576698