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

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

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Syncing merge conflicts. Created 9 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/browser/renderer_host/backing_store_win.h" 5 #include "content/browser/renderer_host/backing_store_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/common/chrome_switches.h" 8 #include "chrome/common/chrome_switches.h"
9 #include "content/browser/renderer_host/render_process_host.h" 9 #include "content/browser/renderer_host/render_process_host.h"
10 #include "content/browser/renderer_host/render_widget_host.h" 10 #include "content/browser/renderer_host/render_widget_host.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 dib->memory(), 151 dib->memory(),
152 reinterpret_cast<BITMAPINFO*>(&hdr)); 152 reinterpret_cast<BITMAPINFO*>(&hdr));
153 } 153 }
154 } 154 }
155 155
156 bool BackingStoreWin::CopyFromBackingStore(const gfx::Rect& rect, 156 bool BackingStoreWin::CopyFromBackingStore(const gfx::Rect& rect,
157 skia::PlatformCanvas* output) { 157 skia::PlatformCanvas* output) {
158 if (!output->initialize(rect.width(), rect.height(), true)) 158 if (!output->initialize(rect.width(), rect.height(), true))
159 return false; 159 return false;
160 160
161 HDC temp_dc = output->beginPlatformPaint(); 161 skia::ScopedPlatformPaint scoped_platform_paint(output);
162 HDC temp_dc = scoped_platform_paint.GetPlatformSurface();
162 BitBlt(temp_dc, 0, 0, rect.width(), rect.height(), 163 BitBlt(temp_dc, 0, 0, rect.width(), rect.height(),
163 hdc(), rect.x(), rect.y(), SRCCOPY); 164 hdc(), rect.x(), rect.y(), SRCCOPY);
164 output->endPlatformPaint();
165 return true; 165 return true;
166 } 166 }
167 167
168 void BackingStoreWin::ScrollBackingStore(int dx, int dy, 168 void BackingStoreWin::ScrollBackingStore(int dx, int dy,
169 const gfx::Rect& clip_rect, 169 const gfx::Rect& clip_rect,
170 const gfx::Size& view_size) { 170 const gfx::Size& view_size) {
171 RECT damaged_rect, r = clip_rect.ToRECT(); 171 RECT damaged_rect, r = clip_rect.ToRECT();
172 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect); 172 ScrollDC(hdc_, dx, dy, NULL, &r, NULL, &damaged_rect);
173 173
174 // TODO(darin): this doesn't work if dx and dy are both non-zero! 174 // TODO(darin): this doesn't work if dx and dy are both non-zero!
175 DCHECK(dx == 0 || dy == 0); 175 DCHECK(dx == 0 || dy == 0);
176 } 176 }
OLDNEW
« no previous file with comments | « content/browser/renderer_host/backing_store_skia.cc ('k') | content/browser/renderer_host/backing_store_x.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698