diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:34:19 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-16 17:34:19 +0000 |
commit | df143bdc1314b6db3d1488a6b8346a4e0bd18a14 (patch) | |
tree | 561bd4b35b998216a9d9b3e2c171d6828306c5f6 /webkit/glue | |
parent | b347bcb71081e02ccb19c6e319bb6c9908b7ce7d (diff) | |
download | chromium_src-df143bdc1314b6db3d1488a6b8346a4e0bd18a14.zip chromium_src-df143bdc1314b6db3d1488a6b8346a4e0bd18a14.tar.gz chromium_src-df143bdc1314b6db3d1488a6b8346a4e0bd18a14.tar.bz2 |
Hack to enable video on mac by creating a blank PlatformContextMac to draw on.
This isn't a great solution, but it kinda works. Video renders, and the speed is acceptable even though we're doing an extra copy for each frame. The image shows up upside-down though. :(
Review URL: http://codereview.chromium.org/126087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18503 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/webmediaplayer_impl.cc | 6 | ||||
-rw-r--r-- | webkit/glue/webmediaplayer_impl.h | 3 |
2 files changed, 2 insertions, 7 deletions
diff --git a/webkit/glue/webmediaplayer_impl.cc b/webkit/glue/webmediaplayer_impl.cc index ee6f7b5f..ebdda91 100644 --- a/webkit/glue/webmediaplayer_impl.cc +++ b/webkit/glue/webmediaplayer_impl.cc @@ -15,6 +15,7 @@ #include "webkit/glue/media/video_renderer_impl.h" #include "webkit/glue/webmediaplayer_impl.h" +using WebKit::WebCanvas; using WebKit::WebRect; using WebKit::WebSize; @@ -264,9 +265,7 @@ void WebMediaPlayerImpl::setSize(const WebSize& size) { } } -// TODO(hclam): enable this for mac. -#if WEBKIT_USING_SKIA -void WebMediaPlayerImpl::paint(skia::PlatformCanvas* canvas, +void WebMediaPlayerImpl::paint(WebCanvas* canvas, const WebRect& rect) { DCHECK(main_loop_ && MessageLoop::current() == main_loop_); @@ -274,7 +273,6 @@ void WebMediaPlayerImpl::paint(skia::PlatformCanvas* canvas, video_renderer_->Paint(canvas, rect); } } -#endif void WebMediaPlayerImpl::WillDestroyCurrentMessageLoop() { pipeline_.Stop(); diff --git a/webkit/glue/webmediaplayer_impl.h b/webkit/glue/webmediaplayer_impl.h index e670535..0971125 100644 --- a/webkit/glue/webmediaplayer_impl.h +++ b/webkit/glue/webmediaplayer_impl.h @@ -117,10 +117,7 @@ class WebMediaPlayerImpl : public WebKit::WebMediaPlayer, // Methods for painting. virtual void setSize(const WebKit::WebSize& size); - // TODO(hclam): enable this for mac. -#if WEBKIT_USING_SKIA virtual void paint(WebKit::WebCanvas* canvas, const WebKit::WebRect& rect); -#endif // True if a video is loaded. virtual bool hasVideo() const; |