[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc
senorblanco at chromium.org
senorblanco at chromium.org
Wed Dec 22 11:41:08 UTC 2010
The following commit has been merged in the debian/experimental branch:
commit 53d9f01f3073a38746323a9f41f2a98d102c669d
Author: senorblanco at chromium.org <senorblanco at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Aug 3 20:23:05 2010 +0000
2010-07-30 Stephen White <senorblanco at chromium.org>
Reviewed by Ojan Vafai.
Move PlatformContextSkia and NativeImageSkia into the WebCore namespace.
https://bugs.webkit.org/show_bug.cgi?id=43272
One wrinkle is that PlatformContext and NativeImagePtr are
typedef'ed outside outside the WebCore namespace block, so the
PlatformContextSkia and NativeImageSkia have to be forward-declared
explicitly within that namespace. Another solution might be to move
those declarations into the WebCore namespace block below, but that
would affect platforms other than Skia, so I leave it to the reviewer
to decide.
Test: if it compiles, you're happy.
* platform/graphics/GraphicsContext.h:
* platform/graphics/Image.h:
* platform/graphics/ImageSource.h:
* platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImageSkia::hasResizedBitmap):
(WebCore::NativeImageSkia::shouldCacheResampling):
* platform/graphics/skia/NativeImageSkia.h:
* platform/graphics/skia/PlatformContextSkia.cpp:
(WebCore::PlatformContextSkia::State::State):
(WebCore::PlatformContextSkia::beginLayerClippedToImage):
(WebCore::PlatformContextSkia::drawRect):
(WebCore::PlatformContextSkia::setupPaintForStroking):
(WebCore::PlatformContextSkia::getStrokeStyle):
(WebCore::PlatformContextSkia::setStrokeStyle):
(WebCore::PlatformContextSkia::setTextDrawingMode):
(WebCore::PlatformContextSkia::interpolationQuality):
(WebCore::PlatformContextSkia::setInterpolationQuality):
(WebCore::PlatformContextSkia::getImageResamplingHint):
(WebCore::PlatformContextSkia::setImageResamplingHint):
(WebCore::PlatformContextSkia::clearImageResamplingHint):
(WebCore::PlatformContextSkia::applyClipFromImage):
(WebCore::PlatformContextSkia::setGLES2Context):
(WebCore::PlatformContextSkia::prepareForSoftwareDraw):
(WebCore::PlatformContextSkia::prepareForHardwareDraw):
(WebCore::PlatformContextSkia::syncSoftwareCanvas):
(WebCore::PlatformContextSkia::uploadSoftwareToHardware):
* platform/graphics/skia/PlatformContextSkia.h:
(WebCore::PlatformContextSkia::gpuCanvas):
* platform/graphics/skia/SkiaFontWin.cpp:
(WebCore::windowsCanHandleDrawTextShadow):
(WebCore::paintSkiaText):
* platform/graphics/skia/SkiaFontWin.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64584 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index c4a9548..dcf992b 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,53 @@
+2010-07-30 Stephen White <senorblanco at chromium.org>
+
+ Reviewed by Ojan Vafai.
+
+ Move PlatformContextSkia and NativeImageSkia into the WebCore namespace.
+ https://bugs.webkit.org/show_bug.cgi?id=43272
+
+ One wrinkle is that PlatformContext and NativeImagePtr are
+ typedef'ed outside outside the WebCore namespace block, so the
+ PlatformContextSkia and NativeImageSkia have to be forward-declared
+ explicitly within that namespace. Another solution might be to move
+ those declarations into the WebCore namespace block below, but that
+ would affect platforms other than Skia, so I leave it to the reviewer
+ to decide.
+
+ Test: if it compiles, you're happy.
+
+ * platform/graphics/GraphicsContext.h:
+ * platform/graphics/Image.h:
+ * platform/graphics/ImageSource.h:
+ * platform/graphics/skia/NativeImageSkia.cpp:
+ (WebCore::NativeImageSkia::hasResizedBitmap):
+ (WebCore::NativeImageSkia::shouldCacheResampling):
+ * platform/graphics/skia/NativeImageSkia.h:
+ * platform/graphics/skia/PlatformContextSkia.cpp:
+ (WebCore::PlatformContextSkia::State::State):
+ (WebCore::PlatformContextSkia::beginLayerClippedToImage):
+ (WebCore::PlatformContextSkia::drawRect):
+ (WebCore::PlatformContextSkia::setupPaintForStroking):
+ (WebCore::PlatformContextSkia::getStrokeStyle):
+ (WebCore::PlatformContextSkia::setStrokeStyle):
+ (WebCore::PlatformContextSkia::setTextDrawingMode):
+ (WebCore::PlatformContextSkia::interpolationQuality):
+ (WebCore::PlatformContextSkia::setInterpolationQuality):
+ (WebCore::PlatformContextSkia::getImageResamplingHint):
+ (WebCore::PlatformContextSkia::setImageResamplingHint):
+ (WebCore::PlatformContextSkia::clearImageResamplingHint):
+ (WebCore::PlatformContextSkia::applyClipFromImage):
+ (WebCore::PlatformContextSkia::setGLES2Context):
+ (WebCore::PlatformContextSkia::prepareForSoftwareDraw):
+ (WebCore::PlatformContextSkia::prepareForHardwareDraw):
+ (WebCore::PlatformContextSkia::syncSoftwareCanvas):
+ (WebCore::PlatformContextSkia::uploadSoftwareToHardware):
+ * platform/graphics/skia/PlatformContextSkia.h:
+ (WebCore::PlatformContextSkia::gpuCanvas):
+ * platform/graphics/skia/SkiaFontWin.cpp:
+ (WebCore::windowsCanHandleDrawTextShadow):
+ (WebCore::paintSkiaText):
+ * platform/graphics/skia/SkiaFontWin.h:
+
2010-08-03 Adam Roben <aroben at apple.com>
Rename LocalizedStringsMac.mm to LocalizedStrings.cpp
diff --git a/WebCore/platform/graphics/GraphicsContext.h b/WebCore/platform/graphics/GraphicsContext.h
index 4d319bc..d3535b4 100644
--- a/WebCore/platform/graphics/GraphicsContext.h
+++ b/WebCore/platform/graphics/GraphicsContext.h
@@ -69,7 +69,10 @@ class wxWindowDC;
typedef wxWindowDC PlatformGraphicsContext;
#endif
#elif PLATFORM(SKIA)
-typedef class PlatformContextSkia PlatformGraphicsContext;
+namespace WebCore {
+class PlatformContextSkia;
+}
+typedef WebCore::PlatformContextSkia PlatformGraphicsContext;
#elif PLATFORM(HAIKU)
class BView;
typedef BView PlatformGraphicsContext;
diff --git a/WebCore/platform/graphics/Image.h b/WebCore/platform/graphics/Image.h
index 1fa8503..17be9e0 100644
--- a/WebCore/platform/graphics/Image.h
+++ b/WebCore/platform/graphics/Image.h
@@ -55,10 +55,6 @@ typedef SIZE* LPSIZE;
typedef struct HBITMAP__ *HBITMAP;
#endif
-#if PLATFORM(SKIA)
-class NativeImageSkia;
-#endif
-
#if PLATFORM(QT)
#include <QPixmap>
#endif
diff --git a/WebCore/platform/graphics/ImageSource.h b/WebCore/platform/graphics/ImageSource.h
index bdcd81e..5f0cc26 100644
--- a/WebCore/platform/graphics/ImageSource.h
+++ b/WebCore/platform/graphics/ImageSource.h
@@ -46,7 +46,9 @@ QT_END_NAMESPACE
struct _cairo_surface;
typedef struct _cairo_surface cairo_surface_t;
#elif PLATFORM(SKIA)
+namespace WebCore {
class NativeImageSkia;
+}
#elif PLATFORM(HAIKU)
class BBitmap;
#elif OS(WINCE)
@@ -84,7 +86,7 @@ typedef wxBitmap* NativeImagePtr;
#elif PLATFORM(CAIRO)
typedef cairo_surface_t* NativeImagePtr;
#elif PLATFORM(SKIA)
-typedef NativeImageSkia* NativeImagePtr;
+typedef WebCore::NativeImageSkia* NativeImagePtr;
#elif PLATFORM(HAIKU)
typedef BBitmap* NativeImagePtr;
#elif OS(WINCE)
diff --git a/WebCore/platform/graphics/skia/NativeImageSkia.cpp b/WebCore/platform/graphics/skia/NativeImageSkia.cpp
index e59d1e2..0c62c16 100644
--- a/WebCore/platform/graphics/skia/NativeImageSkia.cpp
+++ b/WebCore/platform/graphics/skia/NativeImageSkia.cpp
@@ -35,6 +35,8 @@
#include "NativeImageSkia.h"
#include "SkiaUtils.h"
+namespace WebCore {
+
NativeImageSkia::NativeImageSkia()
: m_isDataComplete(false),
m_lastRequestSize(0, 0),
@@ -52,7 +54,7 @@ bool NativeImageSkia::hasResizedBitmap(int w, int h) const
if (m_lastRequestSize.width() == w && m_lastRequestSize.height() == h)
m_resizeRequests++;
else {
- m_lastRequestSize = WebCore::IntSize(w, h);
+ m_lastRequestSize = IntSize(w, h);
m_resizeRequests = 0;
}
@@ -97,7 +99,7 @@ bool NativeImageSkia::shouldCacheResampling(int destWidth,
} else {
// When a different size is being requested, count this as a query
// (hasResizedBitmap) and reset the counter.
- m_lastRequestSize = WebCore::IntSize(destWidth, destHeight);
+ m_lastRequestSize = IntSize(destWidth, destHeight);
m_resizeRequests = 0;
}
@@ -107,3 +109,5 @@ bool NativeImageSkia::shouldCacheResampling(int destWidth,
int destSubsetSize = destSubsetWidth * destSubsetHeight;
return destSize / 4 < destSubsetSize;
}
+
+} // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/NativeImageSkia.h b/WebCore/platform/graphics/skia/NativeImageSkia.h
index 5947238..0718836 100644
--- a/WebCore/platform/graphics/skia/NativeImageSkia.h
+++ b/WebCore/platform/graphics/skia/NativeImageSkia.h
@@ -34,6 +34,8 @@
#include "SkBitmap.h"
#include "IntSize.h"
+namespace WebCore {
+
// This object is used as the "native image" in our port. When WebKit uses
// "NativeImagePtr", it is a pointer to this type. It is an SkBitmap, but also
// stores a cached resized image.
@@ -96,9 +98,10 @@ private:
// This allows us to see if many requests have been made for the same
// resized image, we know that we should probably cache it, even if all of
// those requests individually are small and would not otherwise be cached.
- mutable WebCore::IntSize m_lastRequestSize;
+ mutable IntSize m_lastRequestSize;
mutable int m_resizeRequests;
};
+}
#endif // NativeImageSkia_h
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
index 65c6e95..5ec9a5c 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.cpp
@@ -55,10 +55,9 @@
#include <wtf/OwnArrayPtr.h>
#include <wtf/Vector.h>
-namespace WebCore
-{
+namespace WebCore {
+
extern bool isPathSkiaSafe(const SkMatrix& transform, const SkPath& path);
-}
// State -----------------------------------------------------------------------
@@ -80,7 +79,7 @@ struct PlatformContextSkia::State {
SkShader* m_fillShader;
// Stroke.
- WebCore::StrokeStyle m_strokeStyle;
+ StrokeStyle m_strokeStyle;
SkColor m_strokeColor;
SkShader* m_strokeShader;
float m_strokeThickness;
@@ -101,13 +100,13 @@ struct PlatformContextSkia::State {
// If non-empty, the current State is clipped to this image.
SkBitmap m_imageBufferClip;
// If m_imageBufferClip is non-empty, this is the region the image is clipped to.
- WebCore::FloatRect m_clip;
+ FloatRect m_clip;
#endif
// This is a list of clipping paths which are currently active, in the
// order in which they were pushed.
WTF::Vector<SkPath> m_antiAliasClipPaths;
- WebCore::InterpolationQuality m_interpolationQuality;
+ InterpolationQuality m_interpolationQuality;
PlatformContextSkia::State cloneInheritedProperties();
private:
@@ -123,8 +122,8 @@ PlatformContextSkia::State::State()
, m_looper(0)
, m_fillColor(0xFF000000)
, m_fillShader(0)
- , m_strokeStyle(WebCore::SolidStroke)
- , m_strokeColor(WebCore::Color::black)
+ , m_strokeStyle(SolidStroke)
+ , m_strokeColor(Color::black)
, m_strokeShader(0)
, m_strokeThickness(0)
, m_dashRatio(3)
@@ -132,8 +131,8 @@ PlatformContextSkia::State::State()
, m_lineCap(SkPaint::kDefault_Cap)
, m_lineJoin(SkPaint::kDefault_Join)
, m_dash(0)
- , m_textDrawingMode(WebCore::cTextFill)
- , m_interpolationQuality(WebCore::InterpolationHigh)
+ , m_textDrawingMode(cTextFill)
+ , m_interpolationQuality(InterpolationHigh)
{
}
@@ -256,8 +255,8 @@ void PlatformContextSkia::save()
}
#if OS(LINUX) || OS(WINDOWS)
-void PlatformContextSkia::beginLayerClippedToImage(const WebCore::FloatRect& rect,
- const WebCore::ImageBuffer* imageBuffer)
+void PlatformContextSkia::beginLayerClippedToImage(const FloatRect& rect,
+ const ImageBuffer* imageBuffer)
{
// Skia doesn't support clipping to an image, so we create a layer. The next
// time restore is invoked the layer and |imageBuffer| are combined to
@@ -329,8 +328,8 @@ void PlatformContextSkia::drawRect(SkRect rect)
canvas()->drawRect(rect, paint);
}
- if (m_state->m_strokeStyle != WebCore::NoStroke &&
- (m_state->m_strokeColor & 0xFF000000)) {
+ if (m_state->m_strokeStyle != NoStroke
+ && (m_state->m_strokeColor & 0xFF000000)) {
// We do a fill of four rects to simulate the stroke of a border.
SkColor oldFillColor = m_state->m_fillColor;
@@ -392,13 +391,13 @@ float PlatformContextSkia::setupPaintForStroking(SkPaint* paint, SkRect* rect, i
paint->setPathEffect(m_state->m_dash);
else {
switch (m_state->m_strokeStyle) {
- case WebCore::NoStroke:
- case WebCore::SolidStroke:
+ case NoStroke:
+ case SolidStroke:
break;
- case WebCore::DashedStroke:
+ case DashedStroke:
width = m_state->m_dashRatio * width;
// Fall through.
- case WebCore::DottedStroke:
+ case DottedStroke:
// Truncate the width, since we don't want fuzzy dots or dashes.
int dashLength = static_cast<int>(width);
// Subtract off the endcaps, since they're rendered separately.
@@ -467,12 +466,12 @@ SkDrawLooper* PlatformContextSkia::getDrawLooper() const
return m_state->m_looper;
}
-WebCore::StrokeStyle PlatformContextSkia::getStrokeStyle() const
+StrokeStyle PlatformContextSkia::getStrokeStyle() const
{
return m_state->m_strokeStyle;
}
-void PlatformContextSkia::setStrokeStyle(WebCore::StrokeStyle strokeStyle)
+void PlatformContextSkia::setStrokeStyle(StrokeStyle strokeStyle)
{
m_state->m_strokeStyle = strokeStyle;
}
@@ -514,10 +513,10 @@ float PlatformContextSkia::getAlpha() const
void PlatformContextSkia::setTextDrawingMode(int mode)
{
- // cTextClip is never used, so we assert that it isn't set:
- // https://bugs.webkit.org/show_bug.cgi?id=21898
- ASSERT((mode & WebCore::cTextClip) == 0);
- m_state->m_textDrawingMode = mode;
+ // cTextClip is never used, so we assert that it isn't set:
+ // https://bugs.webkit.org/show_bug.cgi?id=21898
+ ASSERT(!(mode & cTextClip));
+ m_state->m_textDrawingMode = mode;
}
void PlatformContextSkia::setUseAntialiasing(bool enable)
@@ -570,12 +569,12 @@ void PlatformContextSkia::setFillShader(SkShader* fillShader)
}
}
-WebCore::InterpolationQuality PlatformContextSkia::interpolationQuality() const
+InterpolationQuality PlatformContextSkia::interpolationQuality() const
{
return m_state->m_interpolationQuality;
}
-void PlatformContextSkia::setInterpolationQuality(WebCore::InterpolationQuality interpolationQuality)
+void PlatformContextSkia::setInterpolationQuality(InterpolationQuality interpolationQuality)
{
m_state->m_interpolationQuality = interpolationQuality;
}
@@ -604,13 +603,13 @@ bool PlatformContextSkia::isPrinting()
return m_canvas->getTopPlatformDevice().IsVectorial();
}
-void PlatformContextSkia::getImageResamplingHint(WebCore::IntSize* srcSize, WebCore::FloatSize* dstSize) const
+void PlatformContextSkia::getImageResamplingHint(IntSize* srcSize, FloatSize* dstSize) const
{
*srcSize = m_imageResamplingHintSrcSize;
*dstSize = m_imageResamplingHintDstSize;
}
-void PlatformContextSkia::setImageResamplingHint(const WebCore::IntSize& srcSize, const WebCore::FloatSize& dstSize)
+void PlatformContextSkia::setImageResamplingHint(const IntSize& srcSize, const FloatSize& dstSize)
{
m_imageResamplingHintSrcSize = srcSize;
m_imageResamplingHintDstSize = dstSize;
@@ -618,8 +617,8 @@ void PlatformContextSkia::setImageResamplingHint(const WebCore::IntSize& srcSize
void PlatformContextSkia::clearImageResamplingHint()
{
- m_imageResamplingHintSrcSize = WebCore::IntSize();
- m_imageResamplingHintDstSize = WebCore::FloatSize();
+ m_imageResamplingHintSrcSize = IntSize();
+ m_imageResamplingHintDstSize = FloatSize();
}
bool PlatformContextSkia::hasImageResamplingHint() const
@@ -628,7 +627,7 @@ bool PlatformContextSkia::hasImageResamplingHint() const
}
#if OS(LINUX) || OS(WINDOWS)
-void PlatformContextSkia::applyClipFromImage(const WebCore::FloatRect& rect, const SkBitmap& imageBuffer)
+void PlatformContextSkia::applyClipFromImage(const FloatRect& rect, const SkBitmap& imageBuffer)
{
// NOTE: this assumes the image mask contains opaque black for the portions that are to be shown, as such we
// only look at the alpha when compositing. I'm not 100% sure this is what WebKit expects for image clipping.
@@ -676,10 +675,10 @@ void PlatformContextSkia::applyAntiAliasedClipPaths(WTF::Vector<SkPath>& paths)
}
#if USE(GLES2_RENDERING)
-void PlatformContextSkia::setGLES2Context(WebCore::GLES2Context* context, const WebCore::IntSize& size)
+void PlatformContextSkia::setGLES2Context(GLES2Context* context, const IntSize& size)
{
m_useGPU = true;
- m_gpuCanvas = new WebCore::GLES2Canvas(context, size);
+ m_gpuCanvas = new GLES2Canvas(context, size);
}
void PlatformContextSkia::prepareForSoftwareDraw() const
@@ -716,7 +715,7 @@ void PlatformContextSkia::prepareForSoftwareDraw() const
} else if (m_backingStoreState == Mixed) {
if (m_state->m_xferMode != SkXfermode::kSrcOver_Mode) {
// Have to composite our currently software drawn data...
- uploadSoftwareToHardware(WebCore::CompositeSourceOver);
+ uploadSoftwareToHardware(CompositeSourceOver);
// then do a readback so we can hardware draw stuff.
readbackHardwareToSoftware();
m_backingStoreState = Software;
@@ -731,11 +730,11 @@ void PlatformContextSkia::prepareForHardwareDraw() const
if (m_backingStoreState == Software) {
// Last drawn in software; upload everything we've drawn.
- uploadSoftwareToHardware(WebCore::CompositeCopy);
+ uploadSoftwareToHardware(CompositeCopy);
} else if (m_backingStoreState == Mixed) {
// Stuff in software/hardware, composite the software stuff on top of
// the hardware stuff.
- uploadSoftwareToHardware(WebCore::CompositeSourceOver);
+ uploadSoftwareToHardware(CompositeSourceOver);
}
m_backingStoreState = Hardware;
}
@@ -749,7 +748,7 @@ void PlatformContextSkia::syncSoftwareCanvas() const
readbackHardwareToSoftware();
else if (m_backingStoreState == Mixed) {
// Have to composite our currently software drawn data..
- uploadSoftwareToHardware(WebCore::CompositeSourceOver);
+ uploadSoftwareToHardware(CompositeSourceOver);
// then do a readback.
readbackHardwareToSoftware();
m_backingStoreState = Software;
@@ -757,16 +756,16 @@ void PlatformContextSkia::syncSoftwareCanvas() const
m_backingStoreState = Software;
}
-void PlatformContextSkia::uploadSoftwareToHardware(WebCore::CompositeOperator op) const
+void PlatformContextSkia::uploadSoftwareToHardware(CompositeOperator op) const
{
const SkBitmap& bitmap = m_canvas->getDevice()->accessBitmap(false);
SkAutoLockPixels lock(bitmap);
m_gpuCanvas->gles2Context()->makeCurrent();
// FIXME: Keep a texture around for this rather than constantly creating/destroying one.
- RefPtr<WebCore::GLES2Texture> texture = WebCore::GLES2Texture::create(WebCore::GLES2Texture::BGRA8, bitmap.width(), bitmap.height());
+ RefPtr<GLES2Texture> texture = GLES2Texture::create(GLES2Texture::BGRA8, bitmap.width(), bitmap.height());
texture->load(bitmap.getPixels());
- WebCore::IntRect rect(0, 0, bitmap.width(), bitmap.height());
- gpuCanvas()->drawTexturedRect(texture.get(), rect, rect, WebCore::DeviceColorSpace, op);
+ IntRect rect(0, 0, bitmap.width(), bitmap.height());
+ gpuCanvas()->drawTexturedRect(texture.get(), rect, rect, DeviceColorSpace, op);
}
void PlatformContextSkia::readbackHardwareToSoftware() const
@@ -787,4 +786,6 @@ void PlatformContextSkia::readbackHardwareToSoftware() const
}
}
}
+
#endif
+} // namespace WebCore
diff --git a/WebCore/platform/graphics/skia/PlatformContextSkia.h b/WebCore/platform/graphics/skia/PlatformContextSkia.h
index 2099dd0..5da5141 100644
--- a/WebCore/platform/graphics/skia/PlatformContextSkia.h
+++ b/WebCore/platform/graphics/skia/PlatformContextSkia.h
@@ -41,16 +41,16 @@
#include "SkPaint.h"
#include "SkPath.h"
-#if USE(GLES2_RENDERING)
+#include <wtf/Vector.h>
+
namespace WebCore {
+
+#if USE(GLES2_RENDERING)
enum CompositeOperator;
class GLES2Canvas;
class GLES2Context;
-}
#endif
-#include <wtf/Vector.h>
-
// This class holds the platform-specific state for GraphicsContext. We put
// most of our Skia wrappers on this class. In theory, a lot of this stuff could
// be moved to GraphicsContext directly, except that some code external to this
@@ -97,8 +97,7 @@ public:
// invoked.
// NOTE: |imageBuffer| may be deleted before the |restore| is invoked.
#if OS(LINUX) || OS(WINDOWS)
- void beginLayerClippedToImage(const WebCore::FloatRect&,
- const WebCore::ImageBuffer*);
+ void beginLayerClippedToImage(const FloatRect&, const ImageBuffer*);
#endif
void clipPathAntiAliased(const SkPath&);
@@ -127,7 +126,7 @@ public:
void setXfermodeMode(SkXfermode::Mode);
void setFillColor(SkColor);
void setFillShader(SkShader*);
- void setStrokeStyle(WebCore::StrokeStyle);
+ void setStrokeStyle(StrokeStyle);
void setStrokeColor(SkColor);
void setStrokeThickness(float thickness);
void setStrokeShader(SkShader*);
@@ -136,7 +135,7 @@ public:
void setDashPathEffect(SkDashPathEffect*);
SkDrawLooper* getDrawLooper() const;
- WebCore::StrokeStyle getStrokeStyle() const;
+ StrokeStyle getStrokeStyle() const;
float getStrokeThickness() const;
int getTextDrawingMode() const;
float getAlpha() const;
@@ -155,8 +154,8 @@ public:
skia::PlatformCanvas* canvas() { return m_canvas; }
- WebCore::InterpolationQuality interpolationQuality() const;
- void setInterpolationQuality(WebCore::InterpolationQuality interpolationQuality);
+ InterpolationQuality interpolationQuality() const;
+ void setInterpolationQuality(InterpolationQuality interpolationQuality);
// FIXME: This should be pushed down to GraphicsContext.
void drawRect(SkRect rect);
@@ -178,14 +177,14 @@ public:
// possible quality.
bool isPrinting();
- void getImageResamplingHint(WebCore::IntSize* srcSize, WebCore::FloatSize* dstSize) const;
- void setImageResamplingHint(const WebCore::IntSize& srcSize, const WebCore::FloatSize& dstSize);
+ void getImageResamplingHint(IntSize* srcSize, FloatSize* dstSize) const;
+ void setImageResamplingHint(const IntSize& srcSize, const FloatSize& dstSize);
void clearImageResamplingHint();
bool hasImageResamplingHint() const;
#if USE(GLES2_RENDERING)
bool useGPU() { return m_useGPU; }
- void setGLES2Context(WebCore::GLES2Context*, const WebCore::IntSize&);
- WebCore::GLES2Canvas* gpuCanvas() const { return m_gpuCanvas.get(); }
+ void setGLES2Context(GLES2Context*, const IntSize&);
+ GLES2Canvas* gpuCanvas() const { return m_gpuCanvas.get(); }
#endif
#if USE(GLES2_RENDERING)
@@ -205,12 +204,12 @@ private:
#if OS(LINUX) || OS(WINDOWS)
// Used when restoring and the state has an image clip. Only shows the pixels in
// m_canvas that are also in imageBuffer.
- void applyClipFromImage(const WebCore::FloatRect&, const SkBitmap&);
+ void applyClipFromImage(const FloatRect&, const SkBitmap&);
#endif
void applyAntiAliasedClipPaths(WTF::Vector<SkPath>& paths);
#if USE(GLES2_RENDERING)
- void uploadSoftwareToHardware(WebCore::CompositeOperator) const;
+ void uploadSoftwareToHardware(CompositeOperator) const;
void readbackHardwareToSoftware() const;
#endif
@@ -232,16 +231,17 @@ private:
// Stores image sizes for a hint to compute image resampling modes.
// Values are used in ImageSkia.cpp
- WebCore::IntSize m_imageResamplingHintSrcSize;
- WebCore::FloatSize m_imageResamplingHintDstSize;
+ IntSize m_imageResamplingHintSrcSize;
+ FloatSize m_imageResamplingHintDstSize;
#if OS(WINDOWS)
bool m_drawingToImageBuffer;
#endif
#if USE(GLES2_RENDERING)
bool m_useGPU;
- OwnPtr<WebCore::GLES2Canvas> m_gpuCanvas;
+ OwnPtr<GLES2Canvas> m_gpuCanvas;
mutable enum { None, Software, Mixed, Hardware } m_backingStoreState;
#endif
};
+}
#endif // PlatformContextSkia_h
diff --git a/WebCore/platform/graphics/skia/SkiaFontWin.cpp b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
index 6595f6b..44003bb 100644
--- a/WebCore/platform/graphics/skia/SkiaFontWin.cpp
+++ b/WebCore/platform/graphics/skia/SkiaFontWin.cpp
@@ -220,7 +220,7 @@ void SkiaWinOutlineCache::removePathsForFont(HFONT hfont)
deleteOutline(outlineCache.find(*i));
}
-bool windowsCanHandleDrawTextShadow(WebCore::GraphicsContext *context)
+bool windowsCanHandleDrawTextShadow(GraphicsContext *context)
{
FloatSize shadowSize;
float shadowBlur;
@@ -323,7 +323,7 @@ bool paintSkiaText(GraphicsContext* context,
}
// Stroking on top (if necessary).
- if ((textMode & WebCore::cTextStroke)
+ if ((textMode & cTextStroke)
&& platformContext->getStrokeStyle() != NoStroke
&& platformContext->getStrokeThickness() > 0) {
diff --git a/WebCore/platform/graphics/skia/SkiaFontWin.h b/WebCore/platform/graphics/skia/SkiaFontWin.h
index 4c2bb32..40bee62 100644
--- a/WebCore/platform/graphics/skia/SkiaFontWin.h
+++ b/WebCore/platform/graphics/skia/SkiaFontWin.h
@@ -34,13 +34,14 @@
#include <windows.h>
#include <usp10.h>
-class GraphicsContext;
class SkPath;
class SkPoint;
-class PlatformContextSkia;
namespace WebCore {
+class GraphicsContext;
+class PlatformContextSkia;
+
// FIXME: Rename file to SkiaWinOutlineCache
class SkiaWinOutlineCache {
public:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list