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

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

Issue 2862025: Canvas refactoring part 2.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 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 50452)
+++ chrome/browser/renderer_host/render_widget_host_view_win.cc (working copy)
@@ -31,6 +31,7 @@
#include "chrome/common/plugin_messages.h"
#include "chrome/common/render_messages.h"
#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "gfx/gdi_util.h"
#include "gfx/rect.h"
#include "grit/webkit_resources.h"
@@ -235,7 +236,7 @@
void DrawDeemphasized(const gfx::Rect& paint_rect,
HDC backing_store_dc,
HDC paint_dc) {
- gfx::Canvas canvas(paint_rect.width(), paint_rect.height(), true);
+ gfx::CanvasSkia canvas(paint_rect.width(), paint_rect.height(), true);
HDC dc = canvas.beginPlatformPaint();
BitBlt(dc,
0,
@@ -676,7 +677,7 @@
if (!paint_rect.Intersect(resize_corner_rect).IsEmpty()) {
SkBitmap* bitmap = ResourceBundle::GetSharedInstance().
GetBitmapNamed(IDR_TEXTAREA_RESIZER);
- gfx::Canvas canvas(bitmap->width(), bitmap->height(), false);
+ gfx::CanvasSkia canvas(bitmap->width(), bitmap->height(), false);
canvas.getDevice()->accessBitmap(true).eraseARGB(0, 0, 0, 0);
int x = resize_corner_rect.x() + resize_corner_rect.width() -
bitmap->width();
@@ -990,9 +991,9 @@
void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect,
CPaintDC* dc) {
if (!background_.empty()) {
- gfx::Canvas canvas(dirty_rect.right - dirty_rect.left,
- dirty_rect.bottom - dirty_rect.top,
- true); // opaque
+ gfx::CanvasSkia canvas(dirty_rect.right - dirty_rect.left,
+ dirty_rect.bottom - dirty_rect.top,
+ true); // opaque
canvas.TranslateInt(-dirty_rect.left, -dirty_rect.top);
const RECT& dc_rect = dc->m_ps.rcPaint;

Powered by Google App Engine
This is Rietveld 408576698