From 21f527e6a4a812b604dd0891b27878d8418c04d9 Mon Sep 17 00:00:00 2001 From: "brettw@google.com" Date: Wed, 17 Dec 2008 23:29:40 +0000 Subject: Move the "platform" wrappers in skia/ext to the skia namespace. Review URL: http://codereview.chromium.org/14110 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7182 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/renderer/render_view.cc | 8 ++++---- chrome/renderer/render_widget.cc | 2 +- chrome/renderer/webplugin_delegate_proxy.cc | 4 ++-- chrome/renderer/webplugin_delegate_proxy.h | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) (limited to 'chrome/renderer') diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 87dc54e..9a06b1c 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -512,7 +512,7 @@ void RenderView::PrintPage(const ViewMsg_PrintPage_Params& params, emf.CreateDc(NULL, NULL); HDC hdc = emf.hdc(); DCHECK(hdc); - gfx::PlatformDeviceWin::InitializeDC(hdc); + skia::PlatformDeviceWin::InitializeDC(hdc); gfx::Rect rect; frame->GetPageRect(params.page_number, &rect); @@ -536,7 +536,7 @@ void RenderView::PrintPage(const ViewMsg_PrintPage_Params& params, // GDI drawing code fails. // Mix of Skia and GDI based. - gfx::PlatformCanvasWin canvas(src_size_x, src_size_y, true); + skia::PlatformCanvasWin canvas(src_size_x, src_size_y, true); canvas.drawARGB(255, 255, 255, 255, SkPorterDuff::kSrc_Mode); PlatformContextSkia context(&canvas); if (!frame->SpoolPage(params.page_number, &context)) { @@ -562,7 +562,7 @@ void RenderView::PrintPage(const ViewMsg_PrintPage_Params& params, DCHECK(retval != GDI_ERROR); #else // 100% GDI based. - gfx::VectorCanvas canvas(hdc, src_size_x, src_size_y); + skia::VectorCanvas canvas(hdc, src_size_x, src_size_y); // Set the clipping region to be sure to not overflow. SkRect clip_rect; clip_rect.set(0, 0, SkIntToScalar(src_size_x), SkIntToScalar(src_size_y)); @@ -756,7 +756,7 @@ bool RenderView::CaptureThumbnail(WebFrame* frame, double begin = time_util::GetHighResolutionTimeNow(); #endif - scoped_ptr device; + scoped_ptr device; if (!frame->CaptureImage(&device, true)) return false; diff --git a/chrome/renderer/render_widget.cc b/chrome/renderer/render_widget.cc index 40aee5f..c10b9e6 100644 --- a/chrome/renderer/render_widget.cc +++ b/chrome/renderer/render_widget.cc @@ -357,7 +357,7 @@ void RenderWidget::ClearFocus() { void RenderWidget::PaintRect(const gfx::Rect& rect, base::SharedMemory* paint_buf) { - gfx::PlatformCanvasWin canvas(rect.width(), rect.height(), true, + skia::PlatformCanvasWin canvas(rect.width(), rect.height(), true, paint_buf->handle()); // Bring the canvas into the coordinate system of the paint rect canvas.translate(static_cast(-rect.x()), diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc index 3bad2e4f..a268edf 100644 --- a/chrome/renderer/webplugin_delegate_proxy.cc +++ b/chrome/renderer/webplugin_delegate_proxy.cc @@ -410,13 +410,13 @@ void WebPluginDelegateProxy::ResetWindowlessBitmaps() { bool WebPluginDelegateProxy::CreateBitmap( scoped_ptr* memory, - scoped_ptr* canvas) { + scoped_ptr* canvas) { size_t size = GetPaintBufSize(plugin_rect_); scoped_ptr new_shared_memory(new base::SharedMemory()); if (!new_shared_memory->Create(L"", false, true, size)) return false; - scoped_ptr new_canvas(new gfx::PlatformCanvasWin); + scoped_ptr new_canvas(new skia::PlatformCanvasWin); if (!new_canvas->initialize(plugin_rect_.width(), plugin_rect_.height(), true, new_shared_memory->handle())) { return false; diff --git a/chrome/renderer/webplugin_delegate_proxy.h b/chrome/renderer/webplugin_delegate_proxy.h index 392682c..38e65e6 100644 --- a/chrome/renderer/webplugin_delegate_proxy.h +++ b/chrome/renderer/webplugin_delegate_proxy.h @@ -22,11 +22,11 @@ class GURL; struct PluginHostMsg_RouteToFrame_Params; class RenderView; class SkBitmap; -namespace gfx { + +namespace skia { class PlatformCanvasWin; } - // An implementation of WebPluginDelegate that proxies all calls to // the plugin process. class WebPluginDelegateProxy : public WebPluginDelegate, @@ -145,7 +145,7 @@ class WebPluginDelegateProxy : public WebPluginDelegate, // Creates a shared memory section and canvas. bool CreateBitmap(scoped_ptr* memory, - scoped_ptr* canvas); + scoped_ptr* canvas); RenderView* render_view_; WebPlugin* plugin_; @@ -182,11 +182,11 @@ class WebPluginDelegateProxy : public WebPluginDelegate, // for transparent plugins, as they need the backgroud data during painting. bool transparent_; scoped_ptr backing_store_; - scoped_ptr backing_store_canvas_; + scoped_ptr backing_store_canvas_; scoped_ptr transport_store_; - scoped_ptr transport_store_canvas_; + scoped_ptr transport_store_canvas_; scoped_ptr background_store_; - scoped_ptr background_store_canvas_; + scoped_ptr background_store_canvas_; // This lets us know which portion of the backing store has been painted into. gfx::Rect backing_store_painted_; -- cgit v1.1