summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/GraphicsOperation.h')
-rw-r--r--Source/WebCore/platform/graphics/android/context/GraphicsOperation.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h b/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
index c70c295..edcdc35 100644
--- a/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
+++ b/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
@@ -587,25 +587,20 @@ class DrawPosText : public Operation {
public:
DrawPosText(const void* text, size_t byteLength,
const SkPoint pos[], const SkPaint* paint)
- : m_byteLength(byteLength)
+ : m_text(text)
+ , m_byteLength(byteLength)
+ , m_pos(pos)
, m_paint(paint)
- {
- size_t points = m_paint->countText(text, byteLength);
- m_pos = new SkPoint[points];
- memcpy(m_pos, pos, sizeof(SkPoint) * points);
- m_text = malloc(byteLength);
- memcpy(m_text, text, byteLength);
- }
- ~DrawPosText() { delete m_pos; free(m_text); }
+ {}
virtual bool applyImpl(PlatformGraphicsContext* context) {
context->drawPosText(m_text, m_byteLength, m_pos, *m_paint);
return true;
}
TYPE(DrawPosTextOperation)
private:
- void* m_text;
+ const void* m_text;
size_t m_byteLength;
- SkPoint* m_pos;
+ const SkPoint* m_pos;
const SkPaint* m_paint;
};