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

Unified Diff: chrome/browser/views/tabs/native_view_photobooth_win.cc

Issue 2825018: Canvas refactoring part 3.... (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/views/tabs/native_view_photobooth_win.cc
===================================================================
--- chrome/browser/views/tabs/native_view_photobooth_win.cc (revision 50661)
+++ chrome/browser/views/tabs/native_view_photobooth_win.cc (working copy)
@@ -5,7 +5,7 @@
#include "chrome/browser/views/tabs/native_view_photobooth_win.h"
#include "chrome/browser/tab_contents/tab_contents.h"
-#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "gfx/point.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "views/widget/widget_win.h"
@@ -100,7 +100,7 @@
// Transfer the contents of the layered capture window to the screen-shot
// canvas' DIB.
- HDC target_dc = canvas->beginPlatformPaint();
+ HDC target_dc = canvas->AsCanvasSkia()->beginPlatformPaint();
HDC source_dc = GetDC(current_hwnd_);
RECT window_rect = {0};
GetWindowRect(current_hwnd_, &window_rect);
@@ -109,12 +109,11 @@
SRCCOPY);
// Windows screws up the alpha channel on all text it draws, and so we need
// to call makeOpaque _after_ the blit to correct for this.
- canvas->getTopPlatformDevice().makeOpaque(target_bounds.x(),
- target_bounds.y(),
- target_bounds.width(),
- target_bounds.height());
+ canvas->AsCanvasSkia()->getTopPlatformDevice().makeOpaque(
+ target_bounds.x(), target_bounds.y(), target_bounds.width(),
+ target_bounds.height());
ReleaseDC(current_hwnd_, source_dc);
- canvas->endPlatformPaint();
+ canvas->AsCanvasSkia()->endPlatformPaint();
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698