summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/graphics/wince
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-08 12:18:00 +0100
committerKristian Monsen <kristianm@google.com>2010-09-11 12:08:58 +0100
commit5ddde30071f639962dd557c453f2ad01f8f0fd00 (patch)
tree775803c4ab35af50aa5f5472cd1fb95fe9d5152d /WebCore/platform/graphics/wince
parent3e63d9b33b753ca86d0765d1b3d711114ba9e34f (diff)
downloadexternal_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.zip
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.gz
external_webkit-5ddde30071f639962dd557c453f2ad01f8f0fd00.tar.bz2
Merge WebKit at r66666 : Initial merge by git.
Change-Id: I57dedeb49859adc9c539e760f0e749768c66626f
Diffstat (limited to 'WebCore/platform/graphics/wince')
-rw-r--r--WebCore/platform/graphics/wince/FontPlatformData.h2
-rw-r--r--WebCore/platform/graphics/wince/GraphicsContextWince.cpp19
-rw-r--r--WebCore/platform/graphics/wince/ImageBufferWince.cpp29
3 files changed, 33 insertions, 17 deletions
diff --git a/WebCore/platform/graphics/wince/FontPlatformData.h b/WebCore/platform/graphics/wince/FontPlatformData.h
index 0b973b8..4a174f0 100644
--- a/WebCore/platform/graphics/wince/FontPlatformData.h
+++ b/WebCore/platform/graphics/wince/FontPlatformData.h
@@ -26,9 +26,9 @@
#define FontPlatformData_h
#include "FontDescription.h"
-#include "StringImpl.h"
#include <wtf/Forward.h>
#include <wtf/Noncopyable.h>
+#include <wtf/text/StringImpl.h>
typedef struct tagTEXTMETRICW TEXTMETRIC;
typedef struct tagLOGFONTW LOGFONT;
diff --git a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
index e4466c8..990a31d 100644
--- a/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
+++ b/WebCore/platform/graphics/wince/GraphicsContextWince.cpp
@@ -1062,7 +1062,7 @@ void GraphicsContext::drawLineForText(const IntPoint& origin, int width, bool pr
setStrokeStyle(oldStyle);
}
-void GraphicsContext::drawLineForMisspellingOrBadGrammar(const IntPoint&, int width, bool grammar)
+void GraphicsContext::drawLineForTextChecking(const IntPoint&, int width, TextCheckingLineStyle style)
{
notImplemented();
}
@@ -1260,15 +1260,15 @@ void GraphicsContext::fillRoundedRect(const IntRect& fillRect, const IntSize& to
if (!m_data->m_dc)
return;
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur = 0;
Color shadowColor;
- getShadow(shadowSize, shadowBlur, shadowColor);
+ getShadow(shadowOffset, shadowBlur, shadowColor);
IntRect dstRect = fillRect;
- dstRect.move(stableRound(shadowSize.width()), stableRound(shadowSize.height()));
+ dstRect.move(stableRound(shadowOffset.width()), stableRound(shadowOffset.height()));
dstRect.inflate(stableRound(shadowBlur));
dstRect = m_data->mapRect(dstRect);
@@ -1548,11 +1548,6 @@ AffineTransform GraphicsContext::getCTM() const
return m_data->m_transform;
}
-void GraphicsContext::clipToImageBuffer(const FloatRect&, const ImageBuffer*)
-{
- notImplemented();
-}
-
void GraphicsContext::fillRect(const FloatRect& rect)
{
savePlatformState();
@@ -1687,17 +1682,17 @@ void GraphicsContext::drawText(const SimpleFontData* fontData, const GlyphBuffer
return;
}
- FloatSize shadowSize;
+ FloatSize shadowOffset;
float shadowBlur = 0;
Color shadowColor;
bool hasShadow = textDrawingMode() == cTextFill
- && getShadow(shadowSize, shadowBlur, shadowColor)
+ && getShadow(shadowOffset, shadowBlur, shadowColor)
&& shadowColor.alpha();
COLORREF shadowRGBColor;
FloatPoint trShadowPoint;
if (hasShadow) {
shadowRGBColor = RGB(shadowColor.red(), shadowColor.green(), shadowColor.blue());
- trShadowPoint = m_data->mapPoint(startPoint + shadowSize);
+ trShadowPoint = m_data->mapPoint(startPoint + shadowOffset);
}
HGDIOBJ hOldFont = SelectObject(m_data->m_dc, hFont);
diff --git a/WebCore/platform/graphics/wince/ImageBufferWince.cpp b/WebCore/platform/graphics/wince/ImageBufferWince.cpp
index 1a25f4f..10e502d 100644
--- a/WebCore/platform/graphics/wince/ImageBufferWince.cpp
+++ b/WebCore/platform/graphics/wince/ImageBufferWince.cpp
@@ -95,12 +95,33 @@ GraphicsContext* ImageBuffer::context() const
return m_context.get();
}
-Image* ImageBuffer::image() const
+bool ImageBuffer::drawsUsingCopy() const
{
- if (!m_image)
- m_image = adoptRef(new BufferedImage(&m_data));
+ return true;
+}
+
+PassRefPtr<Image> ImageBuffer::copyImage() const
+{
+ return adoptRef(new BufferedImage(&m_data));
+}
+
+void ImageBuffer::clip(GraphicsContext*, const FloatRect&) const
+{
+ notImplemented();
+}
+
+void ImageBuffer::draw(GraphicsContext* context, ColorSpace styleColorSpace, const FloatRect& destRect, const FloatRect& srcRect,
+ CompositeOperator op , bool useLowQualityScale)
+{
+ RefPtr<Image> imageCopy = copyImage();
+ context->drawImage(imageCopy.get(), styleColorSpace, destRect, srcRect, op, useLowQualityScale);
+}
- return m_image.get();
+void ImageBuffer::drawPattern(GraphicsContext* context, const FloatRect& srcRect, const AffineTransform& patternTransform,
+ const FloatPoint& phase, ColorSpace styleColorSpace, CompositeOperator op, const FloatRect& destRect)
+{
+ RefPtr<Image> imageCopy = copyImage();
+ imageCopy->drawPattern(context, srcRect, patternTransform, phase, styleColorSpace, op, destRect);
}
template <bool premultiplied> PassRefPtr<ImageData>