Title: [112682] trunk/Source/WebKit/chromium
- Revision
- 112682
- Author
- r...@google.com
- Date
- 2012-03-30 10:08:51 -0700 (Fri, 30 Mar 2012)
Log Message
pass alpha directly to player, rather than creating a layer (for performance)
https://bugs.webkit.org/show_bug.cgi?id=82360
Reviewed by Stephen White.
Performance change, existing webkit tests apply.
* public/WebMediaPlayer.h:
(WebMediaPlayer):
* src/WebMediaPlayerClientImpl.cpp:
(WebKit::WebMediaPlayerClientImpl::paintCurrentFrameInContext):
Modified Paths
Diff
Modified: trunk/Source/WebKit/chromium/ChangeLog (112681 => 112682)
--- trunk/Source/WebKit/chromium/ChangeLog 2012-03-30 17:01:23 UTC (rev 112681)
+++ trunk/Source/WebKit/chromium/ChangeLog 2012-03-30 17:08:51 UTC (rev 112682)
@@ -1,3 +1,17 @@
+2012-03-30 Mike Reed <r...@google.com>
+
+ pass alpha directly to player, rather than creating a layer (for performance)
+ https://bugs.webkit.org/show_bug.cgi?id=82360
+
+ Reviewed by Stephen White.
+
+ Performance change, existing webkit tests apply.
+
+ * public/WebMediaPlayer.h:
+ (WebMediaPlayer):
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::paintCurrentFrameInContext):
+
2012-03-30 Jesus Sanchez-Palencia <jesus.palen...@openbossa.org>
Add a "preview" state to Page Visibility API implementation
Modified: trunk/Source/WebKit/chromium/public/WebMediaPlayer.h (112681 => 112682)
--- trunk/Source/WebKit/chromium/public/WebMediaPlayer.h 2012-03-30 17:01:23 UTC (rev 112681)
+++ trunk/Source/WebKit/chromium/public/WebMediaPlayer.h 2012-03-30 17:08:51 UTC (rev 112682)
@@ -116,7 +116,7 @@
virtual void setSize(const WebSize&) = 0;
- virtual void paint(WebCanvas*, const WebRect&) = 0;
+ virtual void paint(WebCanvas*, const WebRect&, uint8_t alpha) = 0;
// True if the loaded media has a playable video/audio track.
virtual bool hasVideo() const = 0;
Modified: trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp (112681 => 112682)
--- trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp 2012-03-30 17:01:23 UTC (rev 112681)
+++ trunk/Source/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp 2012-03-30 17:08:51 UTC (rev 112682)
@@ -16,6 +16,7 @@
#include "KURL.h"
#include "MediaPlayer.h"
#include "NotImplemented.h"
+#include "PlatformContextSkia.h"
#include "RenderView.h"
#include "TimeRanges.h"
#include "VideoFrameChromium.h"
@@ -41,11 +42,6 @@
#include "RenderLayerCompositor.h"
#endif
-// WebCommon.h defines WEBKIT_USING_SKIA so this has to be included last.
-#if WEBKIT_USING_SKIA
-#include "PlatformContextSkia.h"
-#endif
-
#include <wtf/Assertions.h>
#include <wtf/text/CString.h>
@@ -495,20 +491,9 @@
// Since we're accessing platformContext() directly we have to manually
// check.
if (m_webMediaPlayer && !context->paintingDisabled()) {
-#if WEBKIT_USING_SKIA
PlatformGraphicsContext* platformContext = context->platformContext();
WebCanvas* canvas = platformContext->canvas();
-
- canvas->saveLayerAlpha(0, platformContext->getNormalizedAlpha());
-
- m_webMediaPlayer->paint(canvas, rect);
-
- canvas->restore();
-#elif WEBKIT_USING_CG
- m_webMediaPlayer->paint(context->platformContext(), rect);
-#else
- notImplemented();
-#endif
+ m_webMediaPlayer->paint(canvas, rect, platformContext->getNormalizedAlpha());
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes