diff options
author | John Reck <jreck@google.com> | 2012-07-20 17:40:29 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-07-20 17:40:29 -0700 |
commit | 839203b35a55ec16675b15767cb242038b9a5132 (patch) | |
tree | 0769056cceeb9e13981d6615fea5ab79daeabc68 /Source/WebCore/platform/graphics/android/context/GraphicsOperation.h | |
parent | 7e79b26827775cb4bb330bd70d2a2a2ee4c9412b (diff) | |
download | external_webkit-839203b35a55ec16675b15767cb242038b9a5132.zip external_webkit-839203b35a55ec16675b15767cb242038b9a5132.tar.gz external_webkit-839203b35a55ec16675b15767cb242038b9a5132.tar.bz2 |
Implement missing recording draws
Change-Id: I15a9c63d7aed9f54095763499d3ffff2e17872b7
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/GraphicsOperation.h')
-rw-r--r-- | Source/WebCore/platform/graphics/android/context/GraphicsOperation.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h b/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h index fc3b8bc..1cfb094 100644 --- a/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h +++ b/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h @@ -82,7 +82,9 @@ public: // Drawing , DrawBitmapPatternOperation , DrawBitmapRectOperation + , DrawConvexPolygonQuadOperation , DrawEllipseOperation + , DrawFocusRingOperation , DrawLineOperation , DrawLineForTextOperation , DrawLineForTextCheckingOperation @@ -153,7 +155,9 @@ public: // Drawing TYPE_CASE(DrawBitmapPatternOperation) TYPE_CASE(DrawBitmapRectOperation) + TYPE_CASE(DrawConvexPolygonQuadOperation) TYPE_CASE(DrawEllipseOperation) + TYPE_CASE(DrawFocusRingOperation) TYPE_CASE(DrawLineOperation) TYPE_CASE(DrawLineForTextOperation) TYPE_CASE(DrawLineForTextCheckingOperation) @@ -577,6 +581,23 @@ private: CompositeOperator m_operator; }; +class DrawConvexPolygonQuad : public Operation { +public: + DrawConvexPolygonQuad(const FloatPoint* points, bool shouldAntiAlias) + : m_shouldAntiAlias(shouldAntiAlias) + { + memcpy(m_points, points, 4 * sizeof(FloatPoint)); + } + virtual bool applyImpl(PlatformGraphicsContext* context) { + context->drawConvexPolygon(4, m_points, m_shouldAntiAlias); + return true; + } + virtual OperationType type() { return DrawConvexPolygonQuadOperation; } +private: + bool m_shouldAntiAlias; + FloatPoint m_points[4]; +}; + class DrawEllipse : public Operation { public: DrawEllipse(const IntRect& rect) : m_rect(rect) {} @@ -589,6 +610,26 @@ private: IntRect m_rect; }; +class DrawFocusRing : public Operation { +public: + DrawFocusRing(const Vector<IntRect>& rects, int width, int offset, const Color& color) + : m_rects(rects) + , m_width(width) + , m_offset(offset) + , m_color(color) + {} + virtual bool applyImpl(PlatformGraphicsContext* context) { + context->drawFocusRing(m_rects, m_width, m_offset, m_color); + return true; + } + virtual OperationType type() { return DrawFocusRingOperation; } +private: + Vector<IntRect> m_rects; + int m_width; + int m_offset; + Color m_color; +}; + class DrawLine : public Operation { public: DrawLine(const IntPoint& point1, const IntPoint& point2) |