summaryrefslogtreecommitdiffstats
path: root/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
diff options
context:
space:
mode:
authorJohn Reck <jreck@google.com>2012-08-03 16:00:32 -0700
committerJohn Reck <jreck@google.com>2012-08-06 17:46:09 -0700
commit3718b58e4da76b7025aa5316a51264c5e38f2569 (patch)
tree862c59605fa3e2bd61ae279930f1d6cf70edb1f3 /Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
parent6228f1617d7525d64a23edd3b497791c6a06e842 (diff)
downloadexternal_webkit-3718b58e4da76b7025aa5316a51264c5e38f2569.zip
external_webkit-3718b58e4da76b7025aa5316a51264c5e38f2569.tar.gz
external_webkit-3718b58e4da76b7025aa5316a51264c5e38f2569.tar.bz2
Remove usages of getCanvas
Everything goes through either PlatformGraphicsContext or recordingCanvas() Change-Id: I375a4294d2e8d4b467b70c6b8a7f0b96f402f252
Diffstat (limited to 'Source/WebCore/platform/graphics/android/context/GraphicsOperation.h')
-rw-r--r--Source/WebCore/platform/graphics/android/context/GraphicsOperation.h30
1 files changed, 27 insertions, 3 deletions
diff --git a/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h b/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
index 9bbf6b9..b1d91fb 100644
--- a/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
+++ b/Source/WebCore/platform/graphics/android/context/GraphicsOperation.h
@@ -113,6 +113,7 @@ public:
, StrokeArcOperation
, StrokePathOperation
, StrokeRectOperation
+ , DrawMediaButtonOperation
// Text
, DrawPosTextOperation
} OperationType;
@@ -148,6 +149,7 @@ public:
TYPE_CASE(StrokeArcOperation)
TYPE_CASE(StrokePathOperation)
TYPE_CASE(StrokeRectOperation)
+ TYPE_CASE(DrawMediaButtonOperation)
// Text
TYPE_CASE(DrawPosTextOperation)
}
@@ -535,6 +537,30 @@ private:
float m_lineWidth;
};
+class DrawMediaButton : public Operation {
+public:
+ DrawMediaButton(const IntRect& rect, RenderSkinMediaButton::MediaButton buttonType,
+ bool translucent, bool drawBackground,
+ const IntRect& thumb)
+ : m_rect(rect)
+ , m_thumb(thumb)
+ , m_buttonType(buttonType)
+ , m_translucent(translucent)
+ , m_drawBackground(drawBackground)
+ {}
+ virtual bool applyImpl(PlatformGraphicsContext* context) {
+ context->drawMediaButton(m_rect, m_buttonType, m_translucent, m_drawBackground, m_thumb);
+ return true;
+ }
+ TYPE(DrawMediaButtonOperation)
+private:
+ IntRect m_rect;
+ IntRect m_thumb;
+ RenderSkinMediaButton::MediaButton m_buttonType;
+ bool m_translucent : 1;
+ bool m_drawBackground : 1;
+};
+
//**************************************
// Text
//**************************************
@@ -554,9 +580,7 @@ public:
}
~DrawPosText() { delete m_pos; free(m_text); }
virtual bool applyImpl(PlatformGraphicsContext* context) {
- if (!context->getCanvas())
- return true;
- context->getCanvas()->drawPosText(m_text, m_byteLength, m_pos, m_paint);
+ context->drawPosText(m_text, m_byteLength, m_pos, m_paint);
return true;
}
TYPE(DrawPosTextOperation)