diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 23:29:40 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-17 23:29:40 +0000 |
commit | 21f527e6a4a812b604dd0891b27878d8418c04d9 (patch) | |
tree | 4dec5cb778e0b0755606f1d2113b3b6097188f85 /chrome | |
parent | f8a2599cd63347322133ffa5c89195d66dc3d4b3 (diff) | |
download | chromium_src-21f527e6a4a812b604dd0891b27878d8418c04d9.zip chromium_src-21f527e6a4a812b604dd0891b27878d8418c04d9.tar.gz chromium_src-21f527e6a4a812b604dd0891b27878d8418c04d9.tar.bz2 |
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
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/printing/printed_document.cc | 2 | ||||
-rw-r--r-- | chrome/browser/printing/printing_layout_uitest.cc | 2 | ||||
-rw-r--r-- | chrome/browser/printing/win_printing_context.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/theme_helpers.cc | 4 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_canvas.h | 4 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_canvas_skia.cc | 4 | ||||
-rw-r--r-- | chrome/common/gfx/chrome_canvas_win.cc | 4 | ||||
-rw-r--r-- | chrome/plugin/webplugin_delegate_stub.cc | 2 | ||||
-rw-r--r-- | chrome/plugin/webplugin_proxy.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 8 | ||||
-rw-r--r-- | chrome/renderer/render_widget.cc | 2 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.cc | 4 | ||||
-rw-r--r-- | chrome/renderer/webplugin_delegate_proxy.h | 12 |
13 files changed, 26 insertions, 26 deletions
diff --git a/chrome/browser/printing/printed_document.cc b/chrome/browser/printing/printed_document.cc index f6e783c..7108f83 100644 --- a/chrome/browser/printing/printed_document.cc +++ b/chrome/browser/printing/printed_document.cc @@ -103,7 +103,7 @@ void PrintedDocument::RenderPrintedPage(const PrintedPage& page, // the device context. int saved_state = SaveDC(context); DCHECK_NE(saved_state, 0); - gfx::PlatformDeviceWin::InitializeDC(context); + skia::PlatformDeviceWin::InitializeDC(context); { // Save the state (again) to apply the necessary world transformation. int saved_state = SaveDC(context); diff --git a/chrome/browser/printing/printing_layout_uitest.cc b/chrome/browser/printing/printing_layout_uitest.cc index 8a15aa4..a8c5059 100644 --- a/chrome/browser/printing/printing_layout_uitest.cc +++ b/chrome/browser/printing/printing_layout_uitest.cc @@ -172,7 +172,7 @@ class Image { &bits, NULL, 0); EXPECT_TRUE(bitmap); EXPECT_TRUE(SelectObject(hdc, bitmap)); - gfx::PlatformDeviceWin::InitializeDC(hdc); + skia::PlatformDeviceWin::InitializeDC(hdc); EXPECT_TRUE(emf.Playback(hdc, NULL)); row_length_ = size_.width() * sizeof(uint32); size_t bytes = row_length_ * size_.height(); diff --git a/chrome/browser/printing/win_printing_context.cc b/chrome/browser/printing/win_printing_context.cc index 8fb9c28..1b8b055 100644 --- a/chrome/browser/printing/win_printing_context.cc +++ b/chrome/browser/printing/win_printing_context.cc @@ -377,7 +377,7 @@ bool PrintingContext::InitializeSettings(const DEVMODE& dev_mode, const std::wstring& new_device_name, const PRINTPAGERANGE* ranges, int number_ranges) { - gfx::PlatformDeviceWin::InitializeDC(hdc_); + skia::PlatformDeviceWin::InitializeDC(hdc_); DCHECK(GetDeviceCaps(hdc_, CLIPCAPS)); DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_STRETCHDIB); DCHECK(GetDeviceCaps(hdc_, RASTERCAPS) & RC_BITMAP64); diff --git a/chrome/browser/views/theme_helpers.cc b/chrome/browser/views/theme_helpers.cc index 710e1ee..ba18603 100644 --- a/chrome/browser/views/theme_helpers.cc +++ b/chrome/browser/views/theme_helpers.cc @@ -62,8 +62,8 @@ void GetRebarGradientColors(int width, int x1, int x2, SkColor* c1, SkColor* c2) // Extract the color values from the selected pixels // The | in the following operations forces the alpha to 0xFF. This is // needed as windows sets the alpha to 0 when it renders. - gfx::BitmapPlatformDeviceWin& device = - static_cast<gfx::BitmapPlatformDeviceWin&>(canvas.getTopPlatformDevice()); + skia::BitmapPlatformDeviceWin& device = + static_cast<skia::BitmapPlatformDeviceWin&>(canvas.getTopPlatformDevice()); *c1 = 0xFF000000 | device.getColorAt(x1, 0); *c2 = 0xFF000000 | device.getColorAt(x2, 0); } diff --git a/chrome/common/gfx/chrome_canvas.h b/chrome/common/gfx/chrome_canvas.h index 78b1cb1..0575b00 100644 --- a/chrome/common/gfx/chrome_canvas.h +++ b/chrome/common/gfx/chrome_canvas.h @@ -35,7 +35,7 @@ class Rect; // source and destination colors are combined. Unless otherwise specified, // the variant that does not take a SkPorterDuff::Mode uses a transfer mode // of kSrcOver_Mode. -class ChromeCanvas : public gfx::PlatformCanvas { +class ChromeCanvas : public skia::PlatformCanvas { public: // Specifies the alignment for text rendered with the DrawStringInt method. enum { @@ -182,7 +182,7 @@ class ChromeCanvas : public gfx::PlatformCanvas { }; #if defined(OS_WIN) -typedef gfx::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; +typedef skia::CanvasPaintT<ChromeCanvas> ChromeCanvasPaint; #endif #endif // CHROME_COMMON_GFX_CHROME_CANVAS_H_ diff --git a/chrome/common/gfx/chrome_canvas_skia.cc b/chrome/common/gfx/chrome_canvas_skia.cc index bbe3ca9..f68b347 100644 --- a/chrome/common/gfx/chrome_canvas_skia.cc +++ b/chrome/common/gfx/chrome_canvas_skia.cc @@ -15,10 +15,10 @@ #include "chrome/common/l10n_util.h" ChromeCanvas::ChromeCanvas(int width, int height, bool is_opaque) - : gfx::PlatformCanvasLinux(width, height, is_opaque) { + : skia::PlatformCanvasLinux(width, height, is_opaque) { } -ChromeCanvas::ChromeCanvas() : gfx::PlatformCanvasLinux() { +ChromeCanvas::ChromeCanvas() : skia::PlatformCanvasLinux() { } ChromeCanvas::~ChromeCanvas() { diff --git a/chrome/common/gfx/chrome_canvas_win.cc b/chrome/common/gfx/chrome_canvas_win.cc index 1c0442d..f28b0cb 100644 --- a/chrome/common/gfx/chrome_canvas_win.cc +++ b/chrome/common/gfx/chrome_canvas_win.cc @@ -91,10 +91,10 @@ int ComputeFormatFlags(int flags) { } // anonymous namespace ChromeCanvas::ChromeCanvas(int width, int height, bool is_opaque) - : gfx::PlatformCanvasWin(width, height, is_opaque) { + : skia::PlatformCanvasWin(width, height, is_opaque) { } -ChromeCanvas::ChromeCanvas() : gfx::PlatformCanvasWin() { +ChromeCanvas::ChromeCanvas() : skia::PlatformCanvasWin() { } ChromeCanvas::~ChromeCanvas() { diff --git a/chrome/plugin/webplugin_delegate_stub.cc b/chrome/plugin/webplugin_delegate_stub.cc index 1fc89cb..daebf40 100644 --- a/chrome/plugin/webplugin_delegate_stub.cc +++ b/chrome/plugin/webplugin_delegate_stub.cc @@ -217,7 +217,7 @@ void WebPluginDelegateStub::OnPrint(PluginMsg_PrintResponse_Params* params) { return; } HDC hdc = emf.hdc(); - gfx::PlatformDeviceWin::InitializeDC(hdc); + skia::PlatformDeviceWin::InitializeDC(hdc); delegate_->Print(hdc); if (!emf.CloseDc()) { NOTREACHED(); diff --git a/chrome/plugin/webplugin_proxy.cc b/chrome/plugin/webplugin_proxy.cc index 7ab78629..0bd6ed8 100644 --- a/chrome/plugin/webplugin_proxy.cc +++ b/chrome/plugin/webplugin_proxy.cc @@ -355,7 +355,7 @@ void WebPluginProxy::ConvertBuffer(const base::SharedMemoryHandle& buffer, return; } - gfx::PlatformDeviceWin::InitializeDC(hdc->Get()); + skia::PlatformDeviceWin::InitializeDC(hdc->Get()); SelectObject(hdc->Get(), bitmap->Get()); } 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<gfx::BitmapPlatformDevice> device; + scoped_ptr<skia::BitmapPlatformDevice> 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<SkScalar>(-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<base::SharedMemory>* memory, - scoped_ptr<gfx::PlatformCanvasWin>* canvas) { + scoped_ptr<skia::PlatformCanvasWin>* canvas) { size_t size = GetPaintBufSize(plugin_rect_); scoped_ptr<base::SharedMemory> new_shared_memory(new base::SharedMemory()); if (!new_shared_memory->Create(L"", false, true, size)) return false; - scoped_ptr<gfx::PlatformCanvasWin> new_canvas(new gfx::PlatformCanvasWin); + scoped_ptr<skia::PlatformCanvasWin> 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<base::SharedMemory>* memory, - scoped_ptr<gfx::PlatformCanvasWin>* canvas); + scoped_ptr<skia::PlatformCanvasWin>* 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<base::SharedMemory> backing_store_; - scoped_ptr<gfx::PlatformCanvasWin> backing_store_canvas_; + scoped_ptr<skia::PlatformCanvasWin> backing_store_canvas_; scoped_ptr<base::SharedMemory> transport_store_; - scoped_ptr<gfx::PlatformCanvasWin> transport_store_canvas_; + scoped_ptr<skia::PlatformCanvasWin> transport_store_canvas_; scoped_ptr<base::SharedMemory> background_store_; - scoped_ptr<gfx::PlatformCanvasWin> background_store_canvas_; + scoped_ptr<skia::PlatformCanvasWin> background_store_canvas_; // This lets us know which portion of the backing store has been painted into. gfx::Rect backing_store_painted_; |