diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-02 22:35:42 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-12-02 22:35:42 +0000 |
commit | 004a96a015b5dfcadaad4ea1b192c97c415b75de (patch) | |
tree | cb32d3809e4366c07e837416a106a3083d2690a5 /webkit | |
parent | f8ed412acb7bcab9855d0ebd9d29f7e38a3a8f92 (diff) | |
download | chromium_src-004a96a015b5dfcadaad4ea1b192c97c415b75de.zip chromium_src-004a96a015b5dfcadaad4ea1b192c97c415b75de.tar.gz chromium_src-004a96a015b5dfcadaad4ea1b192c97c415b75de.tar.bz2 |
Move convolver, image_operations, and skia_utils from base/gfx to skia/ext.
This changes the namespace in those files from "gfx" to "skia".
I split skia_utils into two parts, the Windows specific part is now in a separate file called skia_utils_win.
There were several obsolete includes of these headers which I removed. I also removed img_resize_perftest which isn't used and has bitrotted.
Review URL: http://codereview.chromium.org/12842
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6248 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/port/platform/graphics/FontWin.cpp | 6 | ||||
-rw-r--r-- | webkit/port/platform/graphics/ImageSkia.cpp | 10 | ||||
-rw-r--r-- | webkit/port/platform/graphics/NativeImageSkia.cpp | 10 | ||||
-rw-r--r-- | webkit/port/platform/graphics/PlatformContextSkia.cpp | 2 | ||||
-rw-r--r-- | webkit/port/rendering/RenderThemeWin.cpp | 7 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_tests.vcproj | 8 |
6 files changed, 24 insertions, 19 deletions
diff --git a/webkit/port/platform/graphics/FontWin.cpp b/webkit/port/platform/graphics/FontWin.cpp index ac28623..0fa5a26 100644 --- a/webkit/port/platform/graphics/FontWin.cpp +++ b/webkit/port/platform/graphics/FontWin.cpp @@ -35,8 +35,8 @@ #include "SkiaUtils.h" #include "UniscribeHelperTextRun.h" -#include "base/gfx/skia_utils.h" // TODO(brettw) remove this dependency. #include "skia/ext/platform_canvas_win.h" +#include "skia/ext/skia_utils_win.h" namespace WebCore { @@ -69,7 +69,7 @@ void Font::drawGlyphs(GraphicsContext* graphicsContext, color = SkColorSetRGB(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color)); - SetTextColor(hdc, gfx::SkColorToCOLORREF(color)); + SetTextColor(hdc, skia::SkColorToCOLORREF(color)); SetBkMode(hdc, TRANSPARENT); // Windows needs the characters and the advances in nice contiguous @@ -168,7 +168,7 @@ void Font::drawComplexText(GraphicsContext* graphicsContext, color = SkColorSetRGB(SkColorGetR(color), SkColorGetG(color), SkColorGetB(color)); - SetTextColor(hdc, gfx::SkColorToCOLORREF(color)); + SetTextColor(hdc, skia::SkColorToCOLORREF(color)); SetBkMode(hdc, TRANSPARENT); // Uniscribe counts the coordinates from the upper left, while WebKit uses diff --git a/webkit/port/platform/graphics/ImageSkia.cpp b/webkit/port/platform/graphics/ImageSkia.cpp index cfdc739..12d5ae9 100644 --- a/webkit/port/platform/graphics/ImageSkia.cpp +++ b/webkit/port/platform/graphics/ImageSkia.cpp @@ -43,7 +43,7 @@ #include "SkiaUtils.h" #include "SkShader.h" -#include "base/gfx/image_operations.h" // TODO(brettw) remove this dependency. +#include "skia/ext/image_operations.h" #include "skia/ext/platform_canvas.h" namespace WebCore { @@ -217,8 +217,8 @@ void drawResampledBitmap(SkCanvas& canvas, destBitmapSubsetSkI.height()); // Resample the needed part of the image. - SkBitmap resampled = gfx::ImageOperations::Resize(subset, - gfx::ImageOperations::RESIZE_LANCZOS3, + SkBitmap resampled = skia::ImageOperations::Resize(subset, + skia::ImageOperations::RESIZE_LANCZOS3, gfx::Size(destRectRounded.width(), destRectRounded.height()), destBitmapSubset); @@ -350,8 +350,8 @@ void Image::drawPattern(GraphicsContext* context, if (resampling == RESAMPLE_AWESOME) { // Do nice resampling. - SkBitmap resampled = gfx::ImageOperations::Resize(src_subset, - gfx::ImageOperations::RESIZE_LANCZOS3, + SkBitmap resampled = skia::ImageOperations::Resize(src_subset, + skia::ImageOperations::RESIZE_LANCZOS3, gfx::Size(static_cast<int>(dest_bitmap_width), static_cast<int>(dest_bitmap_height))); shader = SkShader::CreateBitmapShader( diff --git a/webkit/port/platform/graphics/NativeImageSkia.cpp b/webkit/port/platform/graphics/NativeImageSkia.cpp index fb765eb..7158d06 100644 --- a/webkit/port/platform/graphics/NativeImageSkia.cpp +++ b/webkit/port/platform/graphics/NativeImageSkia.cpp @@ -28,12 +28,12 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "config.h" - -#include "base/gfx/image_operations.h" - #include "NativeImageSkia.h" + #include "SkiaUtils.h" +#include "skia/ext/image_operations.h" + NativeImageSkia::NativeImageSkia() : SkBitmap(), m_isDataComplete(false), @@ -61,8 +61,8 @@ bool NativeImageSkia::hasResizedBitmap(int w, int h) const { SkBitmap NativeImageSkia::resizedBitmap(int w, int h) const { if (m_resizedImage.width() != w || m_resizedImage.height() != h) { - m_resizedImage = gfx::ImageOperations::Resize(*this, - gfx::ImageOperations::RESIZE_LANCZOS3, gfx::Size(w, h)); + m_resizedImage = skia::ImageOperations::Resize(*this, + skia::ImageOperations::RESIZE_LANCZOS3, gfx::Size(w, h)); } return m_resizedImage; } diff --git a/webkit/port/platform/graphics/PlatformContextSkia.cpp b/webkit/port/platform/graphics/PlatformContextSkia.cpp index 06b3c0a..1c63927 100644 --- a/webkit/port/platform/graphics/PlatformContextSkia.cpp +++ b/webkit/port/platform/graphics/PlatformContextSkia.cpp @@ -34,8 +34,6 @@ #include "SkiaUtils.h" #include "wtf/MathExtras.h" -#include "base/gfx/image_operations.h" // TODO(brettw) remove this depencency. -#include "base/gfx/skia_utils.h" // TODO(brettw) remove this depencency. #include "skia/ext/platform_canvas.h" #include "SkBitmap.h" diff --git a/webkit/port/rendering/RenderThemeWin.cpp b/webkit/port/rendering/RenderThemeWin.cpp index 907a6e4..18d841c 100644 --- a/webkit/port/rendering/RenderThemeWin.cpp +++ b/webkit/port/rendering/RenderThemeWin.cpp @@ -37,9 +37,8 @@ #include "SkiaUtils.h" #include "ThemeHelperWin.h" -#include "base/gfx/native_theme.h" -#include "base/gfx/skia_utils.h" -#include "base/win_util.h" +#include "base/gfx/native_theme.h" // TODO(brettw) fix this dependency. +#include "base/win_util.h" // TODO(brettw) fix this dependency. namespace { @@ -572,7 +571,7 @@ bool RenderThemeWin::paintTextFieldInternal(RenderObject* o, gfx::PlatformCanvas* canvas = helper.context()->platformContext()->canvas(); HDC hdc = canvas->beginPlatformPaint(); - COLORREF clr = gfx::SkColorToCOLORREF(o->style()->backgroundColor().rgb()); + COLORREF clr = o->style()->backgroundColor().rgb(); RECT renderRect = helper.rect(); gfx::NativeTheme::instance()->PaintTextField(hdc, diff --git a/webkit/tools/test_shell/test_shell_tests.vcproj b/webkit/tools/test_shell/test_shell_tests.vcproj index 4f6a036..cebf759 100644 --- a/webkit/tools/test_shell/test_shell_tests.vcproj +++ b/webkit/tools/test_shell/test_shell_tests.vcproj @@ -307,6 +307,10 @@ > </File> <File + RelativePath="..\..\..\skia\ext\convolver_unittest.cc" + > + </File> + <File RelativePath="..\..\glue\cpp_bound_class_unittest.cc" > </File> @@ -339,6 +343,10 @@ > </File> <File + RelativePath="..\..\..\skia\ext\image_operations_unittest.cc" + > + </File> + <File RelativePath=".\keyboard_unittest.cc" > </File> |