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

Side by Side Diff: chrome/browser/renderer_host/backing_store_win.cc

Issue 506013: Combine ViewHostMsg_{Paint,Scroll}Rect into one IPC.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/renderer_host/backing_store.h" 5 #include "chrome/browser/renderer_host/backing_store.h"
6 6
7 #include "app/gfx/gdi_util.h" 7 #include "app/gfx/gdi_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/renderer_host/render_widget_host.h" 9 #include "chrome/browser/renderer_host/render_widget_host.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 paint_rect.width(), 139 paint_rect.width(),
140 paint_rect.height(), 140 paint_rect.height(),
141 paint_rect.x() - bitmap_rect.x(), 141 paint_rect.x() - bitmap_rect.x(),
142 paint_rect.y() - bitmap_rect.y(), 142 paint_rect.y() - bitmap_rect.y(),
143 paint_rect.width(), 143 paint_rect.width(),
144 paint_rect.height(), 144 paint_rect.height(),
145 bitmap->memory(), 145 bitmap->memory(),
146 reinterpret_cast<BITMAPINFO*>(&hdr)); 146 reinterpret_cast<BITMAPINFO*>(&hdr));
147 } 147 }
148 148
149 void BackingStore::ScrollRect(base::ProcessHandle process, 149 void BackingStore::ScrollRect(int dx, int dy,
150 TransportDIB* bitmap,
151 const gfx::Rect& bitmap_rect,
152 int dx, int dy,
153 const gfx::Rect& clip_rect, 150 const gfx::Rect& clip_rect,
154 const gfx::Size& view_size) { 151 const gfx::Size& view_size) {
155 RECT damaged_rect, r = clip_rect.ToRECT(); 152 RECT damaged_rect, r = clip_rect.ToRECT();
156 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect); 153 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect);
157 154
158 // TODO(darin): this doesn't work if dx and dy are both non-zero! 155 // TODO(darin): this doesn't work if dx and dy are both non-zero!
159 DCHECK(dx == 0 || dy == 0); 156 DCHECK(dx == 0 || dy == 0);
160
161 // We expect that damaged_rect should equal bitmap_rect.
162 DCHECK(gfx::Rect(damaged_rect) == bitmap_rect);
163
164 PaintRect(process, bitmap, bitmap_rect, bitmap_rect);
165 } 157 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/backing_store_mac.mm ('k') | chrome/browser/renderer_host/backing_store_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698