Index: Source/WebCore/html/HTMLVideoElement.cpp |
diff --git a/Source/WebCore/html/HTMLVideoElement.cpp b/Source/WebCore/html/HTMLVideoElement.cpp |
index 02ec2c41fc2c6e32e470d811693d68bc2ac75e60..5fd1a0f4ab6bf6f46a50baaf6f70a11ef8d20d44 100644 |
--- a/Source/WebCore/html/HTMLVideoElement.cpp |
+++ b/Source/WebCore/html/HTMLVideoElement.cpp |
@@ -34,6 +34,7 @@ |
#include "Document.h" |
#include "ExceptionCode.h" |
#include "Frame.h" |
+#include "GraphicsContext3D.h" |
#include "HTMLImageLoader.h" |
#include "HTMLNames.h" |
#include "HTMLParserIdioms.h" |
@@ -42,6 +43,7 @@ |
#include "RenderVideo.h" |
#include "ScriptController.h" |
#include "Settings.h" |
+#include "SharedGraphicsContext3D.h" |
namespace WebCore { |
@@ -241,6 +243,14 @@ void HTMLVideoElement::paintCurrentFrameInContext(GraphicsContext* context, cons |
return; |
player->setVisible(true); // Make player visible or it won't draw. |
+ |
+ // Go through the fast path trying to do a GPU-GPU texture copy without a readback to system memory if possible. |
+ // Otherwise, it will fallback to the normal SW path. |
+ RefPtr<GraphicsContext3D> context3D = SharedGraphicsContext3D::get(); |
+ if (context3D && player->copyVideoTextureToCanvas(context, context3D.get())) |
scherkus (not reviewing)
2013/04/05 20:47:09
this seems strange
there are other callers of pai
Ken Russell (switch to Gerrit)
2013/04/05 22:40:38
I'll be more blunt and say that there is no way th
hkuang
2013/04/09 17:46:10
Done.
hkuang
2013/04/09 17:46:10
Fix the naming issue when addressing Ken's comment
|
+ return; |
+ |
+ // Normal pure SW path |
player->paintCurrentFrameInContext(context, destRect); |
} |