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

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

Issue 6987019: Revert 86625 - This change implements a first pass in the effort to remove the dependency of Plat... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/renderer_host/render_widget_host_view_win.cc
===================================================================
--- chrome/browser/renderer_host/render_widget_host_view_win.cc (revision 86628)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -169,22 +169,20 @@
HDC backing_store_dc,
HDC paint_dc) {
gfx::CanvasSkia canvas(paint_rect.width(), paint_rect.height(), true);
- {
- skia::ScopedPlatformPaint scoped_platform_paint(&canvas);
- HDC dc = scoped_platform_paint.GetPlatformSurface();
- BitBlt(dc,
- 0,
- 0,
- paint_rect.width(),
- paint_rect.height(),
- backing_store_dc,
- paint_rect.x(),
- paint_rect.y(),
- SRCCOPY);
- }
+ HDC dc = canvas.beginPlatformPaint();
+ BitBlt(dc,
+ 0,
+ 0,
+ paint_rect.width(),
+ paint_rect.height(),
+ backing_store_dc,
+ paint_rect.x(),
+ paint_rect.y(),
+ SRCCOPY);
+ canvas.endPlatformPaint();
canvas.FillRectInt(color, 0, 0, paint_rect.width(), paint_rect.height());
- skia::DrawToNativeContext(&canvas, paint_dc, paint_rect.x(),
- paint_rect.y(), NULL);
+ canvas.getTopPlatformDevice().drawToHDC(paint_dc, paint_rect.x(),
+ paint_rect.y(), NULL);
}
// The plugin wrapper window which lives in the browser process has this proc
@@ -963,8 +961,8 @@
dc_rect.right - dc_rect.left,
dc_rect.bottom - dc_rect.top);
- skia::DrawToNativeContext(&canvas, *dc, dirty_rect.left, dirty_rect.top,
- NULL);
+ canvas.getTopPlatformDevice().drawToHDC(*dc, dirty_rect.left,
+ dirty_rect.top, NULL);
} else {
HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
dc->FillRect(&dirty_rect, white_brush);
« no previous file with comments | « chrome/browser/extensions/extension_tabs_module.cc ('k') | chrome/browser/tab_contents/thumbnail_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698