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

Unified Diff: ui/base/dragdrop/drag_utils_win.cc

Issue 10447053: Converts remainder of ui and chrome/browser/ui/views/frame to use ImageSkia (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | « ui/base/dragdrop/drag_utils_gtk.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/drag_utils_win.cc
diff --git a/ui/base/dragdrop/drag_utils_win.cc b/ui/base/dragdrop/drag_utils_win.cc
index f3ef3bfea4b8a5e5e642018e5d105ad0c4baf16e..f7d05ee686140b21d91fed635717221b65512549 100644
--- a/ui/base/dragdrop/drag_utils_win.cc
+++ b/ui/base/dragdrop/drag_utils_win.cc
@@ -14,6 +14,7 @@
#include "ui/base/dragdrop/os_exchange_data_provider_win.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/gdi_util.h"
+#include "ui/gfx/image/image_skia.h"
#include "ui/gfx/skbitmap_operations.h"
namespace drag_utils {
@@ -53,7 +54,7 @@ static HBITMAP CreateHBITMAPFromSkBitmap(const SkBitmap& sk_bitmap) {
return bitmap;
}
-void SetDragImageOnDataObject(const SkBitmap& sk_bitmap,
+void SetDragImageOnDataObject(const gfx::ImageSkia& image_skia,
const gfx::Size& size,
const gfx::Point& cursor_offset,
ui::OSExchangeData* data_object) {
@@ -62,7 +63,7 @@ void SetDragImageOnDataObject(const SkBitmap& sk_bitmap,
// by premultiplied colors, so unpremultiply the bitmap.
// SetDragImageOnDataObject(HBITMAP) takes ownership of the bitmap.
HBITMAP bitmap = CreateHBITMAPFromSkBitmap(
- SkBitmapOperations::UnPreMultiply(sk_bitmap));
+ SkBitmapOperations::UnPreMultiply(*image_skia.bitmap()));
// Attach 'bitmap' to the data_object.
SetDragImageOnDataObject(bitmap, size, cursor_offset,
« no previous file with comments | « ui/base/dragdrop/drag_utils_gtk.cc ('k') | ui/base/dragdrop/os_exchange_data_provider_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698