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

Unified Diff: chrome/browser/views/tabs/dragged_tab_view.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
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.cc ('k') | chrome/browser/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/tabs/dragged_tab_view.cc
===================================================================
--- chrome/browser/views/tabs/dragged_tab_view.cc (revision 50452)
+++ chrome/browser/views/tabs/dragged_tab_view.cc (working copy)
@@ -6,6 +6,7 @@
#include "chrome/browser/views/tabs/native_view_photobooth.h"
#include "gfx/canvas.h"
+#include "gfx/canvas_skia.h"
#include "third_party/skia/include/core/SkShader.h"
#include "views/widget/widget.h"
@@ -185,7 +186,7 @@
void DraggedTabView::PaintDetachedView(gfx::Canvas* canvas) {
gfx::Size ps = GetPreferredSize();
- gfx::Canvas scale_canvas(ps.width(), ps.height(), false);
+ gfx::CanvasSkia scale_canvas(ps.width(), ps.height(), false);
SkBitmap& bitmap_device = const_cast<SkBitmap&>(
scale_canvas.getTopPlatformDevice().accessBitmap(true));
bitmap_device.eraseARGB(0, 0, 0, 0);
@@ -200,9 +201,9 @@
ps.height() - kTwiceDragFrameBorderSize - attached_tab_size_.height();
scale_canvas.FillRectInt(SK_ColorBLACK, image_x, image_y, image_w, image_h);
photobooth_->PaintScreenshotIntoCanvas(
- &scale_canvas,
+ scale_canvas.AsCanvas(),
gfx::Rect(image_x, image_y, image_w, image_h));
- renderer_->ProcessPaint(&scale_canvas);
+ renderer_->ProcessPaint(scale_canvas.AsCanvas());
SkIRect subset;
subset.set(0, 0, ps.width(), ps.height());
« no previous file with comments | « chrome/browser/views/tab_contents/tab_contents_view_win.cc ('k') | chrome/browser/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698