summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/tabs/native_view_photobooth_win.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 23:30:26 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-24 23:30:26 +0000
commita219f823813abcf778eceea2eb81f2d3967009a8 (patch)
treee1a9e06b697d539260472a9faa2ea86d5984a4bf /chrome/browser/views/tabs/native_view_photobooth_win.cc
parent755e1b73a0b4894ecc36401fd042c744e7837844 (diff)
downloadchromium_src-a219f823813abcf778eceea2eb81f2d3967009a8.zip
chromium_src-a219f823813abcf778eceea2eb81f2d3967009a8.tar.gz
chromium_src-a219f823813abcf778eceea2eb81f2d3967009a8.tar.bz2
Canvas refactoring part 3.
- Replace Canvas instance users with CanvasSkia users. - Rename Canvas2 to Canvas. - Delete Canvas subclass of CanvasSkia. This has created some ugliness around the fact that people that used SkCanvas methods on Canvas now have to go through AsCanvasSkia first. This is temporary ugliness that will be eradicated as I incrementally build out the new Canvas API. BUG=none TEST=none Review URL: http://codereview.chromium.org/2825018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50784 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/tabs/native_view_photobooth_win.cc')
-rw-r--r--chrome/browser/views/tabs/native_view_photobooth_win.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/chrome/browser/views/tabs/native_view_photobooth_win.cc b/chrome/browser/views/tabs/native_view_photobooth_win.cc
index 8920a9b..1eb3125 100644
--- a/chrome/browser/views/tabs/native_view_photobooth_win.cc
+++ b/chrome/browser/views/tabs/native_view_photobooth_win.cc
@@ -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 @@ void NativeViewPhotoboothWin::PaintScreenshotIntoCanvas(
// 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 @@ void NativeViewPhotoboothWin::PaintScreenshotIntoCanvas(
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();
}
///////////////////////////////////////////////////////////////////////////////