diff options
author | Teng-Hui Zhu <ztenghui@google.com> | 2011-03-21 14:01:06 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-03-21 14:01:06 -0700 |
commit | 47817e2ea523c5798c192ec9005238611b3910eb (patch) | |
tree | 7be380ccf8d253ec57efa05be0637089a5b29f65 /WebKit | |
parent | 4c6c5a28199f4770d1422214fcc76a61b5afa42c (diff) | |
parent | de89b1aa0a100f46600ed48b6b3b57759c446447 (diff) | |
download | external_webkit-47817e2ea523c5798c192ec9005238611b3910eb.zip external_webkit-47817e2ea523c5798c192ec9005238611b3910eb.tar.gz external_webkit-47817e2ea523c5798c192ec9005238611b3910eb.tar.bz2 |
Merge "Support drawing paused and loading image as GL texture" into honeycomb-mr1
Diffstat (limited to 'WebKit')
-rw-r--r-- | WebKit/android/RenderSkinMediaButton.cpp | 17 | ||||
-rw-r--r-- | WebKit/android/RenderSkinMediaButton.h | 5 | ||||
-rw-r--r-- | WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp | 6 |
3 files changed, 19 insertions, 9 deletions
diff --git a/WebKit/android/RenderSkinMediaButton.cpp b/WebKit/android/RenderSkinMediaButton.cpp index 6a11eda..745fa88 100644 --- a/WebKit/android/RenderSkinMediaButton.cpp +++ b/WebKit/android/RenderSkinMediaButton.cpp @@ -54,9 +54,12 @@ static const PatchData gFiles[] = { "ic_media_rew.png", 0, 0 }, // REWIND { "ic_media_ff.png", 0, 0 }, // FORWARD { "ic_media_fullscreen.png", 0, 0 }, // FULLSCREEN + { "spinner_76_outer_holo.png", 0, 0 }, // SPINNER_OUTER + { "spinner_76_inner_holo.png", 0, 0 }, // SPINNER_INNER + { "ic_media_video_poster.png", 0, 0 }, // VIDEO { "btn_media_player_disabled.9.png", 0, 0 }, // BACKGROUND_SLIDER - { "scrubber_track_holo_dark.9.png", 0, 0 }, // SLIDER_TRACK - { "scrubber_control_holo.png", 0, 0 } // SLIDER_THUMB + { "scrubber_track_holo_dark.9.png", 0, 0 }, // SLIDER_TRACK + { "scrubber_control_holo.png", 0, 0 } // SLIDER_THUMB }; static SkBitmap gButton[sizeof(gFiles)/sizeof(gFiles[0])]; @@ -124,6 +127,14 @@ void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, int buttonT paint.setColor(backgroundColor); break; } + case SPINNER_OUTER: + case SPINNER_INNER: + case VIDEO: + { + drawsBackgroundColor = false; + imageIndex = buttonType + 1; + break; + } case BACKGROUND_SLIDER: { drawsBackgroundColor = false; @@ -200,4 +211,4 @@ void RenderSkinMediaButton::Draw(SkCanvas* canvas, const IntRect& r, int buttonT } } -} //WebCore +} // WebCore diff --git a/WebKit/android/RenderSkinMediaButton.h b/WebKit/android/RenderSkinMediaButton.h index 026f538..6aa9c4e 100644 --- a/WebKit/android/RenderSkinMediaButton.h +++ b/WebKit/android/RenderSkinMediaButton.h @@ -34,8 +34,7 @@ namespace WebCore { class IntRect; class RenderObject; -class RenderSkinMediaButton -{ +class RenderSkinMediaButton { public: /** * Initialize the class before use. Uses the AssetManager to initialize any @@ -51,7 +50,7 @@ public: /** * Button types */ - enum { PAUSE, PLAY, MUTE, REWIND, FORWARD, FULLSCREEN, BACKGROUND_SLIDER, SLIDER_TRACK, SLIDER_THUMB }; + enum { PAUSE, PLAY, MUTE, REWIND, FORWARD, FULLSCREEN, SPINNER_OUTER, SPINNER_INNER , VIDEO, BACKGROUND_SLIDER, SLIDER_TRACK, SLIDER_THUMB }; /** * Slider dimensions */ diff --git a/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp b/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp index 4cc9cf4..d61b0dd 100644 --- a/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp +++ b/WebKit/android/WebCoreSupport/MediaPlayerPrivateAndroid.cpp @@ -567,7 +567,7 @@ static void OnTimeupdate(JNIEnv* env, jobject obj, int position, int pointer) // Return value: true when the video layer is found. static bool SendSurfaceTexture(JNIEnv* env, jobject obj, jobject surfTex, int baseLayer, int videoLayerId, - int textureName, bool updateTexture) { + int textureName, int playerState) { if (!surfTex) return false; @@ -590,7 +590,7 @@ static bool SendSurfaceTexture(JNIEnv* env, jobject obj, jobject surfTex, return false; // Set the SurfaceTexture to the layer we found - videoLayer->setSurfaceTexture(texture, textureName, updateTexture); + videoLayer->setSurfaceTexture(texture, textureName, static_cast<PlayerState>(playerState)); return true; } @@ -607,7 +607,7 @@ static JNINativeMethod g_MediaPlayerMethods[] = { (void*) OnPaused }, { "nativeOnPosterFetched", "(Landroid/graphics/Bitmap;I)V", (void*) OnPosterFetched }, - { "nativeSendSurfaceTexture", "(Landroid/graphics/SurfaceTexture;IIIZ)Z", + { "nativeSendSurfaceTexture", "(Landroid/graphics/SurfaceTexture;IIII)Z", (void*) SendSurfaceTexture }, { "nativeOnTimeupdate", "(II)V", (void*) OnTimeupdate }, |