diff options
author | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 03:23:53 +0000 |
---|---|---|
committer | brettw@google.com <brettw@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-14 03:23:53 +0000 |
commit | 308b5e017464f310252b77dd52752de120aa98e7 (patch) | |
tree | 7d24b6b9854592fda3d8cd02ec507131c1a64571 | |
parent | f02b87431ba2174fe6b22d893ded486fc0cd499e (diff) | |
download | chromium_src-308b5e017464f310252b77dd52752de120aa98e7.zip chromium_src-308b5e017464f310252b77dd52752de120aa98e7.tar.gz chromium_src-308b5e017464f310252b77dd52752de120aa98e7.tar.bz2 |
Remove base dependency from SkiaUtils, fix namespaces and includes.
Review URL: http://codereview.chromium.org/10918
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5444 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/webframe_impl.cc | 1 | ||||
-rw-r--r-- | webkit/glue/webwidget_impl.cc | 1 | ||||
-rw-r--r-- | webkit/port/platform/graphics/FontWin.cpp | 1 | ||||
-rw-r--r-- | webkit/port/platform/graphics/GraphicsContextSkia.cpp | 2 | ||||
-rw-r--r-- | webkit/port/platform/graphics/IconWin.cpp | 4 | ||||
-rw-r--r-- | webkit/port/platform/graphics/ImageSkia.cpp | 1 | ||||
-rw-r--r-- | webkit/port/platform/graphics/SkiaUtils.cpp | 7 | ||||
-rw-r--r-- | webkit/port/platform/graphics/SkiaUtils.h | 15 | ||||
-rw-r--r-- | webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp | 1 | ||||
-rw-r--r-- | webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp | 2 |
10 files changed, 22 insertions, 13 deletions
diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc index 653cf23..511b5d0 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -95,6 +95,7 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "HistoryItem.h" #include "markup.h" #include "Page.h" +#include "PlatformContextSkia.h" #include "RenderFrame.h" #include "RenderWidget.h" #include "ReplaceSelectionCommand.h" diff --git a/webkit/glue/webwidget_impl.cc b/webkit/glue/webwidget_impl.cc index 7e7a218..262b9b3 100644 --- a/webkit/glue/webwidget_impl.cc +++ b/webkit/glue/webwidget_impl.cc @@ -11,6 +11,7 @@ MSVC_PUSH_WARNING_LEVEL(0); #include "FramelessScrollView.h" #include "FrameView.h" #include "IntRect.h" +#include "PlatformContextSkia.h" #include "PlatformKeyboardEvent.h" #include "PlatformMouseEvent.h" #include "PlatformWheelEvent.h" diff --git a/webkit/port/platform/graphics/FontWin.cpp b/webkit/port/platform/graphics/FontWin.cpp index 565a44a..e881247 100644 --- a/webkit/port/platform/graphics/FontWin.cpp +++ b/webkit/port/platform/graphics/FontWin.cpp @@ -30,6 +30,7 @@ #include "Font.h" #include "FontFallbackList.h" #include "GlyphBuffer.h" +#include "PlatformContextSkia.h" #include "SimpleFontData.h" #include "UniscribeStateTextRun.h" diff --git a/webkit/port/platform/graphics/GraphicsContextSkia.cpp b/webkit/port/platform/graphics/GraphicsContextSkia.cpp index 78ed6ce..c85a6e1 100644 --- a/webkit/port/platform/graphics/GraphicsContextSkia.cpp +++ b/webkit/port/platform/graphics/GraphicsContextSkia.cpp @@ -29,10 +29,12 @@ #include "IntRect.h" #include "NativeImageSkia.h" #include "NotImplemented.h" +#include "PlatformContextSkia.h" #include "SkBitmap.h" #include "SkBlurDrawLooper.h" #include "SkCornerPathEffect.h" #include "SkiaUtils.h" +#include "SkShader.h" #include "wtf/MathExtras.h" #include "base/gfx/platform_canvas.h" diff --git a/webkit/port/platform/graphics/IconWin.cpp b/webkit/port/platform/graphics/IconWin.cpp index cd16ef2..4d640cc 100644 --- a/webkit/port/platform/graphics/IconWin.cpp +++ b/webkit/port/platform/graphics/IconWin.cpp @@ -23,9 +23,9 @@ #include <windows.h> #include <shellapi.h> -#include "Icon.h" - #include "GraphicsContext.h" +#include "Icon.h" +#include "PlatformContextSkia.h" #include "PlatformString.h" #include "SkiaUtils.h" diff --git a/webkit/port/platform/graphics/ImageSkia.cpp b/webkit/port/platform/graphics/ImageSkia.cpp index e84ec8f5..47815d4 100644 --- a/webkit/port/platform/graphics/ImageSkia.cpp +++ b/webkit/port/platform/graphics/ImageSkia.cpp @@ -38,6 +38,7 @@ #include "Logging.h" #include "NativeImageSkia.h" #include "NotImplemented.h" +#include "PlatformContextSkia.h" #include "PlatformString.h" #include "ScrollbarTheme.h" diff --git a/webkit/port/platform/graphics/SkiaUtils.cpp b/webkit/port/platform/graphics/SkiaUtils.cpp index 1600e30..1e9c6c5 100644 --- a/webkit/port/platform/graphics/SkiaUtils.cpp +++ b/webkit/port/platform/graphics/SkiaUtils.cpp @@ -37,10 +37,7 @@ #include "SkMatrix.h" #include "SkRegion.h" -#include "base/basictypes.h" -#if defined(OS_WIN) -#include "base/gfx/gdi_util.h" -#endif +namespace WebCore { void WebCorePointToSkiaPoint(const WebCore::FloatPoint& src, SkPoint* dst) { @@ -228,3 +225,5 @@ bool SkPathContainsPoint(SkPath* orig_path, WebCore::FloatPoint point, SkPath::F orig_path->setFillType(orig_ft); // restore return contains; } + +} // namespace WebCore
\ No newline at end of file diff --git a/webkit/port/platform/graphics/SkiaUtils.h b/webkit/port/platform/graphics/SkiaUtils.h index 0302c1c..4373e7e 100644 --- a/webkit/port/platform/graphics/SkiaUtils.h +++ b/webkit/port/platform/graphics/SkiaUtils.h @@ -7,15 +7,16 @@ #ifndef SkiaUtils_h #define SkiaUtils_h -#include <wtf/PassRefPtr.h> -#include "base/float_util.h" +#include <wtf/MathExtras.h> #include "GraphicsContext.h" #include "SkPath.h" -#include "SkShader.h" -#include "PlatformContextSkia.h" +#include "SkPorterDuff.h" +class SkCanvas; class SkRegion; +namespace WebCore { + // Converts a WebCore composit operation (WebCore::Composite*) to the // corresponding Skia type. SkPorterDuff::Mode WebCoreCompositeToSkiaComposite(WebCore::CompositeOperator); @@ -28,11 +29,11 @@ WebCore::Color SkPMColorToWebCoreColor(SkPMColor pm); // Skia has problems when passed infinite, etc floats, filter them to 0. inline SkScalar WebCoreFloatToSkScalar(const float& f) { - return SkFloatToScalar(base::IsFinite(f) ? f : 0); + return SkFloatToScalar(isfinite(f) ? f : 0); } inline SkScalar WebCoreDoubleToSkScalar(const double& d) { - return SkDoubleToScalar(base::IsFinite(d) ? d : 0); + return SkDoubleToScalar(isfinite(d) ? d : 0); } // Intersects the given source rect with the region, returning the smallest @@ -53,4 +54,6 @@ void ClipRectToCanvas(const SkCanvas& canvas, const SkRect& src_rect, // Determine if a given WebKit point is contained in a path bool SkPathContainsPoint(SkPath* orig_path, WebCore::FloatPoint point, SkPath::FillType ft); +} // namespace WebCore + #endif // SkiaUtils_h diff --git a/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp b/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp index 3771d99..3b8b61b 100644 --- a/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp +++ b/webkit/port/platform/graphics/svg/SVGPaintServerGradientSkia.cpp @@ -36,6 +36,7 @@ #include "GraphicsContext.h" #include "Path.h" +#include "PlatformContextSkia.h" #include "RenderObject.h" #include "RenderPath.h" #include "RenderStyle.h" diff --git a/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp b/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp index be2a4e99..79776d8 100644 --- a/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp +++ b/webkit/port/platform/graphics/svg/SVGPaintServerSkia.cpp @@ -34,7 +34,7 @@ #include "GraphicsContext.h" #include "RenderPath.h" - +#include "PlatformContextSkia.h" #include "SkiaUtils.h" namespace WebCore { |