diff options
author | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-24 16:49:59 +0000 |
---|---|---|
committer | pkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-24 16:49:59 +0000 |
commit | 1bc3ef056eb9fd5bd5b8f479a7b839df5f7be8dd (patch) | |
tree | 6696875095afa91e8159e6c8afb9c6c64516d639 /content | |
parent | 0802253de60a80eddbe0d3627dda42747c9054cd (diff) | |
download | chromium_src-1bc3ef056eb9fd5bd5b8f479a7b839df5f7be8dd.zip chromium_src-1bc3ef056eb9fd5bd5b8f479a7b839df5f7be8dd.tar.gz chromium_src-1bc3ef056eb9fd5bd5b8f479a7b839df5f7be8dd.tar.bz2 |
Remove implicit conversion from SkBitmap to ImageSkia
BUG=154727
Test=None
R=rsesek
TBR=sky,jam
Review URL: https://chromiumcodereview.appspot.com/11099010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163848 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
3 files changed, 6 insertions, 10 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_win.cc b/content/browser/renderer_host/render_widget_host_view_win.cc index cf80df1..961010d 100644 --- a/content/browser/renderer_host/render_widget_host_view_win.cc +++ b/content/browser/renderer_host/render_widget_host_view_win.cc @@ -1431,7 +1431,9 @@ void RenderWidgetHostViewWin::DrawBackground(const RECT& dirty_rect, canvas.Translate(gfx::Point().Subtract(dirty_area.origin())); gfx::Rect dc_rect(dc->m_ps.rcPaint); - canvas.TileImageInt(background_, 0, 0, dc_rect.width(), dc_rect.height()); + // TODO(pkotwicz): Fix |background_| such that it is an ImageSkia. + canvas.TileImageInt(gfx::ImageSkia(background_), + 0, 0, dc_rect.width(), dc_rect.height()); skia::DrawToNativeContext(canvas.sk_canvas(), *dc, dirty_area.x(), dirty_area.y(), NULL); diff --git a/content/browser/web_contents/web_contents_drag_win.cc b/content/browser/web_contents/web_contents_drag_win.cc index 85ef3eb..a513315 100644 --- a/content/browser/web_contents/web_contents_drag_win.cc +++ b/content/browser/web_contents/web_contents_drag_win.cc @@ -176,17 +176,11 @@ void WebContentsDragWin::StartDragging(const WebDropData& drop_data, base::Thread::Options options; options.message_loop_type = MessageLoop::TYPE_UI; if (drag_drop_thread_->StartWithOptions(options)) { - gfx::Display display = - gfx::Screen::GetNativeScreen()->GetDisplayNearestWindow( - web_contents_->GetNativeView()); - ui::ScaleFactor scale_factor = ui::GetScaleFactorFromScale( - display.device_scale_factor()); drag_drop_thread_->message_loop()->PostTask( FROM_HERE, base::Bind(&WebContentsDragWin::StartBackgroundDragging, this, drop_data, ops, page_url, page_encoding, - image.GetRepresentation(scale_factor).sk_bitmap(), - image_offset)); + image, image_offset)); } EnableBackgroundDraggingSupport(drag_drop_thread_->thread_id()); @@ -197,7 +191,7 @@ void WebContentsDragWin::StartBackgroundDragging( WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Point& image_offset) { drag_drop_thread_id_ = base::PlatformThread::CurrentId(); diff --git a/content/browser/web_contents/web_contents_drag_win.h b/content/browser/web_contents/web_contents_drag_win.h index f60401c..73c65c1 100644 --- a/content/browser/web_contents/web_contents_drag_win.h +++ b/content/browser/web_contents/web_contents_drag_win.h @@ -83,7 +83,7 @@ class CONTENT_EXPORT WebContentsDragWin WebKit::WebDragOperationsMask ops, const GURL& page_url, const std::string& page_encoding, - const SkBitmap& image, + const gfx::ImageSkia& image, const gfx::Point& image_offset); // Called on UI thread. void EndDragging(); |