summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-18 10:55:06 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-18 10:55:06 +0200
commitee4c86d1990a9e26277a6948e7027ad8d525ebfa (patch)
tree1e2d3408cd097606571f40ab63353c27bcb7dd5c /Source/WebCore/platform
parentd882bec96d0d30aeeda2141bfadfca7f038ee862 (diff)
downloadqtwebkit-ee4c86d1990a9e26277a6948e7027ad8d525ebfa.tar.gz
Imported WebKit commit 795dcd25a9649fccaf1c9b685f6e2ffedaf7e620 (http://svn.webkit.org/repository/webkit/trunk@131718)
New snapshot that includes the return of -fkeep-memory at link time to reduce memory pressure as well as modularized documentation
Diffstat (limited to 'Source/WebCore/platform')
-rw-r--r--Source/WebCore/platform/graphics/GraphicsLayerClient.h10
-rw-r--r--Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp81
-rw-r--r--Source/WebCore/platform/graphics/GraphicsLayerUpdater.h67
-rw-r--r--Source/WebCore/platform/graphics/SimpleFontData.h2
-rw-r--r--Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp10
-rw-r--r--Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp3
-rw-r--r--Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp4
-rw-r--r--Source/WebCore/platform/graphics/mac/ComplexTextController.cpp16
-rw-r--r--Source/WebCore/platform/graphics/mac/ComplexTextController.h2
-rw-r--r--Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm2
-rw-r--r--Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp7
-rw-r--r--Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp2
-rw-r--r--Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp3
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapper.h4
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp4
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp5
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h10
-rw-r--r--Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp4
-rw-r--r--Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp5
-rw-r--r--Source/WebCore/platform/text/mac/StringMac.mm14
20 files changed, 218 insertions, 37 deletions
diff --git a/Source/WebCore/platform/graphics/GraphicsLayerClient.h b/Source/WebCore/platform/graphics/GraphicsLayerClient.h
index 7efee0e65..3e105ce6b 100644
--- a/Source/WebCore/platform/graphics/GraphicsLayerClient.h
+++ b/Source/WebCore/platform/graphics/GraphicsLayerClient.h
@@ -30,11 +30,12 @@
namespace WebCore {
+class FloatPoint;
class GraphicsContext;
class GraphicsLayer;
class IntPoint;
class IntRect;
-class FloatPoint;
+class TransformationMatrix;
enum GraphicsLayerPaintingPhaseFlags {
GraphicsLayerPaintBackground = (1 << 0),
@@ -66,9 +67,16 @@ public:
// to appear on the screen.
virtual void notifyFlushRequired(const GraphicsLayer*) = 0;
+ // Notification that this layer requires a flush before the next display refresh.
+ virtual void notifyFlushBeforeDisplayRefresh(const GraphicsLayer*) { }
+
virtual void paintContents(const GraphicsLayer*, GraphicsContext&, GraphicsLayerPaintingPhase, const IntRect& inClip) = 0;
virtual void didCommitChangesForLayer(const GraphicsLayer*) const { }
+ // Provides current transform (taking transform-origin and animations into account). Input matrix has been
+ // initialized to identity already. Returns false if the layer has no transform.
+ virtual bool getCurrentTransform(const GraphicsLayer*, TransformationMatrix&) const { return false; }
+
// Multiplier for backing store size, related to high DPI.
virtual float deviceScaleFactor() const { return 1; }
// Page scale factor.
diff --git a/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp
new file mode 100644
index 000000000..2eb656924
--- /dev/null
+++ b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.cpp
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "GraphicsLayerUpdater.h"
+
+#include "GraphicsLayer.h"
+
+namespace WebCore {
+
+GraphicsLayerUpdater::GraphicsLayerUpdater(GraphicsLayerUpdaterClient* client, PlatformDisplayID displayID)
+ : m_client(client)
+ , m_scheduled(false)
+{
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->registerClient(this);
+ DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
+ DisplayRefreshMonitorManager::sharedManager()->scheduleAnimation(this);
+#endif
+}
+
+GraphicsLayerUpdater::~GraphicsLayerUpdater()
+{
+ // ~DisplayRefreshMonitorClient unregisters us as a client.
+}
+
+void GraphicsLayerUpdater::scheduleUpdate()
+{
+ if (m_scheduled)
+ return;
+
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->scheduleAnimation(this);
+#endif
+ m_scheduled = true;
+}
+
+void GraphicsLayerUpdater::screenDidChange(PlatformDisplayID displayID)
+{
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ DisplayRefreshMonitorManager::sharedManager()->windowScreenDidChange(displayID, this);
+#endif
+}
+
+void GraphicsLayerUpdater::displayRefreshFired(double timestamp)
+{
+ UNUSED_PARAM(timestamp);
+ m_scheduled = false;
+
+ if (m_client)
+ m_client->flushLayers(this);
+}
+
+} // namespace WebCore
+
+#endif // USE(ACCELERATED_COMPOSITING)
diff --git a/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h
new file mode 100644
index 000000000..108099ae6
--- /dev/null
+++ b/Source/WebCore/platform/graphics/GraphicsLayerUpdater.h
@@ -0,0 +1,67 @@
+/*
+ * Copyright (C) 2012 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GraphicsLayerUpdater_h
+#define GraphicsLayerUpdater_h
+
+#if USE(ACCELERATED_COMPOSITING)
+
+#include "DisplayRefreshMonitor.h"
+#include "PlatformScreen.h"
+
+namespace WebCore {
+
+class GraphicsLayerUpdater;
+
+class GraphicsLayerUpdaterClient {
+public:
+ virtual ~GraphicsLayerUpdaterClient() { }
+ virtual void flushLayers(GraphicsLayerUpdater*) = 0;
+};
+
+class GraphicsLayerUpdater
+#if USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
+ : public DisplayRefreshMonitorClient
+#endif
+{
+public:
+ GraphicsLayerUpdater(GraphicsLayerUpdaterClient*, PlatformDisplayID);
+ virtual ~GraphicsLayerUpdater();
+
+ void scheduleUpdate();
+ void screenDidChange(PlatformDisplayID);
+
+private:
+ virtual void displayRefreshFired(double timestamp);
+
+ GraphicsLayerUpdaterClient* m_client;
+ bool m_scheduled;
+};
+
+} // namespace WebCore
+
+#endif // USE(ACCELERATED_COMPOSITING)
+
+#endif // GraphicsLayerUpdater_h
diff --git a/Source/WebCore/platform/graphics/SimpleFontData.h b/Source/WebCore/platform/graphics/SimpleFontData.h
index db28040fc..5e9f770d6 100644
--- a/Source/WebCore/platform/graphics/SimpleFontData.h
+++ b/Source/WebCore/platform/graphics/SimpleFontData.h
@@ -98,6 +98,8 @@ public:
virtual ~SimpleFontData();
+ static const SimpleFontData* systemFallback() { return reinterpret_cast<const SimpleFontData*>(-1); }
+
const FontPlatformData& platformData() const { return m_platformData; }
#if ENABLE(OPENTYPE_VERTICAL)
const OpenTypeVerticalData* verticalData() const { return m_verticalData; }
diff --git a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
index 3ec8343a9..d3df7fe0f 100644
--- a/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
+++ b/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp
@@ -921,12 +921,13 @@ void GraphicsLayerCA::computeVisibleRect(TransformState& state)
TransformationMatrix layerTransform;
layerTransform.translate(m_position.x(), m_position.y());
-
- if (!transform().isIdentity()) {
+
+ TransformationMatrix currentTransform;
+ if (client() && client()->getCurrentTransform(this, currentTransform) && !currentTransform.isIdentity()) {
FloatPoint3D absoluteAnchorPoint(anchorPoint());
absoluteAnchorPoint.scale(size().width(), size().height(), 1);
layerTransform.translate3d(absoluteAnchorPoint.x(), absoluteAnchorPoint.y(), absoluteAnchorPoint.z());
- layerTransform.multiply(transform());
+ layerTransform.multiply(currentTransform);
layerTransform.translate3d(-absoluteAnchorPoint.x(), -absoluteAnchorPoint.y(), -absoluteAnchorPoint.z());
}
@@ -1015,6 +1016,9 @@ void GraphicsLayerCA::recursiveCommitChanges(const TransformState& state, float
commitLayerChangesAfterSublayers();
+ if (client() && m_layer->layerType() == PlatformCALayer::LayerTypeTileCacheLayer)
+ client()->notifyFlushBeforeDisplayRefresh(this);
+
if (hadChanges && client())
client()->didCommitChangesForLayer(this);
}
diff --git a/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp b/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
index 6f1d4ca15..64f3b702a 100644
--- a/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
+++ b/Source/WebCore/platform/graphics/efl/GraphicsContext3DEfl.cpp
@@ -229,8 +229,7 @@ void GraphicsContext3D::createGraphicsSurfaces(const IntSize& size)
}
#endif
-bool GraphicsContext3D::getImageData(Image* image, GC3Denum format, GC3Denum type, bool premultiplyAlpha,
- bool ignoreGammaAndColorProfile, Vector<uint8_t>& outputVector)
+bool GraphicsContext3D::getImageData(Image*, GC3Denum /* format */, GC3Denum /* type */, bool /* premultiplyAlpha */, bool /* ignoreGammaAndColorProfile */, Vector<uint8_t>& /* outputVector */)
{
notImplemented();
return false;
diff --git a/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp b/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
index 68bd0d57b..1c1dc568a 100644
--- a/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
+++ b/Source/WebCore/platform/graphics/efl/GraphicsContext3DPrivate.cpp
@@ -108,8 +108,6 @@ bool GraphicsContext3DPrivate::createSurface(PageClientEfl* pageClient, bool ren
{
// If RenderStyle is RenderOffscreen, we will be rendering to a FBO,
// so Evas_GL_Surface has a 1x1 dummy surface.
- int x = 0;
- int y = 0;
int width = 1;
int height = 1;
@@ -165,7 +163,7 @@ bool GraphicsContext3DPrivate::makeContextCurrent()
}
#if USE(TEXTURE_MAPPER_GL)
-void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper*, const FloatRect& target, const TransformationMatrix&, float opacity, BitmapTexture* mask)
+void GraphicsContext3DPrivate::paintToTextureMapper(TextureMapper*, const FloatRect& /* target */, const TransformationMatrix&, float /* opacity */, BitmapTexture* /* mask */)
{
notImplemented();
}
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp b/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
index 81cf10486..87bd52dc0 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextController.cpp
@@ -329,12 +329,8 @@ void ComplexTextController::collectComplexTextRuns()
nextIsMissingGlyph = false;
#if !PLATFORM(WX)
nextFontData = m_font.fontDataForCombiningCharacterSequence(sequenceStart, curr - sequenceStart, nextIsSmallCaps ? SmallCapsVariant : NormalVariant);
- if (!nextFontData) {
- if (markCount)
- nextFontData = systemFallbackFontData();
- else
- nextIsMissingGlyph = true;
- }
+ if (!nextFontData)
+ nextIsMissingGlyph = true;
#endif
while (curr < end) {
@@ -361,12 +357,8 @@ void ComplexTextController::collectComplexTextRuns()
#if !PLATFORM(WX)
else {
nextFontData = m_font.fontDataForCombiningCharacterSequence(cp + index, curr - cp - index, nextIsSmallCaps ? SmallCapsVariant : NormalVariant);
- if (!nextFontData) {
- if (markCount)
- nextFontData = systemFallbackFontData();
- else
- nextIsMissingGlyph = true;
- }
+ if (!nextFontData)
+ nextIsMissingGlyph = true;
}
#endif
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextController.h b/Source/WebCore/platform/graphics/mac/ComplexTextController.h
index 25c946ee3..b0dc0713e 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextController.h
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextController.h
@@ -72,8 +72,6 @@ public:
float maxGlyphBoundingBoxY() const { return m_maxGlyphBoundingBoxY; }
private:
- static const SimpleFontData* systemFallbackFontData() { return reinterpret_cast<const SimpleFontData*>(-1); }
-
class ComplexTextRun : public RefCounted<ComplexTextRun> {
public:
static PassRefPtr<ComplexTextRun> create(CTRunRef ctRun, const SimpleFontData* fontData, const UChar* characters, unsigned stringLocation, size_t stringLength, CFRange runRange)
diff --git a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
index f7d03110b..4cb876c36 100644
--- a/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
+++ b/Source/WebCore/platform/graphics/mac/ComplexTextControllerCoreText.mm
@@ -200,7 +200,7 @@ void ComplexTextController::collectComplexTextRunsForCharacters(const UChar* cp,
UChar32 baseCharacter = 0;
RetainPtr<CFDictionaryRef> stringAttributes;
- if (fontData == systemFallbackFontData()) {
+ if (fontData == SimpleFontData::systemFallback()) {
// FIXME: This code path does not support small caps.
isSystemFallback = true;
diff --git a/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp b/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
index da80c2bde..9dd95e85a 100644
--- a/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
+++ b/Source/WebCore/platform/graphics/mac/FontComplexTextMac.cpp
@@ -176,8 +176,11 @@ const SimpleFontData* Font::fontDataForCombiningCharacterSequence(const UChar* c
GlyphData baseCharacterGlyphData = glyphDataForCharacter(baseCharacter, false, variant);
+ if (!baseCharacterGlyphData.glyph)
+ return 0;
+
if (length == baseCharacterLength)
- return baseCharacterGlyphData.glyph ? baseCharacterGlyphData.fontData : 0;
+ return baseCharacterGlyphData.fontData;
bool triedBaseCharacterFontData = false;
@@ -216,7 +219,7 @@ const SimpleFontData* Font::fontDataForCombiningCharacterSequence(const UChar* c
if (!triedBaseCharacterFontData && baseCharacterGlyphData.fontData && baseCharacterGlyphData.fontData->canRenderCombiningCharacterSequence(characters, length))
return baseCharacterGlyphData.fontData;
- return 0;
+ return SimpleFontData::systemFallback();
}
} // namespace WebCore
diff --git a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
index ccccd38bf..b560bd48e 100644
--- a/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
+++ b/Source/WebCore/platform/graphics/opengl/Extensions3DOpenGL.cpp
@@ -102,6 +102,8 @@ void Extensions3DOpenGL::bindVertexArrayOES(Platform3DObject array)
m_context->makeContextCurrent();
#if !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(EFL) && defined(GL_APPLE_vertex_array_object) && GL_APPLE_vertex_array_object
glBindVertexArrayAPPLE(array);
+#else
+ UNUSED_PARAM(array);
#endif
}
diff --git a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index c2ab6dfb0..c41983bfd 100644
--- a/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -1190,6 +1190,9 @@ void GraphicsContext::setLineDash(const DashArray& dashes, float dashOffset)
count *= 2;
float penWidth = narrowPrecisionToFloat(double(pen.widthF()));
+ if (penWidth <= 0.f)
+ penWidth = 1.f;
+
for (unsigned i = 0; i < count; i++)
pattern.append(dashes[i % dashLength] / penWidth);
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapper.h b/Source/WebCore/platform/graphics/texmap/TextureMapper.h
index a90dbe4f1..86a55df49 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapper.h
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapper.h
@@ -73,7 +73,7 @@ public:
inline Flags flags() const { return m_flags; }
virtual int bpp() const { return 32; }
- virtual bool canReuseWith(const IntSize& contentsSize, Flags flags = 0) { return false; }
+ virtual bool canReuseWith(const IntSize& /* contentsSize */, Flags = 0) { return false; }
void reset(const IntSize& size, Flags flags = 0)
{
m_flags = flags;
@@ -140,7 +140,7 @@ public:
TextDrawingModeFlags textDrawingMode() const { return m_textDrawingMode; }
AccelerationMode accelerationMode() const { return m_accelerationMode; }
- virtual void beginPainting(PaintFlags flags = 0) { }
+ virtual void beginPainting(PaintFlags = 0) { }
virtual void endPainting() { }
virtual IntSize maxTextureSize() const { return IntSize(INT_MAX, INT_MAX); }
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
index 94e449345..19feae868 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperGL.cpp
@@ -345,6 +345,10 @@ void TextureMapperGL::drawRepaintCounter(int value, int pointSize, const FloatPo
texture->updateContents(bits, sourceRect, IntPoint::zero(), image.bytesPerLine());
drawTexture(*texture, targetRect, modelViewMatrix, 1.0f, 0, AllEdges);
#else
+ UNUSED_PARAM(value);
+ UNUSED_PARAM(pointSize);
+ UNUSED_PARAM(targetPoint);
+ UNUSED_PARAM(modelViewMatrix);
notImplemented();
#endif
}
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
index 9282959de..7802b3f0e 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.cpp
@@ -46,6 +46,11 @@ void BitmapTextureImageBuffer::updateContents(const void* data, const IntRect& t
bytesPerLine));
m_image->context()->platformContext()->drawSurfaceToContext(surface.get(), targetRect,
IntRect(sourceOffset, targetRect.size()), m_image->context());
+#else
+ UNUSED_PARAM(data);
+ UNUSED_PARAM(targetRect);
+ UNUSED_PARAM(sourceOffset);
+ UNUSED_PARAM(bytesPerLine);
#endif
}
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
index 7d51e8805..fe9774a32 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperImageBuffer.h
@@ -52,8 +52,14 @@ public:
static PassOwnPtr<TextureMapper> create() { return adoptPtr(new TextureMapperImageBuffer); }
// TextureMapper implementation
- virtual void drawBorder(const Color& color, float borderWidth, const FloatRect& targetRect, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE { };
- virtual void drawRepaintCounter(int value, int pointSize, const FloatPoint&, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE { };
+ virtual void drawBorder(const Color&, float /* borderWidth */, const FloatRect& /* targetRect */, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE
+ {
+ UNUSED_PARAM(modelViewMatrix);
+ };
+ virtual void drawRepaintCounter(int /* value */, int /* pointSize */, const FloatPoint&, const TransformationMatrix& modelViewMatrix = TransformationMatrix()) OVERRIDE
+ {
+ UNUSED_PARAM(modelViewMatrix);
+ };
virtual void drawTexture(const BitmapTexture&, const FloatRect& targetRect, const TransformationMatrix&, float opacity, const BitmapTexture* maskTexture, unsigned exposedEdges) OVERRIDE;
virtual void beginClip(const TransformationMatrix&, const FloatRect&) OVERRIDE;
virtual void bindSurface(BitmapTexture* surface) OVERRIDE { m_currentSurface = surface;}
diff --git a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
index e36dbc948..b9544609e 100644
--- a/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
+++ b/Source/WebCore/platform/graphics/texmap/TextureMapperLayer.cpp
@@ -183,7 +183,7 @@ int TextureMapperLayer::compareGraphicsLayersZValue(const void* a, const void* b
return int(((*layerA)->m_centerZ - (*layerB)->m_centerZ) * 1000);
}
-void TextureMapperLayer::sortByZOrder(Vector<TextureMapperLayer* >& array, int first, int last)
+void TextureMapperLayer::sortByZOrder(Vector<TextureMapperLayer* >& array, int /* first */, int /* last */)
{
qsort(array.data(), array.size(), sizeof(TextureMapperLayer*), compareGraphicsLayersZValue);
}
@@ -407,7 +407,7 @@ void TextureMapperLayer::flushCompositingState(GraphicsLayerTextureMapper* graph
flushCompositingState(graphicsLayer, rootLayer()->m_textureMapper, options);
}
-void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper* textureMapper)
+void TextureMapperLayer::flushCompositingStateSelf(GraphicsLayerTextureMapper* graphicsLayer, TextureMapper*)
{
int changeMask = graphicsLayer->changeMask();
diff --git a/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp b/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp
index 22d514aa7..7b7e45aec 100644
--- a/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp
+++ b/Source/WebCore/platform/image-encoders/skia/JPEGImageEncoder.cpp
@@ -173,8 +173,9 @@ static bool encodePixels(IntSize imageSize, unsigned char* inputPixels, bool pre
row.resize(cinfo.image_width * cinfo.input_components);
const size_t pixelRowStride = cinfo.image_width * 4;
while (cinfo.next_scanline < cinfo.image_height) {
- extractRowRGB(pixels, cinfo.image_width, row.data());
- jpeg_write_scanlines(&cinfo, row.dataSlot(), 1);
+ JSAMPLE* rowData = row.data();
+ extractRowRGB(pixels, cinfo.image_width, rowData);
+ jpeg_write_scanlines(&cinfo, &rowData, 1);
pixels += pixelRowStride;
}
diff --git a/Source/WebCore/platform/text/mac/StringMac.mm b/Source/WebCore/platform/text/mac/StringMac.mm
index 9544048b2..4e9b2c696 100644
--- a/Source/WebCore/platform/text/mac/StringMac.mm
+++ b/Source/WebCore/platform/text/mac/StringMac.mm
@@ -34,9 +34,17 @@ String::String(NSString* str)
if (size == 0)
m_impl = StringImpl::empty();
else {
- Vector<UChar, 1024> buffer(size);
- CFStringGetCharacters(reinterpret_cast<CFStringRef>(str), CFRangeMake(0, size), buffer.data());
- m_impl = StringImpl::create(buffer.data(), size);
+ Vector<LChar, 1024> lcharBuffer(size);
+ CFIndex usedBufLen;
+ CFIndex convertedsize = CFStringGetBytes(reinterpret_cast<CFStringRef>(str), CFRangeMake(0, size), kCFStringEncodingISOLatin1, 0, false, lcharBuffer.data(), size, &usedBufLen);
+ if ((convertedsize == size) && (usedBufLen == size)) {
+ m_impl = StringImpl::create(lcharBuffer.data(), size);
+ return;
+ }
+
+ Vector<UChar, 1024> ucharBuffer(size);
+ CFStringGetCharacters(reinterpret_cast<CFStringRef>(str), CFRangeMake(0, size), ucharBuffer.data());
+ m_impl = StringImpl::create(ucharBuffer.data(), size);
}
}