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

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

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 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 15beefbefd6245eb7c00a17f087332fc43b6f34e..ff9d53fc3f3d99d671af96c4080b3e2911c8c18b 100644
--- a/content/browser/renderer_host/render_widget_host_view_win.cc
+++ b/content/browser/renderer_host/render_widget_host_view_win.cc
@@ -162,7 +162,7 @@ void DrawDeemphasized(const SkColor& color,
HDC paint_dc) {
gfx::CanvasSkia canvas(paint_rect.width(), paint_rect.height(), true);
{
- skia::ScopedPlatformPaint scoped_platform_paint(&canvas);
+ skia::ScopedPlatformPaint scoped_platform_paint(canvas.sk_canvas());
HDC dc = scoped_platform_paint.GetPlatformSurface();
BitBlt(dc,
0,
@@ -175,7 +175,7 @@ void DrawDeemphasized(const SkColor& color,
SRCCOPY);
}
canvas.FillRectInt(color, 0, 0, paint_rect.width(), paint_rect.height());
- skia::DrawToNativeContext(&canvas, paint_dc, paint_rect.x(),
+ skia::DrawToNativeContext(canvas.sk_canvas(), paint_dc, paint_rect.x(),
paint_rect.y(), NULL);
}
@@ -966,8 +966,8 @@ void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect,
dc_rect.right - dc_rect.left,
dc_rect.bottom - dc_rect.top);
- skia::DrawToNativeContext(&canvas, *dc, dirty_rect.left, dirty_rect.top,
- NULL);
+ skia::DrawToNativeContext(canvas.sk_canvas(), *dc, dirty_rect.left,
+ dirty_rect.top, NULL);
} else {
HBRUSH white_brush = reinterpret_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
dc->FillRect(&dirty_rect, white_brush);

Powered by Google App Engine
This is Rietveld 408576698