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

Unified Diff: chrome/browser/ui/views/tabs/dragged_tab_view.cc

Issue 10701063: Cleanup gfx::Canvas now that 10562027 has landed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/ui/views/omnibox/omnibox_view_win.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/dragged_tab_view.cc
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_view.cc b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
index 49e14319020bc8e46a94bb171fa3e82db986c893..cb0ff4d3608896fdae9af1082b4cf99170060160 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_view.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_view.cc
@@ -133,7 +133,8 @@ gfx::Size DraggedTabView::GetPreferredSize() {
void DraggedTabView::PaintDetachedView(gfx::Canvas* canvas) {
gfx::Size ps = GetPreferredSize();
- gfx::Canvas scale_canvas(ps, false);
+ // TODO(pkotwicz): DIP enable this class.
+ gfx::Canvas scale_canvas(ps, ui::SCALE_FACTOR_100P, false);
SkBitmap& bitmap_device = const_cast<SkBitmap&>(
skia::GetTopDevice(*scale_canvas.sk_canvas())->accessBitmap(true));
bitmap_device.eraseARGB(0, 0, 0, 0);
@@ -153,7 +154,7 @@ void DraggedTabView::PaintDetachedView(gfx::Canvas* canvas) {
SkIRect subset;
subset.set(0, 0, ps.width(), ps.height());
- SkBitmap mipmap = scale_canvas.ExtractBitmap();
+ SkBitmap mipmap = scale_canvas.ExtractImageRep().sk_bitmap();
mipmap.buildMipMap(true);
SkShader* bitmap_shader =
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_view_win.cc ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698