diff options
author | John Reck <jreck@google.com> | 2012-08-03 16:00:32 -0700 |
---|---|---|
committer | John Reck <jreck@google.com> | 2012-08-06 17:46:09 -0700 |
commit | 3718b58e4da76b7025aa5316a51264c5e38f2569 (patch) | |
tree | 862c59605fa3e2bd61ae279930f1d6cf70edb1f3 /Source/WebKit/android/RenderSkinMediaButton.cpp | |
parent | 6228f1617d7525d64a23edd3b497791c6a06e842 (diff) | |
download | external_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/WebKit/android/RenderSkinMediaButton.cpp')
-rw-r--r-- | Source/WebKit/android/RenderSkinMediaButton.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Source/WebKit/android/RenderSkinMediaButton.cpp b/Source/WebKit/android/RenderSkinMediaButton.cpp index b3aa57d..a2f19c3 100644 --- a/Source/WebKit/android/RenderSkinMediaButton.cpp +++ b/Source/WebKit/android/RenderSkinMediaButton.cpp @@ -26,12 +26,13 @@ #define LOG_TAG "WebCore" #include "config.h" -#include "android_graphics.h" +#include "RenderSkinMediaButton.h" + #include "Document.h" #include "IntRect.h" #include "Node.h" #include "RenderObject.h" -#include "RenderSkinMediaButton.h" +#include "RenderSkinAndroid.h" #include "RenderSlider.h" #include "SkCanvas.h" #include "SkNinePatch.h" @@ -88,8 +89,9 @@ void RenderSkinMediaButton::Decode() } } -void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, int buttonType, - bool translucent, RenderObject* o, bool drawBackground) +void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, + MediaButton buttonType, bool translucent, + bool drawBackground, const IntRect& thumb) { if (!gDecoded) { Decode(); @@ -179,9 +181,7 @@ void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, int buttonT SkScalar quarterHeight = SkScalarHalf(SkScalarHalf(bounds.height())); bounds.fTop += quarterHeight + SkScalarHalf(3); bounds.fBottom += -quarterHeight + SK_ScalarHalf; - if (o && o->isSlider()) { - RenderSlider* slider = toRenderSlider(o); - IntRect thumb = slider->thumbRect(); + if (!thumb.isEmpty()) { // Inset the track by half the width of the thumb, so the track // does not appear to go beyond the space where the thumb can // be. |